Beginner step by step instruction to build .exe
I have difficulties with understanding how to compile or build something. The only thing that I can use is Lua.
So I want to get help with step by step explaination how to setup LuaPower, what I need to install and ho to build the .exe (I have Windows x64)
I've installed Luapower from site, Windows bash, Msys. Thanks.
When I tried to run
sh ...bundle.shI'm getting this:
shopt: command not found C:\lua\luapower-all-master\.mgit\bundle.sh: .mgit\platform.sh: No such file or directory Unable to set platform.
Ok. That was in examples on site. :D
Can you correct me if I'm wrong?
mgit bundle -a --all -m --all -M main -o fat.exe
-a means what .dll libraries I want to include in .exe
-m means what .lua modules I want to include in .exe
-M means what .lua file is main loader for .exe
-o is output of file :p
-a is for static libs, -d is for dynamic libs, -m is for modules.
I've seen what does it print. For best realizing I wanted to ask again.
How can I understand which libraries in luapower are dymanic and which static?
As I'm in Lua. I know only 2 things: .lua modules and .dll modules
... and what I keep trying to say is that you need to know a lot more than those 2 things :) The information is there as far as luapower is concerned (https://luapower.com/get-involved, https://luapower.com/tree), but you need to know what you're doing.
Ok. I've found modules and static libraries, but no dynamic libraries (dylib i guess). Did I missed them somewhere?
Tried to compile just one file. Finally I've reached my goal to make an .exe!
Also, how I realised, bundle can detect which modules I need if I had
Bundle can't detect which modules you need. You have to pass in all the modules that your program is dependent on. Dynamic libraries are .dll files in Windows (dylib is for Macs).
I bundeled winapi-demo and it works without -m and -a arguments.
Is this a auto-detect or builtin?
Neither. The reason that it works is because the exe is in the luapower directory where all the modules and binary libs can be found at runtime, see https://luapower.com/bundle#how-it-works
Well. Seems like I did it.
Thanks you for agreeing to help me from the beginning. Also thanks for this project and its heading.
I will leave instruction on how I did it:
Required knowledge: windows command line commands (simple) and PATH variable editing
- Install GitHub Desktop
C:\Users\*Your UserName*\AppData\Local\GitHubDesktop\app-1.5.1\resources\app\git\cmdto PATH
- Install MSYS
- Copy files from
msys/bin(bash.exe is in it) and move them to
- Install MINGW 32-bit or MINGW 64-bit respectively.
*path to mingw*/binto PATH
- Win + R. Type
cmdto open console
git clone https://github.com/capr/multigit luapower
mgit clone https://github.com/luapower/luapower-repos
mgit clone-alland wait
- See bundle commands list. Test that everything is working:
mgit bundle -o fat.exe