Labels

APPLE (1) IDL (4) LSD (2) Mac (2) astro (1) life (2) linux (5) teaching (1) volleyball (2) work (1)
Showing posts with label Lenovo Y50. Show all posts
Showing posts with label Lenovo Y50. Show all posts

Saturday, February 14, 2015

How to build the newest version of Git for Windows?

The previous post talked about how to make makefile work on Git Bash for Windows. This Git Bash comes with the current downloadable executable from the official Git website. At the time of writing, the Git and Msysgit version from this downloadable executable is both on version 1.9.5.

I checked out the official Git website again the other day and found out that the newest Git version is 2.3.0. As someone who always want to be experiencing the newest technologies, I, of course would like to install this newest version on my computer. Just kidding. In fact I went back to the website because the Git Bash at the time was having problems handling unicodes when running PostgresQL and IPython from the command line. It messes up the command line structure and I had to run "clear" to take it back to normal. However I can't do it when I am inside IPython. Therefore, I was looking for a newer version of Git Bash that handles unicode well.

The newest version Git (along with Git Bash) is supposed to be able to do the job. The source code is right there on github, but I did not have any knowledge about building Git from source. After some digging on the internet, I went back to the origin, the same repo on the source code, knowing that I can build the newest version of Git for Windows from msysgit. Here is a step by step tutorial on how to build the newest version of Git for Windows.

This tutorial benefits mostly from the wiki of the Github repo.
1. Download netinstaller for msysgit;
2. Click on the installer and select a directory (I used the default: "C:\msysgit\") and let it run.
That's it.

You might wonder why the hell do I need this tutorial then since this is so straightforward. The reason is that actually you might encounter failure as I did.
The error messages I got is:

Generating catalog po/bg.msg
msgfmt --statistics --tcl po/bg.po -l bg -d po/w 304 .
make[1]: *** [po/bg.msg] Error 1
make: *** [all] Error 2

-------------------------

Hello, dear Git developer.

This is a minimal MSYS environment to work on Git.

Your build failed... Please fix it, and give feedback on the Gitlist.

Welcome to msysGit
Run 'git help git' to display the help index.

Run 'git help ' to display help for specific commands.
Run '/share/msysGit/add-shortcut.tcl' to add a shortcut to msys
Git.bash: /git/contrib/completion/git-completion.bash: 
No such file ordirectorybash: __git_ps1: command not found


If you unfortunately encountered this problem, the trick is as follows:
(useful link: https://groups.google.com/forum/#!msg/msysgit/TNXXQ21mfrg/IGkW5ZNoLYgJ )
1. exit msysgit by typing "exit" after the failure;
2. find the file  /share/msysgit/net/setup-msysgit.sh, open it in a text editor and add the following line to the beginning of the file:
export LANG='C';
3. click on msys.bat in the C:\msysgit\ folder and it opens a command line window;
4. type in cd git in the command line;
5. type in make clear in the command line;
6. type in make install in the command line.

Now you should be good to go. 


Thursday, January 22, 2015

How to Set Up Makefile in Windows Git Bash

This is my first time using standalone git in Windows. Earlier I've installed and used Github for Windows which git comes along with. I am amazed by the available ?nix functions in this little git bash shell. Today I wanted to use the makefile function but found that it is not there. Therefore, I did some digging.

Here are some of the helpful resources I have found: http://stackoverflow.com/questions/17158419/how-to-run-makefile-in-windows
http://lists.gnu.org/archive/html/help-make/2011-09/msg00041.html

My system is Windows 8.1 64 bit, and here are the steps I did:
1. Install msysgit downloaded from http://git-scm.com/download/win
2. Create a directory in the git install direcctory: C:\Program Files (x86)\Git\mingw\bin, naming it mingw
3. Install mingw-w64 downloaded from http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/installer/mingw-w64-install.exe/download
4. Go to the bin folder in the mingw-w64 install directory. In my case it is C:\Program Files\mingw-w64\x86_64-4.9.2-posix-seh-rt_v3-rev1\mingw64\bin
5. Rename mingw32-make.exe to make.exe
6. Make a Symlink redirect to this folder from the msysgit install directory by running this command in Command Prompt (run as Administrator):
mklink /j "C:\Program Files (x86)\Git\mingw\bin" "C:\Program Files\mingw-w64\x86_64-4.9.2-posix-seh-rt_v3-rev1\mingw64\bin"

Now you should be able to run make in your git bash console.


Saturday, December 13, 2014

Lenovo Y50 with Windows 8.1

I have recently purchased this new computer and would like to start up a journal to record the changes I have made since day 0.
Dec 11:
 Got the computer from UPS in the morning
 Started the initial setup but stuck after everything was ready, did a hard reboot and everything seemed to be working OK
 Installed Google Chrome, Daemon Tool Lite 4
 Originally wanted to install Ubuntu alongside Windows but this is too complicated and video card might not work properly so decided to install Ubuntu using Virtual Machine.
Dec 12:
 Debated on which Virtual Machine to use, VM Ware or Virtual Box and settled on Virtual Box since it's free and tend to use less source from the hosting OS.
 Installed Virtual Box
 Downloaded Ubuntu 14.04 64 bit
 Downloaded IDL 8.4 which I use for my graduate research
 Uninstalled McAfee, Nitro Pro and more since they are not free and I can find free alternatives  Installed Avast Free AntiVirus
 Set up the Virtual Machine for Ubuntu 14.04 using fixed size 300 Gigabytes which takes around 2 hours and disk 0 activity at almost 100% which might not be a good idea but I will use Ubuntu as my main working system
Dec 13:
 Installed Ubuntu using the allocated 300 Gigabytes space, 50 G for root \, 16 G as swap disk, and the rest for \home.
 Installed IDL 8.4
 Installed Sogou Pinyin Input
 Installed MikTeX
 Installed BaiduYunpan
Dec 14-18:
 Installed GSView, GVim, CubicExplorer, Mendeley Desktop, SumatraPDF, Microsoft Office 2013, MPC, SSH Client, Winrar, Xming