Search code examples
gccmakefilemingw32

Building InstallJammer's installkit on Windows


I'm using InstallJammer to build cross-platform installers for my application (Windows, Linux & Mac). However, InstallJammer development has been discontinued and the official forum is now closed.

I need to build the installkit for Windows, because I'll have to make some changes to the Windows install manifest, in order to add Windows 7 support (otherwise the installer displays the message "This program might not have installed correctly").

I grabbed the latest installkit sources from here: http://sourceforge.net/projects/installjammer/files/installkit/1.2.15/installkit-1.2.15.tar.gz/download

I found this topic http://www.installjammer.com/forums/viewtopic.php?f=3&p=9258 which helped me get started.

I grabbed latest version of MinGW and typed ./configure && make. It started the build process, but there was this error while trying to compile TCL:

c:/installkit-1.2.15/src/tcl/win/tclWinReg.c:750:29: error: lvalue required as increment operand

Since these sources are kind of old, I figured I should try with an older GCC version (I was using 4.7.2). So I downgraded MinGW's GCC to version 3.4.5 and tried again.

This time, TCL built fine. Everything was going well, until it failed to build something called 'miniarc' (I don't know what it is), with the following error message:

miniarc.o:miniarc.c:(.text+0x370c): undefined reference to `_imp__strtoull'
miniarc.o:miniarc.c:(.text+0x37c9): undefined reference to `_imp__strtoull'
miniarc.o:miniarc.c:(.text+0x3cb6): undefined reference to `_imp__strtoull'
miniarc.o:miniarc.c:(.text+0x3e78): undefined reference to `_imp__strtoull'
miniarc.o:miniarc.c:(.text+0x3e9f): undefined reference to `_imp__strtoull'
miniarc.o:miniarc.c:(.text+0x3ff5): more undefined references to `_imp__strtoull' follow
collect2: ld returned 1 exit status

Strange thing is that there's no reference to imp_strtoull inside miniarc.c.

Moving on, I tried to build it in Ubuntu, since I didn't know what else to do, and it worked! GCC version was 4.4.3. So I went and searched for GCC 4.4.3 for MinGW, but the closest version was 4.4.0. I grabbed these and tried again. Same tcl build error (regarding tclWinReg.c).

Then I went back to GCC 4.7.2 and replaced TCL & TK sources (8.4) with the latest ones (8.5) and tried again.

TCL and TK both built fine, and so did some other libs, but when it came to 'miniarc', it failed again. This time with a different error:

undefined reference to `TclIncrVar2'

Apparently, this function no longer exists in TCL 8.5.

So, I'm out of ideas. I even tried emailing the original (and only) InstallJammer developer, but still got no answer (I don't even know if his email is the same).

Does anyone have any suggestions?

EDIT: I should add that I have very little experience with Makefiles and the last time I coded in C was 8 years ago in college. So, I apologize if there is something obvious about all this that I didn't notice.


Solution

  • I don't like the solution, but here's how I got it working:

    1. Using GCC 3.4.5, I started the make process by typing ./configure && make;
    2. The make process stops with an error (mentioned above) when it reaches 'miniarc';
    3. Then, manually, I built a DLL (strtoull.dll) from file strtoull.o (below is the exact command-line I typed);

      gcc -pipe -shared -o strtoull.dll strtoull.o -lz -L/c/installkit-1.2.15/Windows/lib /c/installkit-1.2.15/Windows/lib/libtclstub84s.a"
      
    4. After that, I copied strtoull.dll to miniarc/build and to windows/system32;

    5. Then I entered folder miniarc/build and typed:

      gcc -pipe -shared -o miniarc01.dll miniarc.o sha1.o md5.o -lz -L/c/installkit-1.2.15/Windows/lib  "/c/installkit-1.2.15/Windows/lib/libtclstub84s.a" strtoull.dll
      
    6. Finally, I typed make again so it could continue building the rest of the stuff.