View Full Version : trying to make ProjectX a small standalone executable
stax76
18th April 2016, 19:37
I'm trying to make ProjectX (command line only, GUI is not needed) a small standalone executable, one solution I found is avian but I have a problem with the install instruction found here:
https://github.com/ReadyTalk/avian/blob/d9650be5701becf7b5d2d38b48f445c655d8d04f/README.md
it says:
$ git clone git@github.com:ReadyTalk/win64.git ../win64
$ export JAVA_HOME="C:/Program Files/Java/jdk1.7.0_45"
$ make
$ build/windows-x86_64/avian -cp build/windows-x86_64/test Hello
I use msys2 and get this error:
Frank@DESKTOP-EBTU8L3 MSYS ~
$ cd /home/avian
Frank@DESKTOP-EBTU8L3 MSYS /home/avian
$ make
make: *** No targets specified and no makefile found. Stop.
LoRd_MuldeR
18th April 2016, 22:02
Don't know about Avian or whether it can work with ProjectX, but there is always launch4j which can convert any JAR file into a native Windows executable:
http://launch4j.sourceforge.net/
The JRE will of course still need to be installed on the target computer, because this pretty much creates a standard ZIP/JAR file with a small EXE header to locate+launch the JRE on itself.
I use msys2 and get this error:
Frank@DESKTOP-EBTU8L3 MSYS ~
$ cd /home/avian
Frank@DESKTOP-EBTU8L3 MSYS /home/avian
$ make
make: *** No targets specified and no makefile found. Stop.
So, is there a file called "Makefile" in the directory where you were trying to run the "make" command? :confused:
stax76
18th April 2016, 22:29
I made some progress but again getting an error:
Frank@DESKTOP-EBTU8L3 MINGW64 /home/avian
$ make platform=windows
compiling build/windows-x86_64/system/posix-build.o
src/system/posix.cpp:1:0: warning: -fPIC ignored for target (all code is position independent)
/* Copyright (c) 2008-2015, Avian Contributors
^
src/system/posix.cpp:34:22: fatal error: ucontext.h: No such file or directory
compilation terminated.
makefile:2104: recipe for target 'build/windows-x86_64/system/posix-build.o' failed
make: *** [build/windows-x86_64/system/posix-build.o] Error 1
there are two ucontext.h files
D:\Software\msys2\usr\include\sys
D:\Software\msys2\usr\include
the files have a different file size, apparently the compiler can't find either
LoRd_MuldeR
19th April 2016, 18:32
I think this looks like something is messed up with your build environment: The directory "usr/include" is one of the standard system directories, that the compiler searches (or: should search) for header files.
Having said that, I think the Avian code uses #include "ucontext.h" where it should be using #include <ucontext.h> instead :sly:
The former syntax searches for the header file relative to the source file's location, while the latter syntax searches for the header file in standard system include directories. Clearly, the latter one would be the correct choice here.
Nonetheless, even #include "ucontext.h" should fall back to the standard system directories when the file is not found otherwise. So that's probably not the main problem...
(BTW: The files in "usr/include/sys" should only be used if the program explicitly includes sys/something.h. Otherwise, if it simply includes something.h, the program almost certainly wants the file from "usr/include")
stax76
19th April 2016, 19:46
Thanks for the help, I created a thread in the avian google group, as I expected things involving C++ and Linux are a little bit complicated... :)
https://groups.google.com/forum/#!topic/avian/wNjCOY2DGKw
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.