The Ur-Quan Masters Home Page Welcome, Guest. Please login or register.
Did you miss your activation email?
December 04, 2024, 11:16:41 pm
Home Help Search Login Register
News: Celebrating 30 years of Star Control 2 - The Ur-Quan Masters

+  The Ur-Quan Masters Discussion Forum
|-+  The Ur-Quan Masters Re-Release
| |-+  General UQM Discussion (Moderator: Death 999)
| | |-+  uqm-crossbuilder: An easier way to compile UQM for Windows
« previous next »
Pages: [1] Print
Author Topic: uqm-crossbuilder: An easier way to compile UQM for Windows  (Read 3477 times)
oldlaptop
*Smell* controller
****
Offline Offline

Posts: 337



View Profile
uqm-crossbuilder: An easier way to compile UQM for Windows
« on: November 03, 2012, 03:24:06 am »

Compiling UQM executables on Windows has always been difficult. Between installing mingw, configuring libraries, and puzzling through cryptic error messages, it has generally been the kind of thing only highly skilled people could do. Part of the reason for this is that people usually have to start from scratch, and install all libraries manually. This means no two people end up doing things exactly the same, leading to all sorts of problems which can be very difficult to track down. What is needed is a pre-built compiler system, with all libraries set up correctly for UQM to build against. This is an attempt to fill that need.

uqm-crossbuilder is a Debian Linux LiveCD image which contains a fully-configured Windows cross compiler. A cross compiler is a special kind of compiler which runs on one processor or operating system and produces code for another. The cross compiler in uqm-crossbuilder is designed to run on Debian Linux and produce Windows EXEs. It is preconfigured with all the libraries and other software UQM requires to build. All that is required to compile Windows executables with this system is a blank CD and some basic Linux command line knowledge.

To download the current uqm-crossbuilder image, please go to its GitHub download page:
https://github.com/oldlaptop/uqm-crossbuilder/downloads

For help on using uqm-crossbuilder, please read the wiki here:
https://github.com/oldlaptop/uqm-crossbuilder/wiki

Many thanks to Gekko for making his server available for building the ISO image, and for providing much-needed testing.

If you're still stuck after reading the wiki carefully, you can either post your questions in this forum thread
or try to talk to me on IRC. I can often be found in #sc2 and #uqm-arena on the Freenode network.
Logged

Play Supermelee online in #uqm-arena!
Netmelee Improvement Mod
Megagun
Enlightened
*****
Offline Offline

Gender: Male
Posts: 580


Moo


View Profile
Re: uqm-crossbuilder: An easier way to compile UQM for Windows
« Reply #1 on: November 08, 2012, 08:53:31 pm »

Very cool. I've had quite some issues with compiling for Windows before; either MSVC is being shit, MSYS doesn't want to coöperate, or MinGW conflicts with compilers on a proper Linux host.. This could be quite useful!

However, I thought that the entire workflow of this VM was a bit annoying with too much manual fiddling required, so I made a fork that uses Vagrant, Fabric and Puppet. It's available here.

The only requirements for the client are Vagrant and Fabric (and Virtualbox). Vagrant is very easy to install, but Fabric can be slightly annoying to install on Windows. See the readme.md file on GitHub for details.

To set up a build system via this new method, clone the Git repo and run the following command via a commandline shell:
Code:
fab init
This command will automatically download an Ubuntu 12.10 image, which will then get provisioned via Puppet and prodded to coöperate via Fabric itself.

To download the UQM source and extract it on a location that's accessible by your Host operating system (e.g Windows):
Code:
fab download_uqm_src

To build UQM:
Code:
fab build_uqm

EDIT: compiled .exes currently seem to crash due to some resource loading issue.
« Last Edit: November 08, 2012, 09:39:32 pm by Megagun » Logged
oldlaptop
*Smell* controller
****
Offline Offline

Posts: 337



View Profile
Re: uqm-crossbuilder: An easier way to compile UQM for Windows
« Reply #2 on: November 08, 2012, 10:50:55 pm »

EDIT: compiled .exes currently seem to crash due to some resource loading issue.

My suspicion is that for some reason zlib is not being found, and your UQM builds therefore lack support for compressed content packs. You might try modifying the UQM build system to link -lz instead of -lzdll, or some such thing.
Logged

Play Supermelee online in #uqm-arena!
Netmelee Improvement Mod
Megagun
Enlightened
*****
Offline Offline

Gender: Male
Posts: 580


Moo


View Profile
Re: uqm-crossbuilder: An easier way to compile UQM for Windows
« Reply #3 on: November 11, 2012, 03:42:32 pm »

Okay, I located the source of the issues I was having.
It was a DLL issue. The DLLs you distribute at https://github.com/oldlaptop/uqm-crossbuilder/downloads don't seem to work correctly, even when using your ISO/VM to build UQM. When I used the DLLs from a vanilla UQM installation, it worked. I'm guessing it was an issue with libpng and sdl-image, because the errors I was getting were about unsupported image formats:

Code:
Couldn't get cel data for 'base/ships/arilou/skiff-icons.ani'
'base/ships/arilou/skiff-meleeicons.ani' -- 66 bytes
_GetCelData: Unable to load image!
Gfx Driver reports: Unsupported image format
Logged
oldlaptop
*Smell* controller
****
Offline Offline

Posts: 337



View Profile
Re: uqm-crossbuilder: An easier way to compile UQM for Windows
« Reply #4 on: November 11, 2012, 07:25:49 pm »

Hmm, maybe there's something off with the libsdl_image DLL. Try swapping that one out, it's entirely possible it's building without all the image loaders it needs. You can also try testing with the DLL that actually ends up inside your VM (/usr/i686-w64-mingw32/bin/*.dll). (also, the ISO on the Github downloads page is out of date at this time, there's a new one going up sometime today)

When I used the DLLs from a vanilla UQM installation, it worked.

This is highly odd, I put that pack together precisely because it wasn't working for Gekko with vanilla DLLs. Tongue
Logged

Play Supermelee online in #uqm-arena!
Netmelee Improvement Mod
xigam
Zebranky food
*
Offline Offline

Posts: 3



View Profile
Re: uqm-crossbuilder: An easier way to compile UQM for Windows
« Reply #5 on: December 20, 2013, 10:04:16 pm »

Would this work to compile the HD version of Ur-Quan masters? I'm not having a lot of luck getting it to compile with VC++
Logged
oldlaptop
*Smell* controller
****
Offline Offline

Posts: 337



View Profile
Re: uqm-crossbuilder: An easier way to compile UQM for Windows
« Reply #6 on: December 21, 2013, 12:27:08 am »

There's no reason it shouldn't - I don't know if I still have an up-to-date ISO image up, but http://sourceforge.net/projects/oldlaptop.u/files/uqm-crossbuilder/uqm-crossbuilder-2013-08-06.iso/download should be fairly recent. I can be found on Freenode (#sc2) most GMT-5 evenings if you need help getting it to work Smiley
Logged

Play Supermelee online in #uqm-arena!
Netmelee Improvement Mod
xigam
Zebranky food
*
Offline Offline

Posts: 3



View Profile
Re: uqm-crossbuilder: An easier way to compile UQM for Windows
« Reply #7 on: December 31, 2013, 12:47:53 am »

Thanks..

I eventually got it to compile with VC++ but had some issues with the side menu once I went into the game. What was highlighted was not what was selected. I tought it might be because I had the content from the beta1 zip file and the source from sourceforge/git, so I grabbed r1338 from googlecode and got an weird issue with the starting up and fading between black and white but not running..

The copy on sourceforge is currently the most up to date version correct? And the SVN copy on googlecode is stale?

I'm going to try it again with VC++ will a fresh checkout from sourceforge, now that I finally tracked down all the required libs..

If that doesn't work I may give this cross-compiler another go..

Thanks for this update btw..
Logged
xigam
Zebranky food
*
Offline Offline

Posts: 3



View Profile
Re: uqm-crossbuilder: An easier way to compile UQM for Windows
« Reply #8 on: December 31, 2013, 02:20:34 am »

Well the weird issue with starting up and fading between white but not running had something to do with my virtual machine, running in on a real machine it went just fine.

And syncing the source folder and the content folder to the right versions corrected the menu glitch.. so I'm compiling and running now in VS 2008..

I also tried it on a Win8 PC and it complained about the side by side inistall.. I imagine Win8 is missing some 32bit files that were needed..

Thanks
Logged
oldlaptop
*Smell* controller
****
Offline Offline

Posts: 337



View Profile
Re: uqm-crossbuilder: An easier way to compile UQM for Windows
« Reply #9 on: February 08, 2014, 11:51:13 pm »

Github's filehosting service went away long ago - I can't edit the OP anymore, but the download link there is horrendously out of date. Current ISO images will be available here for the foreseeable future.
Logged

Play Supermelee online in #uqm-arena!
Netmelee Improvement Mod
Pages: [1] Print 
« previous next »
Jump to:  


Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!