I noticed that the way GCC runs on Windows heavily depends on the local setup (Cygwin, Mingw, Msys, etc..).
This is how to get straight to the goal without much care for a clean build process.
..first of all let me suggest to try the pre-packaged development environment crested by the MAME team to build their emulator, it can be unzipped without needing to be installed and is complete (and updated) enough to provide the two parallel environments for MinGW32 and MingGw64. I worked on the shell provided by mingw64.exe.
So, get a ZIP pacparser snapshot from the github code tree, extract it somewhere, and move into src/spidermonkey.
THE TRAP HERE WAS THE WAY 'jskwgen' WAS CALLED, A 'MISSING ./' PATH SPECIFIER ENDS UP IN CREATING AN EMPTY 'jsautokw.h' FILE.
An empty file would still permit the build process to succeed, BUT THE RESULTING LIBRARY WON'T WORK CORRECTLY.
The remaining part of the Makefiles should work, thus:
make -f Makefile.win32
..or use the regular Makefile if you're on Unix.
Now pick the library you've got and move one level up:
mv js.lib ..
cd ..
Since our goal is to get a standalone executable, let's skip the DLL/shared library stuff, we just knit the modules together (change -DXP_WIN to -DXP_UNIX if you're not on Windows):
You might want to edit pacparser.c and fix the output message for the '-v' parameter, a good practice is to state it is a custom build based on a snapshot, including the point in time of the shapshot.
======
== EXTRA STEP FOR WINDOWS BUILDS, TO USE THE CURRENT CLIENT IP ADDRESS WHEN NOT SPECIFIED
Want more? Ok then, edit 'pactester.c', and include also:
include
Then locate 'int main(' and add more local variables:
I noticed that the way GCC runs on Windows heavily depends on the local setup (Cygwin, Mingw, Msys, etc..). This is how to get straight to the goal without much care for a clean build process. ..first of all let me suggest to try the pre-packaged development environment crested by the MAME team to build their emulator, it can be unzipped without needing to be installed and is complete (and updated) enough to provide the two parallel environments for MinGW32 and MingGw64. I worked on the shell provided by mingw64.exe.
So, get a ZIP pacparser snapshot from the github code tree, extract it somewhere, and move into src/spidermonkey.
now let's build the code generator for the js keywords and run it:
THE TRAP HERE WAS THE WAY 'jskwgen' WAS CALLED, A 'MISSING ./' PATH SPECIFIER ENDS UP IN CREATING AN EMPTY 'jsautokw.h' FILE. An empty file would still permit the build process to succeed, BUT THE RESULTING LIBRARY WON'T WORK CORRECTLY.
The remaining part of the Makefiles should work, thus:
..or use the regular Makefile if you're on Unix. Now pick the library you've got and move one level up:
Since our goal is to get a standalone executable, let's skip the DLL/shared library stuff, we just knit the modules together (change -DXP_WIN to -DXP_UNIX if you're not on Windows):
It should do the trick.
You might want to edit pacparser.c and fix the output message for the '-v' parameter, a good practice is to state it is a custom build based on a snapshot, including the point in time of the shapshot.
====== == EXTRA STEP FOR WINDOWS BUILDS, TO USE THE CURRENT CLIENT IP ADDRESS WHEN NOT SPECIFIED
Want more? Ok then, edit 'pactester.c', and include also:
include
Then locate 'int main(' and add more local variables:
..now spot the client_ip definition, it should be:
...change to:
Now use the same command line as before to build it.