Flatpak Build Support (#407)

This commit is contained in:
Brenden Davidson 2025-06-29 14:04:08 -05:00 committed by GitHub
parent 77bbbfe2ca
commit 6e7347621c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
11 changed files with 453 additions and 2 deletions

View File

@ -14,3 +14,8 @@ trim_trailing_whitespace = true
[{CMakeLists.txt,*.cmake}]
indent_size = 2
insert_final_newline = true
[*.{json,xml.in,desktop.in}]
indent_size = 2
insert_final_newline = true

4
.gitattributes vendored
View File

@ -5,3 +5,7 @@
*.html text eol=lf diff=html
*.mdp binary
*.mak text eol=crlf
**/*.ico binary
**/*.png binary
**/*.svg text eol=lf
**/*.desktop text eol=lf

View File

@ -91,15 +91,45 @@ jobs:
path: |
build/dist/isle-*
flatpak:
name: "Flatpak (${{ matrix.arch }})"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- arch: x86_64
os: ubuntu-latest
- arch: aarch64
os: ubuntu-22.04-arm
container:
image: ghcr.io/flathub-infra/flatpak-github-actions:kde-6.8
options: --privileged
steps:
- uses: actions/checkout@v4
- name: Build Flatpak
uses: flatpak/flatpak-github-actions/flatpak-builder@v6
with:
bundle: org.legoisland.Isle.${{ matrix.arch }}.flatpak
manifest-path: packaging/linux/flatpak/org.legoisland.Isle.json
arch: ${{ matrix.arch }}
release:
name: 'Release'
runs-on: ubuntu-latest
needs: build
needs:
- build
- flatpak
steps:
- name: Download All Artifacts
uses: actions/download-artifact@main
with:
pattern: Release-*
pattern: "{Release-*,*.flatpak}"
path: Release
merge-multiple: true

6
.gitignore vendored
View File

@ -30,3 +30,9 @@ LEGO1.DLL
# Kate - Text
/.cache
# Flatpak build cache
**/.flatpak-builder/
# Flatpak build dir
**/flatpak-build/

View File

@ -643,6 +643,8 @@ if(EMSCRIPTEN)
)
endif()
add_subdirectory(packaging)
set(CPACK_PACKAGE_DIRECTORY "dist")
set(CPACK_PACKAGE_FILE_NAME "isle-${PROJECT_VERSION}-${ISLE_PACKAGE_NAME}-${CMAKE_SYSTEM_PROCESSOR}")
if(MSVC)

19
packaging/CMakeLists.txt Normal file
View File

@ -0,0 +1,19 @@
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")
string(TIMESTAMP BUILD_DATE UTC)
# The following will need to be refined if we wish to post actual releases to a repo such as Flathub
if(DEFINED ENV{GITHUB_ACTIONS} AND ENV{GITHUB_ACTIONS} EQUAL TRUE)
# Use the sequential run# of the current pipeline when running in GH Actions
set(SEMANTIC_VERSION "${PROJECT_VERSION}~build$ENV{GITHUB_RUN_NUMBER}")
else()
# Don't worry about the build number for local builds
set(SEMANTIC_VERSION "${PROJECT_VERSION}")
endif()
if(LINUX)
add_subdirectory(linux)
endif()

161
packaging/icons/isle.svg Normal file
View File

@ -0,0 +1,161 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="180"
height="180"
viewBox="0 0 180 180"
version="1.1"
id="svg1"
xml:space="preserve"
inkscape:version="1.4.2 (ebf0e940d0, 2025-05-08)"
sodipodi:docname="isle_icon.svg"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/"><title
id="title19">LEGO Island Icon</title><sodipodi:namedview
id="namedview1"
pagecolor="#505050"
bordercolor="#eeeeee"
borderopacity="1"
inkscape:showpageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#505050"
inkscape:document-units="px"
inkscape:zoom="3.2222222"
inkscape:cx="99.931034"
inkscape:cy="94.034483"
inkscape:window-width="2560"
inkscape:window-height="1371"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="layer2" /><defs
id="defs1" /><g
inkscape:groupmode="layer"
id="layer2"
inkscape:label="Sun"
style="display:inline"><circle
style="fill:#ffff00;fill-opacity:1;stroke-width:6.09858"
id="path1"
cx="16.087624"
cy="16.087624"
r="16.087624" /><g
id="g7"
inkscape:label="Rays"
transform="scale(6.0985759)"><path
style="fill:#ffff00;fill-opacity:1;stroke:#ffff00;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
d="M 1.512931,6.2456897 V 10.74569"
id="path2" /><path
style="fill:#ffff00;fill-opacity:1;stroke:#ffff00;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
d="m 10.922387,1.4939611 h -4.5"
id="path3" /><path
style="fill:#ffff00;fill-opacity:1;stroke:#ffff00;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
d="M 3.5838432,6.4674267 4.802595,10.158437"
id="path4" /><path
style="fill:#ffff00;fill-opacity:1;stroke:#ffff00;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
d="m 5.4215806,5.3718411 3.20707,2.1962729"
id="path6" /><path
style="fill:#ffff00;fill-opacity:1;stroke:#ffff00;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
d="m 6.3519773,3.3961872 3.6866627,1.23184"
id="path7" /></g></g><g
inkscape:groupmode="layer"
id="layer3"
inkscape:label="House"
style="display:inline"><g
id="g11"
inkscape:label="Wall"
style="display:inline"
transform="scale(6.0985759)"><rect
style="fill:#ffff00;fill-opacity:1;stroke:#ffff00;stroke-width:1.31354;stroke-linecap:butt;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
id="rect7"
width="21.557148"
height="2.960166"
x="5.2214251"
y="25.898151" /><rect
style="fill:#ffff00;fill-opacity:1;stroke:#ffff00;stroke-width:1.31354;stroke-linecap:butt;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
id="rect9"
width="21.557148"
height="2.960166"
x="5.2214251"
y="13.077032" /><rect
style="fill:#ff0000;fill-opacity:1;stroke:#ff0000;stroke-width:1.31354;stroke-linecap:butt;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
id="rect10"
width="21.557148"
height="2.960166"
x="5.2214251"
y="21.624445" /><rect
style="fill:#0000ff;fill-opacity:1;stroke:#0000ff;stroke-width:1.31354;stroke-linecap:butt;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
id="rect11"
width="21.557148"
height="2.960166"
x="5.2214251"
y="17.350739" /></g><g
id="g16"
inkscape:label="Window"
transform="scale(6.0985759)"><rect
style="display:inline;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:1.46119;stroke-linecap:butt;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:1"
id="rect12"
width="9.0243168"
height="11.312326"
x="11.487842"
y="13.257705" /><rect
style="fill:#00ffff;fill-opacity:1;stroke:#00ffff;stroke-width:0.498507;stroke-linecap:butt;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
id="rect13"
width="3.3376997"
height="4.0214062"
x="11.928134"
y="13.989297" /><rect
style="fill:#00ffff;fill-opacity:1;stroke:#00ffff;stroke-width:0.498507;stroke-linecap:butt;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
id="rect14"
width="3.3376997"
height="4.0214062"
x="16.719082"
y="13.989297" /><rect
style="fill:#00ffff;fill-opacity:1;stroke:#00ffff;stroke-width:0.547494;stroke-linecap:butt;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
id="rect15"
width="3.288712"
height="4.9228497"
x="11.952628"
y="19.056892" /><rect
style="fill:#00ffff;fill-opacity:1;stroke:#00ffff;stroke-width:0.547494;stroke-linecap:butt;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
id="rect16"
width="3.288712"
height="4.9228497"
x="16.743576"
y="19.056892" /></g></g><g
inkscape:groupmode="layer"
id="layer4"
inkscape:label="Roof"><g
id="g19"
inkscape:label="Antenna"
transform="scale(6.0985759)"><path
style="fill:#ff0000;fill-opacity:1;stroke:#000000;stroke-width:0.75;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
d="M 21.510776,1.2025862 V 9.1163793"
id="path17" /><path
style="fill:#ff0000;fill-opacity:1;stroke:#000000;stroke-width:0.75;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
d="m 18.363745,0.526459 6.294062,4.7971783"
id="path18" /><path
style="fill:#ff0000;fill-opacity:1;stroke:#000000;stroke-width:0.75;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
d="m 18.99097,3.2200622 4.951565,3.7739605"
id="path19" /></g><path
style="display:inline;fill:#ff0000;fill-opacity:1;stroke:#ff0000;stroke-width:3.04929;stroke-linecap:butt;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
d="M 19.991237,75.943041 H 173.06023 L 150.40272,51.317332 h -7.63224 l -5.01561,6.189336 h -7.47182 l -4.27253,-8.057106 h -7.58654 l -4.56632,8.057106 h -8.00228 l -4.6922,-8.057106 h -7.441784 l -4.178171,8.057106 h -8.447839 l -3.904314,-8.057106 h -7.225947 l -4.362281,8.057106 h -8.610195 l -5.453345,-6.189336 h -6.082013 z"
id="path16"
sodipodi:nodetypes="ccccccccccccccccccccc"
inkscape:label="Roof" /></g><metadata
id="metadata19"><rdf:RDF><cc:Work
rdf:about=""><dc:title>LEGO Island Icon</dc:title><dc:date>2025-06-22</dc:date><cc:license
rdf:resource="http://creativecommons.org/licenses/by-nc/4.0/" /></cc:Work><cc:License
rdf:about="http://creativecommons.org/licenses/by-nc/4.0/"><cc:permits
rdf:resource="http://creativecommons.org/ns#Reproduction" /><cc:permits
rdf:resource="http://creativecommons.org/ns#Distribution" /><cc:requires
rdf:resource="http://creativecommons.org/ns#Notice" /><cc:requires
rdf:resource="http://creativecommons.org/ns#Attribution" /><cc:prohibits
rdf:resource="http://creativecommons.org/ns#CommercialUse" /><cc:permits
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" /></cc:License></rdf:RDF></metadata></svg>

After

Width:  |  Height:  |  Size: 8.0 KiB

View File

@ -0,0 +1,7 @@
# Injects the required variables into the Desktop and MetaInfo files
configure_file(isledecomp.desktop.in "${APP_ID}.desktop" @ONLY)
configure_file(isledecomp.metainfo.xml.in "${APP_ID}.metainfo.xml" @ONLY)
install(FILES "../icons/isle.svg" RENAME "${APP_ID}.svg" DESTINATION "share/icons/hicolor/scalable/apps")
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${APP_ID}.desktop" DESTINATION "share/applications")
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${APP_ID}.metainfo.xml" DESTINATION "share/metainfo")

View File

@ -0,0 +1,89 @@
{
"id": "org.legoisland.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",
"--filesystem=home:ro"
],
"modules": [
{
"name": "isle",
"buildsystem": "cmake-ninja",
"config-opts": [
"-DCMAKE_BUILD_TYPE=RelWithDebInfo",
"-DISLE_DEBUG=OFF"
],
"sources": [
{
"type": "dir",
"path": "../../../3rdparty",
"dest": "3rdparty/"
},
{
"type": "dir",
"path": "../../../cmake",
"dest": "cmake/"
},
{
"type": "dir",
"path": "../../../CMake",
"dest": "CMake/"
},
{
"type": "dir",
"path": "../../../CONFIG",
"dest": "CONFIG/"
},
{
"type": "dir",
"path": "../../../ISLE",
"dest": "ISLE/"
},
{
"type": "dir",
"path": "../../../LEGO1",
"dest": "LEGO1/"
},
{
"type": "dir",
"path": "../../../miniwin",
"dest": "miniwin/"
},
{
"type": "dir",
"path": "../../../packaging",
"dest": "packaging/"
},
{
"type": "dir",
"path": "../../../util",
"dest": "util/"
},
{
"type": "file",
"path": "../../../CMakeLists.txt"
}
],
"build-options": {
"build-args": [
"--share=network"
]
}
}
]
}

View File

@ -0,0 +1,37 @@
[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[da]=LEGO;lego;Panik på LEGO Øen
Keywords[de]=LEGO;lego;Abenteuer auf der LEGO Insel
Keywords[es]=LEGO;lego;La Isla LEGO
Keywords[fr]=LEGO;lego;Aventures sur L'île LEGO
Keywords[it]=LEGO;lego;Isola LEGO
Keywords[ja]=LEGO;lego;
Keywords[ko]=LEGO;lego;
Keywords[pt]=LEGO;lego;A Ilha LEGO
Keywords[ru]=LEGO;lego;Остров LEGO
SingleMainWindow=true
TryExec=isle
Exec=isle
Actions=play;configure
[Desktop Action play]
Name=Play Game
Icon=currenttrack_play
Exec=isle
[Desktop Action configure]
Name=Configure Settings
Icon=settings
Exec=isle-config

View File

@ -0,0 +1,91 @@
<?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="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>
<project_license>@APP_SPDX@</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="da">Panik på LEGO Øen</keyword>
<keyword xml:lang="de">Abenteuer auf der LEGO Insel</keyword>
<keyword xml:lang="es">La Isla LEGO</keyword>
<keyword xml:lang="fr">Aventures sur L'île LEGO</keyword>
<keyword xml:lang="it">Isola LEGO</keyword>
<keyword xml:lang="ja">レゴアイランドの大冒険</keyword>
<keyword xml:lang="ko">레고 아일랜드</keyword>
<keyword xml:lang="pt">A Ilha LEGO</keyword>
<keyword xml:lang="ru">Остров LEGO</keyword>
</keywords>
<releases>
<release version="@SEMANTIC_VERSION@" type="development" date="@BUILD_DATE@" />
</releases>
</component>