Updated core library and AppImage building script

This commit is contained in:
Observer KRypt0n_ 2022-08-04 15:59:52 +02:00
parent bf31327532
commit a425c3cddf
No known key found for this signature in database
GPG key ID: 844DA47BA25FE1E2
8 changed files with 34 additions and 10 deletions

1
.gitignore vendored
View file

@ -1,5 +1,6 @@
/target /target
/assets/ui/.dist /assets/ui/.dist
/scripts/builds
/scripts/appimage/dist /scripts/appimage/dist
/scripts/appimage/*.AppImage /scripts/appimage/*.AppImage

2
Cargo.lock generated
View file

@ -31,7 +31,7 @@ dependencies = [
[[package]] [[package]]
name = "anime-game-core" name = "anime-game-core"
version = "0.3.1" version = "0.3.2"
dependencies = [ dependencies = [
"bzip2", "bzip2",
"curl", "curl",

View file

@ -36,9 +36,6 @@ cargo build --release
### Building AppImage ### Building AppImage
Important to run it from the `scripts/appimage` folder
``` ```
cd scripts/appimage ./scripts/build.sh
./build_appimage.sh
``` ```

@ -1 +1 @@
Subproject commit 4009dc5bfe93d4b56437bda4f484affe9c5170f2 Subproject commit 7c1279a6c3df8ea1eda70064aaa5b7b340aef4ce

View file

@ -1,5 +1,5 @@
[Desktop Entry] [Desktop Entry]
Name=An Anime Game Launcher Name=An Anime Game Launcher GTK
Icon=icon Icon=icon
Exec=AppRun Exec=AppRun
Type=Application Type=Application

View file

@ -1,9 +1,14 @@
#!/bin/bash #!/bin/bash
cd "$(dirname "$0")"
linuxdeploy="linuxdeploy-x86_64.AppImage" linuxdeploy="linuxdeploy-x86_64.AppImage"
appimagetool="appimagetool-x86_64.AppImage" appimagetool="appimagetool-x86_64.AppImage"
version="0.3.1" icon="../../assets/images/icon.png"
release_bin="../../target/release/anime-game-launcher"
version=$(awk '/^version = "(.+)"$/{print substr($3, 2, length($3) - 2)}' '../../Cargo.toml')
if [ ! -f $linuxdeploy ]; if [ ! -f $linuxdeploy ];
then then
@ -30,12 +35,17 @@ fi
mkdir dist mkdir dist
cp "../../target/release/anime-game-launcher" "dist/anime-game-launcher" cp $release_bin "dist/anime-game-launcher"
echo "Executing LinuxDeploy..." echo "Executing LinuxDeploy..."
./$linuxdeploy --appdir dist -d anime-game-launcher.desktop --custom-apprun run.sh -i icon.png -o appimage ./$linuxdeploy --appdir dist -d anime-game-launcher.desktop --custom-apprun run.sh -i $icon -o appimage
echo "Executing AppImageTool..." echo "Executing AppImageTool..."
VERSION=$version ./$appimagetool dist VERSION=$version ./$appimagetool dist
rm -rf dist
rm -f An_Anime_Game_Launcher_GTK-x86_64.AppImage
cp An_Anime_Game_Launcher_GTK-$version-x86_64.AppImage ../builds/an-anime-game-launcher-gtk-$version.AppImage

Binary file not shown.

Before

Width:  |  Height:  |  Size: 274 KiB

16
scripts/build.sh Executable file
View file

@ -0,0 +1,16 @@
#!/bin/bash
curr_dir=$(dirname "$0")
cd $(dirname $curr_dir)
cargo build --release
cd $curr_dir
rm -rf builds
mkdir builds
cp ../target/release/anime-game-launcher builds/anime-game-launcher
./appimage/build_appimage.sh