Page 1 of 1

How to make windows executables (On Linux)

PostPosted: Tuesday, 8th May 2018, 15:30
by Vajrapani
Okay, so my OS is Linux Mint, and I want to create windows binaries so people on windows do not have to compile my fork themselves to play it.

How do I make this :
https://github.com/Vajrapani/X-Crawl

into a nice windows executable? What I've read so far only deals with making single files into single executables, rather than something as big as the crawl codebase.

Re: How to make windows executables (On Linux)

PostPosted: Tuesday, 8th May 2018, 16:35
by advil
There's some brief discussion of how to do cross-compiling here. Basically, install the mingw cross-compiling environment as appropriate under your distro, and run the build command described there.

Re: How to make windows executables (On Linux)

PostPosted: Wednesday, 9th May 2018, 18:59
by Vajrapani
EDIT: Solved my own problem.

I wasn't using git at all, I was just making changes manually on my machine, then editing it on the github website. That was was dumb, and led to submodules missing.

Re: How to make windows executables (On Linux)

PostPosted: Wednesday, 9th May 2018, 19:11
by advil
So, did you run both of:

  Code:
git submodule init
git submodule update
?

:D

Re: How to make windows executables (On Linux)

PostPosted: Wednesday, 9th May 2018, 19:27
by Vajrapani
:P. I wasn't using git like a dumbass.

Re: How to make windows executables (On Linux)

PostPosted: Wednesday, 9th May 2018, 20:42
by Vajrapani
Ok, so the windows executable has been made, but I get this at the end:

  Code:
if i686-w64-mingw32-g++ -dumpmachine|grep -q x86_64; \
     then WINARCH=win64; else WINARCH=win32; fi; \
   makensis -NOCD -DVERSION=0.22-a0-425-g8dc0c08 -DWINARCH="$WINARCH" util/crawl.nsi
/bin/sh: 3: makensis: not found
make: *** [package-windows] Error 127


Apparently you can't get nsis on linux, and makensis can't be gotten easily with a 'apt-get install', and the file has been made succesfully (I guess?), so is this a big error, and I do I need 'makensis' on Linux?

Re: How to make windows executables (On Linux)

PostPosted: Wednesday, 9th May 2018, 22:47
by Siegurt
Vajrapani wrote:Ok, so the windows executable has been made, but I get this at the end:

  Code:
if i686-w64-mingw32-g++ -dumpmachine|grep -q x86_64; \
     then WINARCH=win64; else WINARCH=win32; fi; \
   makensis -NOCD -DVERSION=0.22-a0-425-g8dc0c08 -DWINARCH="$WINARCH" util/crawl.nsi
/bin/sh: 3: makensis: not found
make: *** [package-windows] Error 127


Apparently you can't get nsis on linux, and makensis can't be gotten easily with a 'apt-get install', and the file has been made succesfully (I guess?), so is this a big error, and I do I need 'makensis' on Linux?

to get 'makensis':
https://blog.alejandrocelaya.com/2014/0 ... -in-linux/

Technically you don't need the windows installer at all, you can just zip up the requisite stuff and send it and have your friends unzip it where it goes, the installer is just a nicety that puts things in the right places.

Re: How to make windows executables (On Linux)

PostPosted: Wednesday, 9th May 2018, 22:57
by Vajrapani
Oh, I see. Then I should have used the
  Code:
 make CROSSHOST=i686-w64-mingw32 package-windows-zips
to just get the zip files.

rather than using
  Code:
 make CROSSHOST=i686-w64-mingw32 package-windows
and needing makensis

Thanks :D