mirror of
https://github.com/PancakeTAS/lsfg-vk.git
synced 2025-10-30 07:01:10 +00:00
test: update to use sharun
This commit is contained in:
parent
dedf7a892e
commit
abcbdbe950
5 changed files with 95 additions and 15 deletions
19
.github/workflows/build.yml
vendored
19
.github/workflows/build.yml
vendored
|
|
@ -19,40 +19,41 @@ jobs:
|
|||
- name: Install build dependencies
|
||||
uses: awalsh128/cache-apt-pkgs-action@latest
|
||||
with:
|
||||
packages: git wget
|
||||
packages: git wget xvfb
|
||||
clang clang-tools llvm rustup
|
||||
cmake ninja-build pkg-config
|
||||
libvulkan-dev
|
||||
libgtk-4-dev libadwaita-1-dev
|
||||
version: 1.0
|
||||
execute_install_scripts: true
|
||||
- name: Install rust dependencies
|
||||
- name: Install rust dependency
|
||||
run: |
|
||||
rustup default stable
|
||||
cargo install cargo-appimage
|
||||
wget -O ui/appimagetool https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-x86_64.AppImage
|
||||
chmod +x ui/appimagetool
|
||||
# build the project
|
||||
- name: Configure with CMake and Ninja
|
||||
run: |
|
||||
cmake -B build -G Ninja \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=./build-release
|
||||
-DCMAKE_INSTALL_PREFIX=./build-release \
|
||||
-DCMAKE_C_COMPILER=clang \
|
||||
-DCMAKE_CXX_COMPILER=clang++ \
|
||||
-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=On
|
||||
- name: Build with Ninja
|
||||
run: |
|
||||
ninja -C build
|
||||
- name: Install with CMake
|
||||
run: |
|
||||
cmake --install build --strip
|
||||
- name: Build lsfg-vk-ui with Cargo
|
||||
- name: Build lsfg-vk-ui with appimage.sh
|
||||
run: |
|
||||
pushd ui
|
||||
PATH=$PATH:$PWD cargo appimage
|
||||
chmod +x appimage.sh
|
||||
./appimage.sh
|
||||
popd
|
||||
- name: Install lsfg-vk-ui
|
||||
run: |
|
||||
mkdir -p build-release/bin
|
||||
mv ui/target/appimage/lsfg-vk-ui.AppImage build-release/bin/lsfg-vk-ui
|
||||
mv ui/lsfg-vk-ui.AppImage build-release/bin/lsfg-vk-ui
|
||||
# upload all files
|
||||
- name: Upload lsfg-vk artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
|
|
|
|||
|
|
@ -14,9 +14,3 @@ proc-maps = "0.4.0"
|
|||
|
||||
[build-dependencies]
|
||||
glib-build-tools = "0.21.0"
|
||||
|
||||
[package.metadata.appimage]
|
||||
auto_link = true
|
||||
auto_link_exclude_list = [
|
||||
"ld-linux*",
|
||||
]
|
||||
|
|
|
|||
72
ui/appimage.sh
Executable file
72
ui/appimage.sh
Executable file
|
|
@ -0,0 +1,72 @@
|
|||
#!/bin/sh
|
||||
set -eux
|
||||
|
||||
# AppImage build script provided by @Samueru-sama
|
||||
# (with removed aarch64 supported and removed update functionality, temporarily)
|
||||
|
||||
URUNTIME="https://github.com/VHSgunzo/uruntime/releases/latest/download/uruntime-appimage-dwarfs-x86_64"
|
||||
URUNTIME_LITE="https://github.com/VHSgunzo/uruntime/releases/latest/download/uruntime-appimage-dwarfs-lite-x86_64"
|
||||
SHARUN="https://github.com/VHSgunzo/sharun/releases/latest/download/sharun-x86_64-aio"
|
||||
|
||||
LIBXML_URL="https://github.com/pkgforge-dev/llvm-libs-debloated/releases/download/continuous/libxml2-iculess-x86_64.pkg.tar.zst"
|
||||
MESA_URL="https://github.com/pkgforge-dev/llvm-libs-debloated/releases/download/continuous/mesa-mini-x86_64.pkg.tar.zst"
|
||||
LLVM_URL="https://github.com/pkgforge-dev/llvm-libs-debloated/releases/download/continuous/llvm-libs-nano-x86_64.pkg.tar.zst"
|
||||
|
||||
VERSION=$(awk -F'=|"' '/^version/{print $3}' ./Cargo.toml)
|
||||
echo "$VERSION-dev" > ~/version
|
||||
|
||||
# grab required resources
|
||||
wget -O sharun-aio "$SHARUN"
|
||||
chmod +x sharun-aio
|
||||
|
||||
wget -O uruntime "$URUNTIME"
|
||||
wget -O uruntime-lite "$URUNTIME_LITE"
|
||||
chmod +x uruntime uruntime-lite
|
||||
|
||||
# build lsfg-vk-ui
|
||||
echo "Building lsfg-vk-ui..."
|
||||
cargo build --release # doesn't compile with debloated llvm
|
||||
|
||||
# install debloated dependencies
|
||||
echo "Installing debloated packages..."
|
||||
wget -O libxml2.pkg.tar.zst "$LIBXML_URL"
|
||||
wget -O mesa.pkg.tar.zst "$MESA_URL"
|
||||
wget -O llvm-libs.pkg.tar.zst "$LLVM_URL"
|
||||
|
||||
#pacman -U --noconfirm *.pkg.tar.zst
|
||||
rm -fv *.pkg.tar.zst
|
||||
|
||||
# deploy app directory
|
||||
echo "Deploying app directory..."
|
||||
mkdir -p AppDir
|
||||
cp -v rsc/*.desktop AppDir
|
||||
cp -v rsc/icon.png AppDir/lsfg-vk-ui.png
|
||||
cp -v rsc/icon.png AppDir/.DirIcon
|
||||
mkdir -p AppDir/shared/bin
|
||||
mv -v target/release/lsfg-vk-ui AppDir/shared/bin
|
||||
|
||||
cd AppDir
|
||||
xvfb-run -a ../sharun-aio l -p -v -e -s -k \
|
||||
shared/bin/lsfg-vk-ui \
|
||||
/usr/lib/gdk-pixbuf-*/*/loaders/* \
|
||||
/usr/lib/gio/modules/libdconfsettings.so
|
||||
ln -fv ./sharun ./AppRun
|
||||
./sharun -g
|
||||
cd ..
|
||||
|
||||
# create appimage
|
||||
echo "Generating app image..."
|
||||
./uruntime --appimage-mkdwarfs -f \
|
||||
--set-owner 0 --set-group 0 \
|
||||
--no-history --no-create-timestamp \
|
||||
--compression zstd:level=22 -S26 -B8 \
|
||||
--header uruntime-lite \
|
||||
-i ./AppDir -o "./lsfg-vk-ui.AppImage"
|
||||
|
||||
# cleanup
|
||||
echo "Cleaning up..."
|
||||
rm -rf AppDir
|
||||
rm -f sharun-aio uruntime uruntime-lite
|
||||
|
||||
# done
|
||||
echo "Done"
|
||||
13
ui/rsc/gay.pancake.lsfg-vk-ui.desktop
Normal file
13
ui/rsc/gay.pancake.lsfg-vk-ui.desktop
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
[Desktop Entry]
|
||||
Version=1.0
|
||||
Type=Application
|
||||
Name=lsfg-vk Configuration Window
|
||||
Comment=Easy to use configuration editor for lsfg-vk.
|
||||
Exec=lsfg-vk-ui %U
|
||||
Icon=gay.pancake.lsfg-vk-ui
|
||||
Terminal=false
|
||||
Categories=GTK;Settings;
|
||||
Keywords=gaming;graphics;configuration;
|
||||
StartupNotify=true
|
||||
StartupWMClass=gay.pancake.lsfg-vk-ui
|
||||
MimeType=application/x-lsfg-profile;
|
||||
BIN
ui/rsc/icon.png
Normal file
BIN
ui/rsc/icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.2 KiB |
Loading…
Add table
Reference in a new issue