mirror of
https://github.com/isledecomp/isle-portable.git
synced 2026-02-03 12:31:15 +00:00
Applied suggested changes and added asset install script
This commit is contained in:
parent
313133a89e
commit
3fb279d2b8
24
.github/workflows/release.yml
vendored
24
.github/workflows/release.yml
vendored
@ -4,7 +4,13 @@ on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- flatpak # TODO: Remove after testing
|
||||
- flatpak
|
||||
|
||||
env:
|
||||
APP_ID: org.legoisland.Isle
|
||||
APT_CACHE_DIRS: |
|
||||
/var/cache/apt/
|
||||
/var/lib/apt/lists/
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@ -40,11 +46,20 @@ jobs:
|
||||
${{ matrix.msys-env }}-clang-tools-extra
|
||||
${{ (matrix.config && format('{0}-qt6-base', matrix.msys-env)) || '' }}
|
||||
|
||||
# Get a small speed up by caching APT repo data between runs
|
||||
# `apt update` should now only run a full update if the cache is out of date
|
||||
- name: Cache APT data
|
||||
uses: actions/cache@v4
|
||||
if: ${{ matrix.linux }}
|
||||
with:
|
||||
path: ${{ env.APT_CACHE_DIRS }}
|
||||
key: apt-${{ runner.arch }}
|
||||
|
||||
- name: Install Linux dependencies (apt-get)
|
||||
if: ${{ matrix.linux }}
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y \
|
||||
sudo apt update
|
||||
sudo apt install -y \
|
||||
libx11-dev libxext-dev libxrandr-dev libxrender-dev libxfixes-dev libxi-dev libxinerama-dev \
|
||||
libxcursor-dev libwayland-dev libxkbcommon-dev wayland-protocols libgl1-mesa-dev libglew-dev qt6-base-dev \
|
||||
libasound2-dev
|
||||
@ -96,9 +111,6 @@ jobs:
|
||||
name: "Flatpak (${{ matrix.arch }})"
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
env:
|
||||
APP_ID: pizza.isle.Isle
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
|
||||
@ -1,25 +0,0 @@
|
||||
# Platform-Specific Build Dependencies
|
||||
|
||||
## Linux
|
||||
|
||||
### Fedora (42+)
|
||||
|
||||
- alsa-lib-devel
|
||||
- qt6-qtbase-devel
|
||||
- pipewire-devel
|
||||
- libwayland-client
|
||||
- libwayland-cursor
|
||||
- libwayland-egl
|
||||
- mesa-libEGL-devel
|
||||
- libxkbcommon-devel
|
||||
- libusb1-devel
|
||||
- libvorbis-devel
|
||||
- opusfile-devel
|
||||
|
||||
Full install command:
|
||||
|
||||
```bash
|
||||
dnf install alsa-lib-devel qt6-qtbase-devel pipewire-devel \
|
||||
libwayland-client libwayland-cursor libwayland-egl mesa-libEGL-devel \
|
||||
libxkbcommon-devel libusb1-devel libvorbis-devel opusfile-devel
|
||||
```
|
||||
@ -1,5 +1,5 @@
|
||||
set(APP_ID "pizza.isle.Isle")
|
||||
set(APP_NAME "Isle Decomp")
|
||||
set(APP_ID "org.legoisland.Isle")
|
||||
set(APP_NAME "Isle Portable")
|
||||
set(APP_SUMMARY "Portable version of the LEGO Island Decompilation Project")
|
||||
set(APP_SPDX "LGPL-3.0-or-later")
|
||||
set(QT_VERSION 6.8)
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
# Injects the required variables into the Desktop and MetaInfo files
|
||||
configure_file(isle_decomp.desktop.in "${APP_ID}.desktop" @ONLY)
|
||||
configure_file(isle_decomp.metainfo.xml.in "${APP_ID}.metainfo.xml" @ONLY)
|
||||
configure_file(isledecomp.desktop.in "${APP_ID}.desktop" @ONLY)
|
||||
configure_file(isledecomp.metainfo.xml.in "${APP_ID}.metainfo.xml" @ONLY)
|
||||
|
||||
# Injects the required variables into the Flatpak manifest
|
||||
if (CONFIGURE_FLATPAK)
|
||||
configure_file(flatpak/manifest.json.in "${APP_ID}.json" ESCAPE_QUOTES @ONLY)
|
||||
configure_file(flatpak/isledecomp.manifest.json.in "${APP_ID}.json" ESCAPE_QUOTES @ONLY)
|
||||
endif()
|
||||
35
packaging/linux/flatpak/install_desktop_assets.sh
Executable file
35
packaging/linux/flatpak/install_desktop_assets.sh
Executable file
@ -0,0 +1,35 @@
|
||||
#!/usr/bin/env bash
|
||||
# Install Desktop assets and Icons in a Flatpak build environment
|
||||
|
||||
APP_ID=$1
|
||||
|
||||
# Set up main constants
|
||||
ICON_INSTALL_DIR="${FLATPAK_DEST}/share/icons/hicolor"
|
||||
ICON_SIZES=(64 128) # TODO: Figure out why only the first element is being checked
|
||||
|
||||
# Rename and install SVG icon
|
||||
mv icons/isle.svg "icons/${APP_ID}.svg"
|
||||
install -Dm0644 "icons/${APP_ID}.svg" -t "${ICON_INSTALL_DIR}/scalable/apps/"
|
||||
|
||||
# Rename and install optional PNG icons
|
||||
for size in $ICON_SIZES; do
|
||||
icon="icons/${APP_ID}_${size}.png"
|
||||
if [ ! -f "${icon}" ]; then
|
||||
# Skip if icon doesn't exist
|
||||
echo "\"${icon}\" not present. Skipping..."
|
||||
continue
|
||||
fi
|
||||
mv "${icon}" "icons/${APP_ID}.png"
|
||||
|
||||
icon="icons/${APP_ID}.png"
|
||||
size_sq="${size}x${size}"
|
||||
target_dir="${ICON_INSTALL_DIR}/${size_sq}/apps/"
|
||||
|
||||
mkdir -p "${target_dir}"
|
||||
install -Dm0644 "${icon}" -t "${target_dir}"
|
||||
echo "Installed ${size_sq} icon"
|
||||
done
|
||||
|
||||
# Install Desktop file and AppStream data
|
||||
install -Dm0644 "${APP_ID}.desktop" -t "${FLATPAK_DEST}/share/applications/"
|
||||
install -Dm0644 "${APP_ID}.metainfo.xml" -t "${FLATPAK_DEST}/share/metainfo/"
|
||||
@ -84,9 +84,9 @@
|
||||
"buildsystem": "simple",
|
||||
"sources": [
|
||||
{
|
||||
"type": "file",
|
||||
"dest-filename": "@APP_ID@.svg",
|
||||
"path": "@CMAKE_CURRENT_SOURCE_DIR@/../icons/isle.svg"
|
||||
"type": "dir",
|
||||
"dest": "icons",
|
||||
"path": "@CMAKE_CURRENT_SOURCE_DIR@/../icons/"
|
||||
},
|
||||
{
|
||||
"type": "file",
|
||||
@ -95,12 +95,16 @@
|
||||
{
|
||||
"type": "file",
|
||||
"path": "./@APP_ID@.metainfo.xml"
|
||||
},
|
||||
{
|
||||
"type": "file",
|
||||
"path": "@CMAKE_CURRENT_SOURCE_DIR@/flatpak/install_desktop_assets.sh",
|
||||
"dest-filename": "fp_install.sh"
|
||||
}
|
||||
],
|
||||
"build-commands": [
|
||||
"install -Dm0644 @APP_ID@.svg -t ${FLATPAK_DEST}/share/icons/hicolor/scalable/apps/",
|
||||
"install -Dm0644 @APP_ID@.desktop -t ${FLATPAK_DEST}/share/applications/",
|
||||
"install -Dm0644 @APP_ID@.metainfo.xml -t ${FLATPAK_DEST}/share/metainfo/"
|
||||
"chmod +x ./fp_install.sh",
|
||||
"./fp_install.sh @APP_ID@"
|
||||
]
|
||||
}
|
||||
]
|
||||
@ -18,6 +18,8 @@
|
||||
</developer>
|
||||
|
||||
<url type="homepage">https://github.com/isledecomp/isle-portable</url>
|
||||
<url type="contribute">https://github.com/isledecomp/isle-portable/blob/master/CONTRIBUTING.md</url>
|
||||
<url type="vcs-browser">https://github.com/isledecomp/isle-portable/tree/master</url>
|
||||
<url type="bugtracker">https://github.com/isledecomp/isle-portable/issues</url>
|
||||
|
||||
<metadata_license>MIT</metadata_license>
|
||||
@ -81,6 +83,6 @@
|
||||
</keywords>
|
||||
|
||||
<releases>
|
||||
<release version="@PROJECT_VERSION@-@GIT_HASH@" type="development" date="@BUILD_DATE@"/>
|
||||
<release version="@PROJECT_VERSION@+@GIT_HASH@" type="development" date="@BUILD_DATE@"/>
|
||||
</releases>
|
||||
</component>
|
||||
Loading…
Reference in New Issue
Block a user