On 11 Jan, 2014, at 14:28 , Ulrich Schmidt <u.sch.zw@gmx.de> wrote:
Ok i will give luadist a try :)
I stepped away from gcc after hex-dumping my exe and searching for ".dll". I found libgcc_s_dw2-1.dll and i was assuming my exe requires this dll.
To double-check i downloaded Dependency Walker and cant find a reference to libgcc_s_dw2-1.dll.
May be this string is a artefact of some sort. Ok, new try using gcc :)
You can avoid this dependency in MinGW by linking with the following flags:
-static-libgcc -static-libstdc++
In LuaDist you can add the following lines to lib/lua/dist/config.lua to avoid it entirely.
-- Static Linking (For MinGW)
CMAKE_EXE_LINKER_FLAGS = "-static-libgcc -static-libstdc++ -static",
CMAKE_SHARED_LINKER_FLAGS = "-static-libgcc -static-libstdc++ -static",
CMAKE_MODULE_LINKER_FLAGS = "-static-libgcc -static-libstdc++ -static”,
Another more common approach is to simply copy the runtime dll into the same directory as your application. The binaries available on luadist.org use this but I plan to change it to the above defaults for the next release.
Maybe you could also elaborate on your requirements for
"self-contained" application. If by this you mean a application that
has all its dependencies contained in a single directory then LuaDist
is exactly designed for this. If you need a single executable with no
additional files then you need to be aware that you will still need to
link against certain libraries dynamically anyway if specified in the
associated license. This severally limits this type of deployment.
I know my scenario is not the standard one. Big companies have a computer guy who is able to install any program on all nessesary computers. I am a hobby programmer and sometimes i try to help to replace outdated software. small companies have no computer guy. the employes are specialists of some sort but computer. the worst thing that can happen is, they try to install somthing blindly following a instruction not aware of possible side effects. so i try to avoid any interference with existing software.
On the other hand i love to code in lua because it is most easy compared to pascal,c,java, even basic. i reuse some self written lua modules and i dont want, someone easily use a text viewer to pull out my lua sources out of my srlua-exe. so i finally use luajit, precompile the lua source (including preloaded lua modules) and glue the chunk with statically linked srlua. It is no fireproof solution against steeling but it helps to keep lions sleeping.
I see. In my opinion the approach Cameyo and other “app virtualization” tools use is more suitable for this purpose, some even allow encryption of the packed binaries.
pd