diff --git a/.gitignore b/.gitignore index dedd4c0..54d662c 100644 --- a/.gitignore +++ b/.gitignore @@ -5,14 +5,14 @@ android/keystore android/keystore.properties /.idea .DS_Store -/build /captures .externalNativeBuild .cxx *.so -/target -/.cargo/ -/app/src/main/jniLibs -/scripts/macos/Grim.app/Contents/MacOS/grim-bin -/scripts/macos/cert.pem +target +.cargo/ +app/src/main/jniLibs +scripts/macos/Grim.app/Contents/MacOS/grim-bin +scripts/macos/cert.pem +scripts/linux/Grim.AppDir/AppRun .intentionally-empty-file.o \ No newline at end of file diff --git a/Cargo.toml b/Cargo.toml index 4c0871e..8814a69 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,11 +12,10 @@ build = "src/build/build.rs" [package.metadata.bundle] name = "Grim" identifier = "mw.gri" -icon = ["img/icon.png", "img/128x128.png", "img/128x128@2x.png"] +icon = ["img/icon.png"] version = "0.1.0" resources = ["img"] -copyright = "Copyright (c) Grim 2024. All rights reserved." -category = "public.app-category.finance" +category = "Finance" short_description = "Cross-platform GUI for Grin." long_description = """ Cross-platform GUI for Grin on Rust with focus on usability and availability to be used by anyone, anywhere. diff --git a/scripts/build_run_android.sh b/scripts/android.sh similarity index 100% rename from scripts/build_run_android.sh rename to scripts/android.sh diff --git a/scripts/build_run.sh b/scripts/desktop.sh similarity index 100% rename from scripts/build_run.sh rename to scripts/desktop.sh diff --git a/scripts/linux/Grim.AppDir/.DirIcon b/scripts/linux/Grim.AppDir/.DirIcon new file mode 120000 index 0000000..0573ded --- /dev/null +++ b/scripts/linux/Grim.AppDir/.DirIcon @@ -0,0 +1 @@ +grim.png \ No newline at end of file diff --git a/scripts/linux/Grim.AppDir/grim.desktop b/scripts/linux/Grim.AppDir/grim.desktop new file mode 100644 index 0000000..907cf68 --- /dev/null +++ b/scripts/linux/Grim.AppDir/grim.desktop @@ -0,0 +1,6 @@ +[Desktop Entry] +Name=Grim +Exec=grim +Icon=grim +Type=Application +Categories=Finance \ No newline at end of file diff --git a/scripts/linux/Grim.AppDir/grim.png b/scripts/linux/Grim.AppDir/grim.png new file mode 100644 index 0000000..b176447 Binary files /dev/null and b/scripts/linux/Grim.AppDir/grim.png differ diff --git a/scripts/release_linux.sh b/scripts/release_linux.sh new file mode 100755 index 0000000..8abca1d --- /dev/null +++ b/scripts/release_linux.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +case $1 in + x86|arm) + ;; + *) + echo "Usage: release_macos.sh [platform]\n - platform: 'x86', 'arm'" >&2 + exit 1 +esac + +# Setup build directory +BASEDIR=$(cd $(dirname $0) && pwd) +cd ${BASEDIR} +cd .. + +# Setup platform argument +[[ $1 == "x86" ]] && arch+=(x86_64-unknown-linux-gnu) +[[ $1 == "arm" ]] && arch+=(aarch64-unknown-linux-gnu) + +# Start release build with zig linker for cross-compilation +cargo install cargo-zigbuild +cargo zigbuild --release --target ${arch} + +# Create AppImage with https://github.com/AppImage/appimagetool +cp target/${arch}/release/grim scripts/linux/Grim.AppDir/AppRun +rm target/${arch}/release/*.AppImage +appimagetool scripts/linux/Grim.AppDir +mv *.AppImage target/${arch}/release/Grim-0.1.0-linux-$1.AppImage \ No newline at end of file diff --git a/scripts/release_macos.sh b/scripts/release_macos.sh index 3a48464..1e9a68f 100755 --- a/scripts/release_macos.sh +++ b/scripts/release_macos.sh @@ -35,7 +35,7 @@ yes | cp -rf target/${arch}/release/grim scripts/macos/Grim.app/Contents/MacOS/g ### Sign .app before distribution: ### rcodesign generate-self-signed-certificate -### rcodesign sign --pem-file test.pem scripts/macos/Grim.app +### rcodesign sign --pem-file cert.pem scripts/macos/Grim.app # Create release package FILE_NAME=Grim-0.1.0-macos-$1.zip