macOS build and package
This commit is contained in:
parent
61a2a2c4e5
commit
4976602c0a
6
build.sh
6
build.sh
|
@ -11,6 +11,12 @@ if [[ $* == *windows* ]]; then
|
|||
lflags="$lflags -Lwinlib/SDL2-2.0.10/x86_64-w64-mingw32/lib"
|
||||
lflags="-lmingw32 -lSDL2main $lflags -mwindows -o $outfile res.res"
|
||||
x86_64-w64-mingw32-windres res.rc -O coff -o res.res
|
||||
elif [[ $* == *macos* ]]; then
|
||||
platform="macos"
|
||||
outfile="lite-osx"
|
||||
compiler="gcc"
|
||||
cflags="$cflags -DLUA_USE_POSIX"
|
||||
lflags="$lflags -mmacosx-version-min=10.8 -o $outfile"
|
||||
else
|
||||
platform="unix"
|
||||
outfile="lite"
|
||||
|
|
|
@ -1,10 +1,13 @@
|
|||
#!/bin/bash
|
||||
./build.sh release windows
|
||||
./build.sh release macos
|
||||
./build.sh release
|
||||
rm lite.zip 2>/dev/null
|
||||
cp winlib/SDL2-2.0.10/x86_64-w64-mingw32/bin/SDL2.dll SDL2.dll
|
||||
strip lite
|
||||
strip lite-osx
|
||||
strip lite.exe
|
||||
strip SDL2.dll
|
||||
zip lite.zip lite lite.exe SDL2.dll data -r
|
||||
|
||||
cp lite-osx macos/lite.app/Contents/MacOS/
|
||||
cp -R data macos/lite.app/Contents/MacOS/
|
||||
zip lite.zip lite macos/lite.app lite.exe SDL2.dll data -r
|
||||
|
|
Binary file not shown.
|
@ -0,0 +1,18 @@
|
|||
local keymap = require "core.keymap"
|
||||
|
||||
local on_key_pressed = keymap.on_key_pressed
|
||||
local on_key_released = keymap.on_key_released
|
||||
|
||||
local function remap_key(k)
|
||||
return k:gsub("command", "ctrl")
|
||||
:gsub("option", "alt")
|
||||
end
|
||||
|
||||
function keymap.on_key_pressed(k)
|
||||
return on_key_pressed(remap_key(k))
|
||||
end
|
||||
|
||||
function keymap.on_key_released(k)
|
||||
return on_key_released(remap_key(k))
|
||||
end
|
||||
|
Binary file not shown.
Loading…
Reference in New Issue