Building Oolite Windows from source - The Easier Way

News and discussion of the PC port of Oolite.

Moderators: winston, another_commander

User avatar
Pleb
---- E L I T E ----
---- E L I T E ----
Posts: 908
Joined: Sun Apr 29, 2012 2:23 pm
Location: United Kingdom

Re: Building Oolite Windows from source - The Easier Way

Post by Pleb »

Zireael wrote:
*dances around happily*

Thank you, thank you, thank you for this guide! I just managed to compile and test a certain tweak of mine (and no, I am not talking of the failed attempt to de-hardcode the number of systems)
Now you have to begin the long and tiring journey of trial and error of coding and re-coding... :lol:
Desktop PC: CPU: Intel i7-4790K Quad Core 4.4GHz (Turbo-Charged) GPU: Nvidia GeForce GTX 1080Ti RAM: 32GB DDR3

Laptop PC: CPU: Intel i5-10300H Quad Core 4.5GHz (Turbo-Charged) GPU: Nvidia GeForce GTX 1650 RAM: 32GB DDR4
User avatar
BlueSteel
Poor
Poor
Posts: 4
Joined: Fri Jan 17, 2014 6:24 am

Re: Building Oolite Windows from source - The Easier Way

Post by BlueSteel »

Thanks, last night I followed the instructions in the first post of this thread and it worked first time flawlessly on Windows 8 ultimate 64 bit
I then wrote a bash script (comprising of the last bit) to update and compile it which I tested this morning again it worked flawlessly

I hope to become an active contributor to this project. we'll see just how good (or bad) I am at coding in C.. lol
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: Building Oolite Windows from source - The Easier Way

Post by cim »

BlueSteel wrote:
we'll see just how good (or bad) I am at coding in C.. lol
Welcome to the forums, BlueSteel.

Note that Oolite uses Objective-C, rather than C, as its language. If you're already familiar with C then there's a few extra bits of syntax mostly related to how objects are defined, used and memory managed, plus an extensive (but generally well-documented) standard object library in the form of Cocoa or GNUStep (depending on OS). C-style code is also used in situations where maximum speed and lower-level memory access is required, generally when interfacing with graphics and sound libraries, but mostly that's avoided. If you're not already familiar with C, this information will probably change which language tutorials and references you consider.
User avatar
Zieman
---- E L I T E ----
---- E L I T E ----
Posts: 680
Joined: Tue Sep 01, 2009 11:55 pm
Location: in maZe

Re: Building Oolite Windows from source - The Easier Way

Post by Zieman »

how do I get the version number/code to show on screen with this method?
...and keep it under lightspeed!

Friendliest Meteor Police that side of Riedquat

[EliteWiki] Far Arm ships
[EliteWiki] Z-ships
[EliteWiki] Baakili Far Trader
[EliteWiki] Tin of SPAM
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: Building Oolite Windows from source - The Easier Way

Post by cim »

Make the target "release-snapshot" (which defines compile-time constants which enable the watermark)
User avatar
Zieman
---- E L I T E ----
---- E L I T E ----
Posts: 680
Joined: Tue Sep 01, 2009 11:55 pm
Location: in maZe

Re: Building Oolite Windows from source - The Easier Way

Post by Zieman »

cim wrote:
Make the target "release-snapshot" (which defines compile-time constants which enable the watermark)
Sorry, but that's Hebrew to me. :(
What should I type, and where, and when?
...and keep it under lightspeed!

Friendliest Meteor Police that side of Riedquat

[EliteWiki] Far Arm ships
[EliteWiki] Z-ships
[EliteWiki] Baakili Far Trader
[EliteWiki] Tin of SPAM
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Re: Building Oolite Windows from source - The Easier Way

Post by Thargoid »

When you do the final build, you need something like "make -fMakefile release-snapshot" (without the quotes) in the root of your trunk code set-up after you do the git download or update.
User avatar
Zieman
---- E L I T E ----
---- E L I T E ----
Posts: 680
Joined: Tue Sep 01, 2009 11:55 pm
Location: in maZe

Re: Building Oolite Windows from source - The Easier Way

Post by Zieman »

Thargoid wrote:
When you do the final build, you need something like "make -fMakefile release-snapshot" (without the quotes) in the root of your trunk code set-up after you do the git download or update.
So I just ditch the "debug=no" -part and insert "-fMakefile release-snapshot" instead?
...and keep it under lightspeed!

Friendliest Meteor Police that side of Riedquat

[EliteWiki] Far Arm ships
[EliteWiki] Z-ships
[EliteWiki] Baakili Far Trader
[EliteWiki] Tin of SPAM
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Re: Building Oolite Windows from source - The Easier Way

Post by Thargoid »

Yes, or basically just type the line above. Another segment I use (if you have a multi-core CPU) is -j4, where that tells the compile to use that number of cores (4 in the -j4 case) to speed things up a bit.

Before you do it though, you probably should "make clean" which will remove the previous build, as if you build one build target over another you can get weird problems of files not coming out right.

So basically the bold/italic bits below:

  • git pull (to update, or if necessary do your repository download if it's the first time)
  • make clean (if you've done a previous build of another target)
  • make -fMakefile release-snapshot (to make the code).
[/color]
User avatar
Zieman
---- E L I T E ----
---- E L I T E ----
Posts: 680
Joined: Tue Sep 01, 2009 11:55 pm
Location: in maZe

Re: Building Oolite Windows from source - The Easier Way

Post by Zieman »

Thargoid wrote:
Yes, or basically just type the line above. Another segment I use (if you have a multi-core CPU) is -j4, where that tells the compile to use that number of cores (4 in the -j4 case) to speed things up a bit.

Before you do it though, you probably should "make clean" which will remove the previous build, as if you build one build target over another you can get weird problems of files not coming out right.

So basically the bold/italic bits below:

  • git pull (to update, or if necessary do your repository download if it's the first time)
  • make clean (if you've done a previous build of another target)
  • make -fMakefile release-snapshot (to make the code).
[/color]
Cool, thanks.

Where do I put that -j4 ?
Before -fMakefile? (making the command: make -j4 -fMakefile release-snapshot)
...and keep it under lightspeed!

Friendliest Meteor Police that side of Riedquat

[EliteWiki] Far Arm ships
[EliteWiki] Z-ships
[EliteWiki] Baakili Far Trader
[EliteWiki] Tin of SPAM
User avatar
BlueSteel
Poor
Poor
Posts: 4
Joined: Fri Jan 17, 2014 6:24 am

Re: Building Oolite Windows from source - The Easier Way

Post by BlueSteel »

Here is my updated bash script to update and recompile

Code: Select all

#!/bin/bash
echo Updating Oolete source code
cd /d/myoolite/oolite
git pull
git submodule update
make clean
# make debug=no
make -j4 -fMakefile release-snapshot
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Re: Building Oolite Windows from source - The Easier Way

Post by Thargoid »

@Zieman - doesn't matter, as long as the command (make) comes first and the target (released snapshot) is last. The other bits (starting with -) are make parameters and their keys, and can be in any order.

And as a note, the 4 in the -j4 may need to be able tweaked depending on how many cores your system has and that you want to use.
User avatar
Tricky
---- E L I T E ----
---- E L I T E ----
Posts: 821
Joined: Sun May 13, 2012 11:12 pm
Location: Bradford, UK. (Anarchic)

Re: Building Oolite Windows from source - The Easier Way

Post by Tricky »

This is my script I use.

https://docs.google.com/file/d/0B1-0dPi ... cslist_api
https://www.dropbox.com/s/rp8n6maauruom ... -oolite.sh
https://app.box.com/s/275jc1prhgjbborca80d

Once you have downloaded it, place it in your Msys home directory. For me that is C:\Msys_x2\1.0\home\Richard. Next open up the console (with msys.bat) and type:

Code: Select all

chmod 0755 build-oolite.sh
Now you can use it to build Oolite, install it and also either clone a new version or pull the latest commits down.

Code: Select all

build-oolite.sh -t snapshot /c/Games/Oolite/v1.79/snapshot
Compiles the code contained in the directory ‘oolite’ as a release-snapshot version and installs in /c/Games/Oolite/v1.79/snapshot

Code: Select all

build-oolite.sh -h
Show usage.

Ignore the license difference between the header and what is displayed by build-oolite.sh --version, I forgot to update it. It is CC BY-NC-SA 4.0
User avatar
Redspear
---- E L I T E ----
---- E L I T E ----
Posts: 2685
Joined: Thu Jun 20, 2013 10:22 pm
Location: On the moon Thought, orbiting the planet Ignorance.

Re: Building Oolite Windows from source - The Easier Way

Post by Redspear »

Has anything changed with regards to the method in the first post?

I've not been able to get it to work since 1.82 (may well be me...)
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6681
Joined: Wed Feb 28, 2007 7:54 am

Re: Building Oolite Windows from source - The Easier Way

Post by another_commander »

No, what seems to be the problem?
Post Reply