Skip to content

Commit

Permalink
update build scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
sniper00 committed Nov 5, 2024
1 parent d993b15 commit 9b21208
Showing 1 changed file with 3 additions and 14 deletions.
17 changes: 3 additions & 14 deletions premake5.lua
Original file line number Diff line number Diff line change
Expand Up @@ -317,17 +317,6 @@ newaction {
linux = function ()
os.execute("premake5 gmake2")
os.execute("make -j4 config=release")
os.execute([[
#!/bin/bash
if objdump --section-headers "moon" | grep -q ".debug_info"; then
objcopy --only-keep-debug moon moon.debug
objcopy --only-keep-debug liblua.so liblua.so.debug
strip moon
strip liblua.so
objcopy --add-gnu-debuglink=moon.debug moon
objcopy --add-gnu-debuglink=liblua.so.debug liblua.so
fi
]])
end,
macosx = function ()
os.execute("premake5 gmake2 --cc=clang")
Expand All @@ -350,7 +339,7 @@ newaction {
os.execute("if exist moon-windows.zip del /f moon-windows.zip")
os.execute("if not exist clib mkdir clib")
os.execute("echo Compressing files into moon-windows.zip...")
os.execute("powershell Compress-Archive -Path moon.exe, lua.dll, lualib, service, clib, README.md -DestinationPath moon-windows.zip ")
os.execute("powershell Compress-Archive -Path moon.exe, lua.dll, lualib, service, clib, example, README.md -DestinationPath moon-windows.zip ")
os.execute("echo Checking if moon-windows.zip was created...")
os.execute("if exist moon-windows.zip (echo moon-windows.zip created successfully.) else (echo Failed to create moon-windows.zip.)")
end,
Expand All @@ -359,15 +348,15 @@ newaction {
#!/bin/bash
rm -f moon-linux.zip
mkdir -p clib
zip -r moon-linux.zip moon liblua.so lualib service clib/*.so moon.debug liblua.so.debug README.md
zip -r moon-linux.zip moon liblua.so lualib service clib/*.so README.md example
]])
end,
macosx = function ()
os.execute([[
#!/bin/bash
rm -f moon-macosx.zip
mkdir -p clib
zip -r moon-macosx.zip moon liblua.dylib lualib service clib/*.dylib README.md
zip -r moon-macosx.zip moon liblua.dylib lualib service clib/*.dylib README.md example
]])
end,
}
Expand Down

0 comments on commit 9b21208

Please sign in to comment.