Linux AppImage + build scripts infra

main
Elijah Voigt 1 year ago
parent eb0c327053
commit a92c5112e7

14
.gitignore vendored

@ -20,7 +20,6 @@ trace-*.json
*.blend *.blend
*.blend1 *.blend1
# Don't need this # Don't need this
.vscode/ .vscode/
@ -28,14 +27,19 @@ trace-*.json
temp/ temp/
*.zip # MacOS .package/.dmg related files
*.tar.gz
.DS_Store .DS_Store
*.dmg *.dmg
!platforms/macos/Martian\ Chess.app/Contents/Info.plist !platforms/macos/Martian\ Chess.app/Contents/Info.plist
platforms/macos platforms/macos
icon_*.png icon_*.png
*.iconset *.iconset
*.icns *.icns
# Linux AppImage related build files
platforms/linux
AppRun
*.AppImage
*.zip
*.tar.gz
.DirIcon

@ -0,0 +1,6 @@
[Desktop Entry]
Name=MartianChess
Exec=martian-chess
Icon=martian-chess
Type=Application
Categories=Game;BoardGame;

@ -0,0 +1,3 @@
#!/usr/bin/env bash
cargo run --target x86_64-unknown-linux-gnu --release

@ -0,0 +1,3 @@
#!/usr/bin/env bash
cp media/MartianChess.png platforms/linux/MartianChess.AppDir/martian-chess.png

@ -1,5 +1,23 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# cargo build --release APP_DIR=platforms/linux/MartianChess.AppDir/
tar -czvf martian-chess-linux-beta.tar.gz --exclude windows ./lib ./assets -C ./target/release martian-chess # Copy binary to build dir
TARGET_DIR=target/x86_64-unknown-linux-gnu/release/
BUILD_BIN=$TARGET_DIR/martian-chess
PACKAGE_BIN=$APP_DIR/AppRun
cp -f $BUILD_BIN $PACKAGE_BIN
# Copy dynamic libraries
PACKAGE_LIB_DIR=$APP_DIR/usr/lib/
LIB_DIR=lib/linux/
mkdir -p $PACKAGE_LIB_DIR
cp -f $LIB_DIR/* $PACKAGE_LIB_DIR/
# Copy assets
cp -rf assets $APP_DIR/
# Build AppImage file
DEST_DIR=packages/MartianChess.AppImage
ARCH=x86_64
appimagetool $APP_DIR $DEST_DIR

@ -20,6 +20,7 @@ mkShell rec {
libxkbcommon wayland # To use the wayland feature libxkbcommon wayland # To use the wayland feature
gimp gimp
ffmpeg ffmpeg
appimagekit # Building appimages
]; ];
LD_LIBRARY_PATH = lib.makeLibraryPath buildInputs; LD_LIBRARY_PATH = lib.makeLibraryPath buildInputs;

Loading…
Cancel
Save