Difference between revisions of "Building NitrOS9 in Windows using MinGW"

From NitrOS-9
Jump to: navigation, search
(sync all changes from Allura/Markdown wiki)
m (remove CC=gcc)
 
Line 107: Line 107:
 
   hg clone http://hg.code.sf.net/p/toolshed/code toolshed
 
   hg clone http://hg.code.sf.net/p/toolshed/code toolshed
 
   cd toolshed
 
   cd toolshed
   make -C build/unix install CC=gcc
+
   make -C build/unix install
  
 
(this will give some warnings and fail on cocofuse, we don't care)
 
(this will give some warnings and fail on cocofuse, we don't care)

Latest revision as of 19:00, 20 May 2017

Install Mercurial

Visit http://mercurial.selenic.com/wiki/Download#Windows

Download and install either Mercurial-X.X.X (32-bit exe) or Mercurial-X.X.X (64-bit exe). Use the defaults.

Install MinGW

Visit http://www.mingw.org

Click the "Download Installer" button in the top right of the page.

A file called "mingw-get-setup.exe" will be downloaded. Execute this file.

Click "Install", click "Continue", wait until 100%, click "Continue".

The package selection tool will be displayed. We need to choose two packages.

Click on mingw32-base. Choose "Mark for Installation".

Click on msys-base. Choose "Mark for Installation".

From the Installation menu, choose "Apply Changes".

Click "Apply". Wait till 100% complete. Click "Close".

Exit the installer.

Configure your MinGW environment

Run the post install utility

Open the folder C:\MinGW\msys\1.0\postinstall

Double click on pi.bat

Type y

Press Enter

Type y

Press Enter

Type C:/MinGW

(Note the forward slash)

Press Enter

Press Enter

Configure the profile

Open the folder C:\MinGW\msys\1.0\etc

Open the file profile with Notepad++ or another properly behaved text editor of your choice. Do not use Notepad.

Edit the first line that begins:

 export PATH=".:/usr...

Remove the period and colon directly following the first quote:

 export PATH="/usr...

Now scroll to the end of the file and add this line:

 export NITROS9DIR="/usr/src/nitros9"

Save and close the file.

Final steps in the MSYS environment

Open the folder C:\MinGW\msys\1.0

Note that the msys.bat file here is how you will open a shell any time you want to update or rebuild NitrOS9.

Double click on msys.bat. This opens the MSYS shell.

Add a couple extra packages by typing the following commands:

mingw-get install msys-coreutils
mingw-get install msys-zip

Make a place on the filesystem to do our building. I strongly suggest /usr/src:

mkdir /usr/src

(If you choose some other location, update the NITROS9DIR setting in your profile).

Install lwtools

In the MinGW shell, enter these commands:

 cd /usr/src
 hg clone http://lwtools.projects.l-w.ca/hg/ lwtools
 cd lwtools
 make
 make install

Install the toolshed

In the MinGW shell, enter these commands:

 cd /usr/src
 hg clone http://hg.code.sf.net/p/toolshed/code toolshed
 cd toolshed
 make -C build/unix install

(this will give some warnings and fail on cocofuse, we don't care)

Download and build NitrOS9

In the MinGW shell, enter these commands:

 cd /usr/src
 hg clone http://hg.code.sf.net/p/nitros9/code nitros9
 cd nitros9

At this point you are ready to rock. To build all of NitrOS9 including things you almost certainly don't want:

 make dsk

Alternatively you can first change to the directory containing the system you'd like to build, for instance:

 export NITROS9DIR=$PWD
 cd level2/coco3
 make dsk

Or just stay in the top folder and specify a "port" (coco2, coco3, coco3_6309 etc):

 make dsk PORTS=coco3

Wait a bit, and with any luck you'll have some nice fresh nitros9 .dsk files.

Note: Your nitros9 build directory is accessible at C:\MinGW\msys\1.0\src\nitros9 from Windows.