mirror of
https://github.com/isledecomp/isle-portable.git
synced 2026-02-03 12:31:15 +00:00
[flatpak] Created \'packaging\' directory and added integration with CMake
This commit is contained in:
parent
7f35971e4a
commit
4e80a96dda
6
.github/workflows/release.yml
vendored
6
.github/workflows/release.yml
vendored
@ -4,6 +4,7 @@ on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- flatpak # TODO: Remove after testing
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@ -115,11 +116,14 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Configure Package Scripts
|
||||
run: cmake -S . -B build -GNinja -DCONFIGURE_FLATPAK=ON
|
||||
|
||||
- name: Build Flatpak
|
||||
uses: flatpak/flatpak-github-actions/flatpak-builder@v6
|
||||
with:
|
||||
bundle: ${{ env.APP_ID }}.${{ matrix.arch }}.flatpak
|
||||
manifest-path: flatpak/${{ env.APP_ID }}.json
|
||||
manifest-path: build/packaging/linux/flatpak/${{ env.APP_ID }}.json
|
||||
arch: ${{ matrix.arch }}
|
||||
|
||||
release:
|
||||
|
||||
@ -2,6 +2,15 @@ cmake_minimum_required(VERSION 3.25...4.0 FATAL_ERROR)
|
||||
|
||||
project(isle LANGUAGES CXX C VERSION 0.1)
|
||||
|
||||
option(CONFIGURE_FLATPAK "Configure required Flatpak data and exit" OFF)
|
||||
if (NOT DEFINED ENV{FLATPAK_DEST})
|
||||
add_subdirectory(packaging EXCLUDE_FROM_ALL)
|
||||
endif()
|
||||
if (CONFIGURE_FLATPAK)
|
||||
# Exit early since the remaining configuration will otherwise fail
|
||||
return()
|
||||
endif()
|
||||
|
||||
if (EMSCRIPTEN)
|
||||
add_compile_options(-pthread)
|
||||
add_link_options(-sALLOW_MEMORY_GROWTH=1 -sMAXIMUM_MEMORY=2gb -sUSE_PTHREADS=1 -sPROXY_TO_PTHREAD=1 -sPTHREAD_POOL_SIZE_STRICT=0 -sFORCE_FILESYSTEM=1 -sWASMFS=1 -sEXIT_RUNTIME=1)
|
||||
|
||||
19
packaging/CMakeLists.txt
Normal file
19
packaging/CMakeLists.txt
Normal file
@ -0,0 +1,19 @@
|
||||
set(APP_ID "pizza.isle.Isle")
|
||||
set(APP_NAME "Isle Decomp")
|
||||
set(APP_SUMMARY "Portable version of the LEGO Island Decompilation Project")
|
||||
set(QT_VERSION 6.8)
|
||||
|
||||
string(TIMESTAMP BUILD_DATE UTC)
|
||||
|
||||
# Following block sourced from https://jonathanhamberg.com/post/cmake-embedding-git-hash/
|
||||
# Get the latest abbreviated commit hash of the working branch
|
||||
execute_process(
|
||||
COMMAND git log -1 --format=%h
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
|
||||
OUTPUT_VARIABLE GIT_HASH
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
|
||||
# TODO: Generate minfied SVG icon and PNG variants
|
||||
|
||||
add_subdirectory(linux EXCLUDE_FROM_ALL)
|
||||
|
Before Width: | Height: | Size: 8.0 KiB After Width: | Height: | Size: 8.0 KiB |
8
packaging/linux/CMakeLists.txt
Normal file
8
packaging/linux/CMakeLists.txt
Normal file
@ -0,0 +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)
|
||||
|
||||
# Injects the required variables into the Flatpak manifest
|
||||
if (CONFIGURE_FLATPAK)
|
||||
configure_file(flatpak/manifest.json.in "${APP_ID}.json" ESCAPE_QUOTES @ONLY)
|
||||
endif()
|
||||
@ -1,23 +0,0 @@
|
||||
[Desktop Entry]
|
||||
Version=1.5
|
||||
|
||||
Name=Isle Decomp
|
||||
Comment=LEGO Island decompilation project
|
||||
Icon=pizza.isle.Isle
|
||||
Type=Application
|
||||
Categories=Game;KidsGame;AdventureGame;Qt
|
||||
Keywords=LEGO;lego;LEGO Island
|
||||
SingleMainWindow=true
|
||||
|
||||
TryExec=isle
|
||||
Exec=isle
|
||||
|
||||
Actions=play;configure
|
||||
|
||||
[Desktop Action play]
|
||||
Name=Play Game
|
||||
Exec=isle
|
||||
|
||||
[Desktop Action configure]
|
||||
Name=Configure Settings
|
||||
Exec=config
|
||||
@ -1,51 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<component type="desktop-application">
|
||||
<id>pizza.isle.Isle</id>
|
||||
|
||||
<name>Isle Decomp</name>
|
||||
<summary>LEGO Island decompilation project</summary>
|
||||
|
||||
<metadata_license>MIT</metadata_license>
|
||||
<project_license>GPL-3.0-or-later</project_license>
|
||||
|
||||
<recommends>
|
||||
<display_length compare="ge">640</display_length>
|
||||
</recommends>
|
||||
<supports>
|
||||
<control>pointing</control>
|
||||
<control>keyboard</control>
|
||||
<control>gamepad</control>
|
||||
</supports>
|
||||
|
||||
<description>
|
||||
<h1>
|
||||
LEGO Island, portable
|
||||
</h1>
|
||||
<p>
|
||||
This initiative is a portable version of LEGO Island (Version 1.1, English) based on the <a href="https://github.com/isledecomp/isle">decompilation project</a>. Our primary goal is to transform the codebase to achieve platform independence, thereby enhancing compatibility across various systems while preserving the original game's experience as faithfully as possible.
|
||||
</p>
|
||||
<p>
|
||||
Please note: this project is dedicated to achieving platform independence without altering the core gameplay, adding new features, enhancing visual quality, or rewriting code for improvement's sake. While those are worthwhile objectives, they are not within the scope of this project.
|
||||
</p>
|
||||
</description>
|
||||
|
||||
<categories>
|
||||
<category>Game</category>
|
||||
<category>KidsGame</category>
|
||||
<category>AdventureGame</category>
|
||||
<category>Qt</category>
|
||||
</categories>
|
||||
|
||||
<keywords>
|
||||
<keyword translate="no">LEGO</keyword>
|
||||
<keyword translate="no">lego</keyword>
|
||||
<keyword>LEGO Island</keyword>
|
||||
</keywords>
|
||||
|
||||
<url>
|
||||
<homepage>https://github.com/isledecomp/isle-portable</homepage>
|
||||
<bugtracker>https://github.com/isledecomp/isle-portable/issues</bugtracker>
|
||||
</url>
|
||||
|
||||
<launchable type="desktop-id">pizza.isle.Isle.desktop</launchable>
|
||||
</component>
|
||||
107
packaging/linux/flatpak/manifest.json.in
Normal file
107
packaging/linux/flatpak/manifest.json.in
Normal file
@ -0,0 +1,107 @@
|
||||
{
|
||||
"id": "@APP_ID@",
|
||||
|
||||
"runtime": "org.kde.Platform",
|
||||
"sdk": "org.kde.Sdk",
|
||||
"runtime-version": "@QT_VERSION@",
|
||||
|
||||
"command": "isle",
|
||||
|
||||
"finish-args": [
|
||||
"--share=ipc",
|
||||
"--socket=wayland",
|
||||
"--socket=fallback-x11",
|
||||
"--socket=pulseaudio",
|
||||
"--device=dri",
|
||||
"--device=input",
|
||||
"--filesystem=/run/media/:ro",
|
||||
"--filesystem=/media/:ro",
|
||||
"--filesystem=/mnt/:ro"
|
||||
],
|
||||
|
||||
"modules": [
|
||||
{
|
||||
"name": "isle",
|
||||
"buildsystem": "cmake-ninja",
|
||||
"config-opts": [
|
||||
"-DCMAKE_BUILD_TYPE=RelWithDebInfo",
|
||||
"-DISLE_DEBUG=OFF"
|
||||
],
|
||||
"sources": [
|
||||
{
|
||||
"type": "dir",
|
||||
"path": "@PROJECT_SOURCE_DIR@/3rdparty",
|
||||
"dest": "3rdparty/"
|
||||
},
|
||||
{
|
||||
"type": "dir",
|
||||
"path": "@PROJECT_SOURCE_DIR@/cmake",
|
||||
"dest": "cmake/"
|
||||
},
|
||||
{
|
||||
"type": "dir",
|
||||
"path": "@PROJECT_SOURCE_DIR@/CMake",
|
||||
"dest": "CMake/"
|
||||
},
|
||||
{
|
||||
"type": "dir",
|
||||
"path": "@PROJECT_SOURCE_DIR@/CONFIG",
|
||||
"dest": "CONFIG/"
|
||||
},
|
||||
{
|
||||
"type": "dir",
|
||||
"path": "@PROJECT_SOURCE_DIR@/ISLE",
|
||||
"dest": "ISLE/"
|
||||
},
|
||||
{
|
||||
"type": "dir",
|
||||
"path": "@PROJECT_SOURCE_DIR@/LEGO1",
|
||||
"dest": "LEGO1/"
|
||||
},
|
||||
{
|
||||
"type": "dir",
|
||||
"path": "@PROJECT_SOURCE_DIR@/miniwin",
|
||||
"dest": "miniwin/"
|
||||
},
|
||||
{
|
||||
"type": "dir",
|
||||
"path": "@PROJECT_SOURCE_DIR@/util",
|
||||
"dest": "util/"
|
||||
},
|
||||
{
|
||||
"type": "file",
|
||||
"path": "@PROJECT_SOURCE_DIR@/CMakeLists.txt"
|
||||
}
|
||||
],
|
||||
"build-options": {
|
||||
"build-args": [
|
||||
"--share=network"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "desktop-assets",
|
||||
"buildsystem": "simple",
|
||||
"sources": [
|
||||
{
|
||||
"type": "file",
|
||||
"dest-filename": "@APP_ID@.svg",
|
||||
"path": "@CMAKE_CURRENT_SOURCE_DIR@/../icons/isle.svg"
|
||||
},
|
||||
{
|
||||
"type": "file",
|
||||
"path": "./@APP_ID@.desktop"
|
||||
},
|
||||
{
|
||||
"type": "file",
|
||||
"path": "./@APP_ID@.metainfo.xml"
|
||||
}
|
||||
],
|
||||
"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/"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -1,68 +0,0 @@
|
||||
{
|
||||
"id": "pizza.isle.Isle",
|
||||
|
||||
"runtime": "org.kde.Platform",
|
||||
"sdk": "org.kde.Sdk",
|
||||
"runtime-version": "6.8",
|
||||
|
||||
"command": "isle",
|
||||
|
||||
"finish-args": [
|
||||
"--share=ipc",
|
||||
"--socket=wayland",
|
||||
"--socket=fallback-x11",
|
||||
"--socket=pulseaudio",
|
||||
"--device=dri",
|
||||
"--device=input",
|
||||
"--filesystem=/run/media/:ro",
|
||||
"--filesystem=/media/:ro",
|
||||
"--filesystem=/mnt/:ro"
|
||||
],
|
||||
|
||||
"modules": [
|
||||
{
|
||||
"name": "isle",
|
||||
"buildsystem": "cmake-ninja",
|
||||
"config-opts": [
|
||||
"-DCMAKE_BUILD_TYPE=RelWithDebInfo",
|
||||
"-DISLE_DEBUG=OFF"
|
||||
],
|
||||
"sources": [
|
||||
{
|
||||
"type": "git",
|
||||
"url": "https://github.com/isledecomp/isle-portable.git",
|
||||
"branch": "master"
|
||||
}
|
||||
],
|
||||
"build-options": {
|
||||
"build-args": [
|
||||
"--share=network"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "desktop-assets",
|
||||
"buildsystem": "simple",
|
||||
"sources": [
|
||||
{
|
||||
"type": "file",
|
||||
"dest-filename": "pizza.isle.Isle.svg",
|
||||
"path": "desktop/isle_icon.svg"
|
||||
},
|
||||
{
|
||||
"type": "file",
|
||||
"path": "desktop/pizza.isle.Isle.desktop"
|
||||
},
|
||||
{
|
||||
"type": "file",
|
||||
"path": "desktop/pizza.isle.Isle.metainfo.xml"
|
||||
}
|
||||
],
|
||||
"build-commands": [
|
||||
"install -Dm0644 pizza.isle.Isle.svg -t ${FLATPAK_DEST}/share/icons/hicolor/scalable/apps/",
|
||||
"install -Dm0644 pizza.isle.Isle.desktop -t ${FLATPAK_DEST}/share/applications/",
|
||||
"install -Dm0644 pizza.isle.Isle.metainfo.xml -t ${FLATPAK_DEST}/share/metainfo/"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
32
packaging/linux/isle_decomp.desktop.in
Normal file
32
packaging/linux/isle_decomp.desktop.in
Normal file
@ -0,0 +1,32 @@
|
||||
[Desktop Entry]
|
||||
Version=1.5
|
||||
|
||||
Name=@APP_NAME@
|
||||
Comment=@APP_SUMMARY@
|
||||
|
||||
Icon=@APP_ID@
|
||||
Type=Application
|
||||
Categories=Game;KidsGame;AdventureGame;Qt
|
||||
|
||||
Keywords=LEGO;lego;LEGO Island
|
||||
Keywords[es]=LEGO;lego;La Isla LEGO
|
||||
Keywords[fr]=LEGO;lego;Aventures sur L'île LEGO
|
||||
Keywords[it]=LEGO;lego;Isola LEGO
|
||||
Keywords[de]=LEGO;lego;Abenteuer auf der LEGO Insel
|
||||
Keywords[jp]=LEGO;lego;レゴアイランドの大冒険
|
||||
Keywords[pt_BR]=LEGO;lego;A Ilha LEGO
|
||||
|
||||
SingleMainWindow=true
|
||||
|
||||
TryExec=isle
|
||||
Exec=isle
|
||||
|
||||
Actions=play;configure
|
||||
|
||||
[Desktop Action play]
|
||||
Name=Play Game
|
||||
Exec=isle
|
||||
|
||||
[Desktop Action configure]
|
||||
Name=Configure Settings
|
||||
Exec=config
|
||||
86
packaging/linux/isle_decomp.metainfo.xml.in
Normal file
86
packaging/linux/isle_decomp.metainfo.xml.in
Normal file
@ -0,0 +1,86 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Freedesktop AppStream metadata file (https://www.freedesktop.org/software/appstream/docs) -->
|
||||
|
||||
<component type="desktop-application">
|
||||
<id>@APP_ID@</id>
|
||||
|
||||
<name>@APP_NAME@</name>
|
||||
<summary>@APP_SUMMARY@</summary>
|
||||
|
||||
<launchable type="desktop-id">@APP_ID@.desktop</launchable>
|
||||
|
||||
<branding>
|
||||
<color type="primary">#e3000b</color>
|
||||
</branding>
|
||||
|
||||
<developer id="io.github.isledecomp">
|
||||
<name>Isle Decomp Team</name>
|
||||
</developer>
|
||||
|
||||
<url type="homepage">https://github.com/isledecomp/isle-portable</url>
|
||||
<url type="bugtracker">https://github.com/isledecomp/isle-portable/issues</url>
|
||||
|
||||
<metadata_license>MIT</metadata_license>
|
||||
<project_license>GPL-3.0-or-later</project_license>
|
||||
|
||||
<requires>
|
||||
<display_length side="longest" compare="ge">640</display_length>
|
||||
<internet>offline-only</internet>
|
||||
</requires>
|
||||
|
||||
<recommends>
|
||||
<memory>128</memory>
|
||||
</recommends>
|
||||
|
||||
<supports>
|
||||
<control>pointing</control>
|
||||
<control>keyboard</control>
|
||||
<control>gamepad</control>
|
||||
</supports>
|
||||
|
||||
<description>
|
||||
<p> This initiative is a portable version of LEGO Island (Version 1.1, English)
|
||||
based on the decompilation project. Our primary goal is to transform the codebase to achieve
|
||||
platform independence, thereby enhancing compatibility across various systems while preserving
|
||||
the original game's experience as faithfully as possible.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Please note: this project is dedicated to achieving platform independence without altering the
|
||||
core gameplay, adding new features, enhancing visual quality, or rewriting code for
|
||||
improvement's sake. While those are worthwhile objectives, they are not within the scope
|
||||
of this project.
|
||||
</p>
|
||||
|
||||
</description>
|
||||
|
||||
<content_rating type="oars-1.1">
|
||||
<content_attribute id="violence-cartoon">mild</content_attribute>
|
||||
<content_attribute id="language-humor">mild</content_attribute>
|
||||
</content_rating>
|
||||
|
||||
<categories>
|
||||
<category>Game</category>
|
||||
<category>KidsGame</category>
|
||||
<category>AdventureGame</category>
|
||||
<category>Qt</category>
|
||||
</categories>
|
||||
|
||||
<keywords>
|
||||
<keyword translate="no">LEGO</keyword>
|
||||
<keyword translate="no">lego</keyword>
|
||||
|
||||
<keyword>LEGO Island</keyword>
|
||||
<!-- Translations sourced from https://www.pcgamingwiki.com/wiki/Lego_Island#Localizations -->
|
||||
<keyword xml:lang="fr">Aventures sur L'île LEGO</keyword>
|
||||
<keyword xml:lang="de">Abenteuer auf der LEGO Insel</keyword>
|
||||
<keyword xml:lang="it">Isola LEGO</keyword>
|
||||
<keyword xml:lang="es">La Isla LEGO</keyword>
|
||||
<keyword xml:lang="jp">レゴアイランドの大冒険</keyword>
|
||||
<keyword xml:lang="pt-BR">A Ilha LEGO</keyword>
|
||||
</keywords>
|
||||
|
||||
<releases>
|
||||
<release version="@PROJECT_VERSION@-@GIT_HASH@" type="development" date="@BUILD_DATE@"/>
|
||||
</releases>
|
||||
</component>
|
||||
Loading…
Reference in New Issue
Block a user