Git: Difference between revisions

From MZXWiki
Jump to navigation Jump to search
 
(23 intermediate revisions by the same user not shown)
Line 5: Line 5:
==Windows==
==Windows==
===Installation===
===Installation===
Git is best used on Windows via [http://msysgit.github.com/ msysgit], which includes a posix-style terminal called msys and a copy of mingw32.  Once msysgit is installed, Git may be used by starting msys and typing "git [command]".
Download [http://msysgit.github.com/ Git], which includes a posix-style terminal called '''msys''', and a copy of [http://sourceforge.net/projects/mingw/files/ MinGW32]You do not need to install a copy of '''msys''' with MinGW32 because one is already included with Git.
 
An easier way can be to install msysGit, a version of Git that includes both '''msys''' and MinGW32. [[Git#Setting up msysGit]]
 
Once Git is installed, it may be used from the command line by starting '''msys''' and typing "git [command]". You will now need to configure Git's copy of '''msys''' to be able to use MinGW32. MinGW32's default installation directory is C:\MinGW32\, so to add it to the path variable.
 
notepad /etc/bash_profile
 
This will open up notepad and prompt you to create a new file. Copy this into the new file and save it:
 
PATH = "$PATH:/c/MinGW32/bin"
 
This will create a file at /etc/bash_profile. Change '''/c/MinGW32/bin''' as necessary to point to your MinGW32 binary folder.
 
Load /etc/bash_profile:
 
. /etc/bash_profile
 
Test to make sure the MinGW32 binaries are accessible:
 
gcc.exe


===Setting up a development folder===
===Setting up a development folder===
Make a directory in the msys root called "megazeux" and extract the [http://mzx.devzero.co.uk/docs/mingw32.zip mingw32] or [http://mzx.devzero.co.uk/docs/mingw64.zip mingw64] dependency package directly into it, which should create a folder called "bin".
Make a directory in the msys root called "megazeux" and navigate to it. This is will be your new home folder.
 
mkdir /megazeux
mkdir /megazeux/src
 
Download and extract dependencies:


  cd /megazeux
  cd /megazeux
  mkdir src
  wget http://mzx.devzero.co.uk/docs/mingw32.zip
  cat "HOME=\"/megazeux\"\nPATH=\"$PATH:$HOME/bin/mingw32/bin\"\n" >> /etc/bash_profile
unzip mingw32.zip
 
Add this to /etc/bash_profile and save:
 
  HOME="/megazeux"
PATH="$PATH:$HOME/bin/mingw32/bin"
 
Load /etc/bash_profile:
 
  . /etc/bash_profile
  . /etc/bash_profile
git pull git@github.com/[YourRepository]/megazeux.git src


Before you can build, you may have to download a package of the latest mingw32 or mingw64 compilers for the platform you're attempting to build on, and copy/link several other mingw utilities to match the format expected by the MZX makefile. The errors during building should be helpful enough to inform you of what you need to copy (example: cp /mingw/bin/windres.exe /mingw/bin/i686-w64-mingw32-windres.exe).
Clone the GIT repository into /megazeux/src
 
git clone https://github.com/[YourRepository]/megazeux.git /megazeux/src
 
Once you have created a duplicate repository on your machine, you can pull the most recent changes by navigating to the repository folder and running git pull:
 
cd /megazeux/src
  git pull https://github.com/AliceLR/megazeux.git master


===Compiling MegaZeux===
  cd /megazeux/src
  cd /megazeux/src
  ./config.sh --platform mingw[32|64] --prefix $HOME/bin/mingw32
  ./config.sh --platform win[32|64] --prefix $HOME/bin/mingw32
  make
  make
Another option to note is --enable-libsdl2, which enables the latest version of SDL. The updated dependencies for using SDL 2.0 can be found in /megazeux/src/scripts/deps/mingw32.zip
===Setting up msysGit===
An easier way to set up Git than to configure a separate Git and MinGW32 is to download msysGit and install it.  It is available [http://msysgit.github.io here]; install packages can be found by searching for "msysgit" on the Downloads page. The latest full install package can be found [http://code.google.com/p/msysgit/downloads/detail?name=msysGit-fullinstall-1.8.3-preview20130601.exe&can=3&q=msysgit here].
Before you can build with msysGit, you may have to download a package of the [http://sourceforge.net/projects/mingwbuilds/ latest mingw32 or mingw64 compilers] for the platform you're attempting to build on.  For example, make may not be able to find
i686-w64-mingw32-gcc.exe
which means you will have to download the i686-w64-mingw32 compiler package and extract it into /mingw/bin/.
Other utilities will also be found missing if this happens that are not included in the compiler package.  The errors during building should be helpful enough to inform you of what you need to copy, for example:
cp /mingw/bin/windres.exe /mingw/bin/i686-w64-mingw32-windres.exe


==Mac OS X==
==Mac OS X==
Line 32: Line 87:
  mkdir ~/mzxdev
  mkdir ~/mzxdev
  cd ~/mzxdev
  cd ~/mzxdev
  git pull git@github.com/[YourRepository]/megazeux.git .
  git clone git@github.com/[YourRepository]/megazeux.git .

Latest revision as of 00:26, 8 July 2013

Git is a revision control system developed by Linus Torvalds, the creator of Linux. The latest unstable/work-in-progress/between-release MegaZeux source code is kept in a git repository that can be found here.

Windows

Installation

Download Git, which includes a posix-style terminal called msys, and a copy of MinGW32. You do not need to install a copy of msys with MinGW32 because one is already included with Git.

An easier way can be to install msysGit, a version of Git that includes both msys and MinGW32. Git#Setting up msysGit

Once Git is installed, it may be used from the command line by starting msys and typing "git [command]". You will now need to configure Git's copy of msys to be able to use MinGW32. MinGW32's default installation directory is C:\MinGW32\, so to add it to the path variable.

notepad /etc/bash_profile

This will open up notepad and prompt you to create a new file. Copy this into the new file and save it:

PATH = "$PATH:/c/MinGW32/bin"

This will create a file at /etc/bash_profile. Change /c/MinGW32/bin as necessary to point to your MinGW32 binary folder.

Load /etc/bash_profile:

. /etc/bash_profile

Test to make sure the MinGW32 binaries are accessible:

gcc.exe

Setting up a development folder

Make a directory in the msys root called "megazeux" and navigate to it. This is will be your new home folder.

mkdir /megazeux
mkdir /megazeux/src

Download and extract dependencies:

cd /megazeux
wget http://mzx.devzero.co.uk/docs/mingw32.zip
unzip mingw32.zip

Add this to /etc/bash_profile and save:

HOME="/megazeux"
PATH="$PATH:$HOME/bin/mingw32/bin"

Load /etc/bash_profile:

. /etc/bash_profile

Clone the GIT repository into /megazeux/src

git clone https://github.com/[YourRepository]/megazeux.git /megazeux/src

Once you have created a duplicate repository on your machine, you can pull the most recent changes by navigating to the repository folder and running git pull:

cd /megazeux/src
git pull https://github.com/AliceLR/megazeux.git master

Compiling MegaZeux

cd /megazeux/src
./config.sh --platform win[32|64] --prefix $HOME/bin/mingw32
make

Another option to note is --enable-libsdl2, which enables the latest version of SDL. The updated dependencies for using SDL 2.0 can be found in /megazeux/src/scripts/deps/mingw32.zip

Setting up msysGit

An easier way to set up Git than to configure a separate Git and MinGW32 is to download msysGit and install it. It is available here; install packages can be found by searching for "msysgit" on the Downloads page. The latest full install package can be found here.

Before you can build with msysGit, you may have to download a package of the latest mingw32 or mingw64 compilers for the platform you're attempting to build on. For example, make may not be able to find

i686-w64-mingw32-gcc.exe

which means you will have to download the i686-w64-mingw32 compiler package and extract it into /mingw/bin/.

Other utilities will also be found missing if this happens that are not included in the compiler package. The errors during building should be helpful enough to inform you of what you need to copy, for example:

cp /mingw/bin/windres.exe /mingw/bin/i686-w64-mingw32-windres.exe

Mac OS X

TBA

Linux

Installation

sudo apt-get install git

Setting up a development folder

mkdir ~/mzxdev
cd ~/mzxdev
git clone git@github.com/[YourRepository]/megazeux.git .