Skip to content

Commit c8f70fb

Browse files
Initial app image test
1 parent f4045f2 commit c8f70fb

File tree

16 files changed

+529
-54
lines changed

16 files changed

+529
-54
lines changed

.github/workflows/dotnet.yml

Lines changed: 112 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,16 @@ name: .NET Build + Test + Publish
22

33
on:
44
push:
5-
branches: [main]
5+
branches: [main, linux-app-image]
66
pull_request:
77
branches: [main]
88

99
jobs:
10-
build:
11-
runs-on: windows-latest
10+
build-windows:
11+
runs-on: windows-2022
12+
13+
outputs:
14+
version-number: ${{ steps.version.outputs.number}}
1215

1316
steps:
1417
- uses: actions/checkout@v4
@@ -66,21 +69,13 @@ jobs:
6669
$version = $version -replace "\+.*", ""
6770
Write-Output "number=$version" >> $env:GITHUB_OUTPUT
6871
shell: pwsh
69-
- name: Publish Linux 64bit
70-
if: ${{ github.event_name != 'pull_request' }}
71-
run: dotnet publish --os linux --arch x64 -c Release --self-contained false src/TrackerCouncil.Smz3.UI/TrackerCouncil.Smz3.UI.csproj
7272
- name: Publish Multiplayer Server
7373
if: ${{ github.event_name != 'pull_request' }}
7474
run: dotnet publish -c Release --self-contained false src//TrackerCouncil.Smz3.Multiplayer.Server//TrackerCouncil.Smz3.Multiplayer.Server.csproj
7575
- name: Building the Windows installer
7676
if: ${{ github.event_name != 'pull_request' }}
7777
run: '"%programfiles(x86)%/Inno Setup 6/iscc.exe" "setup/randomizer.app.iss"'
7878
shell: cmd
79-
- name: Building the Linux 64bit package
80-
if: ${{ github.event_name != 'pull_request' }}
81-
working-directory: setup
82-
run: "./LinuxBuildZipper.ps1"
83-
shell: pwsh
8479
- name: Building the Multiplayer Server package
8580
if: ${{ github.event_name != 'pull_request' }}
8681
working-directory: setup
@@ -91,7 +86,73 @@ jobs:
9186
if: ${{ github.event_name != 'pull_request' }}
9287
with:
9388
path: "setup/Output/*"
94-
name: SMZ3CasRandomizer_${{ steps.version.outputs.number }}
89+
name: SMZ3CasRandomizerWindows
90+
91+
build-linux:
92+
runs-on: ubuntu-22.04
93+
94+
needs: [build-windows]
95+
96+
permissions:
97+
contents: write
98+
99+
steps:
100+
- uses: actions/checkout@v4
101+
- name: Download config repo
102+
uses: actions/checkout@v4
103+
with:
104+
repository: TheTrackerCouncil/SMZ3CasConfigs
105+
path: configs
106+
ref: main
107+
- name: Download sprite repo
108+
uses: actions/checkout@v4
109+
with:
110+
repository: TheTrackerCouncil/SMZ3CasSprites
111+
path: sprites
112+
ref: main
113+
- name: Download tracker sprite repo
114+
uses: actions/checkout@v4
115+
with:
116+
repository: TheTrackerCouncil/TrackerSprites
117+
path: trackersprites
118+
ref: main
119+
- name: Download git trees
120+
if: ${{ github.event_name != 'pull_request' }}
121+
shell: pwsh
122+
env:
123+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
124+
run: |
125+
$headers = @{
126+
Authorization="Bearer $Env:GH_TOKEN"
127+
}
128+
Invoke-RestMethod -Uri https://api.github.com/repos/TheTrackerCouncil/SMZ3CasSprites/git/trees/main?recursive=1 -OutFile sprites/Sprites/sprites.json -Headers $headers
129+
Invoke-RestMethod -Uri https://api.github.com/repos/TheTrackerCouncil/TrackerSprites/git/trees/main?recursive=1 -OutFile trackersprites/tracker-sprites.json -Headers $headers
130+
Remove-Item -LiteralPath "trackersprites/.git" -Force -Recurse
131+
- name: Setup .NET
132+
uses: actions/setup-dotnet@v4
133+
with:
134+
dotnet-version: 8.0.x
135+
- name: Install PupNet
136+
run: dotnet tool install -g KuiperZone.PupNet
137+
- name: Download AppImageTool
138+
run: |
139+
wget -P "$HOME/.local/bin" "https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-x86_64.AppImage"
140+
chmod +x "$HOME/.local/bin/appimagetool-x86_64.AppImage"
141+
appimagetool-x86_64.AppImage --version
142+
- name: Run PupNet
143+
run: |
144+
chmod +x setup/AppImageBundleFiles.sh
145+
version_number="${{ needs.build-windows.outputs.version-number }}"
146+
base_version="${version_number%%-*}"
147+
sed -i "s/^AppVersionRelease *= *.*/AppVersionRelease = ${base_version}/" setup/AppImage.pupnet.conf
148+
pupnet setup/AppImage.pupnet.conf --kind appimage -y
149+
- name: Upload artifact
150+
uses: actions/upload-artifact@v4
151+
if: ${{ github.event_name != 'pull_request' }}
152+
with:
153+
path: "setup/Output/SMZ3CasRandomizer.x86_64*"
154+
name: SMZ3CasRandomizerLinux
155+
95156
build-mac:
96157
runs-on: macos-latest
97158
if: ${{ github.event_name != 'pull_request' }}
@@ -154,4 +215,42 @@ jobs:
154215
uses: actions/upload-artifact@v4
155216
with:
156217
path: "setup/output/*"
157-
name: SMZ3CasRandomizerMacOS_${{ steps.version.outputs.number }}
218+
name: SMZ3CasRandomizerMacOS
219+
220+
package:
221+
runs-on: ubuntu-22.04
222+
223+
needs: [build-windows, build-linux, build-mac]
224+
225+
permissions:
226+
contents: write
227+
228+
steps:
229+
- uses: actions/download-artifact@v5
230+
with:
231+
name: SMZ3CasRandomizerWindows
232+
path: out
233+
- uses: actions/download-artifact@v5
234+
with:
235+
name: SMZ3CasRandomizerLinux
236+
path: out
237+
- uses: actions/download-artifact@v5
238+
with:
239+
name: SMZ3CasRandomizerMacOS
240+
path: out
241+
- name: Extract some files
242+
run: |
243+
ls -alR
244+
- name: Upload artifact
245+
uses: actions/upload-artifact@v4
246+
if: ${{ github.event_name != 'pull_request' }}
247+
with:
248+
path: "out/*"
249+
name: SMZ3CasRandomizer_${{ needs.build-windows.outputs.version-number }}
250+
- name: Delete old artifacts
251+
uses: geekyeggo/delete-artifact@v5
252+
with:
253+
name: |
254+
SMZ3CasRandomizerWindows
255+
SMZ3CasRandomizerLinux
256+
SMZ3CasRandomizerMacOS

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ healthchecksdb
345345
/Randomizer.CLI/Properties/launchSettings.json
346346
/WebRandomizer/randomizer.db
347347
/asar/
348-
setup/Output/
348+
[Ss]etup/[Oo]utput/
349349
patch-config*
350350
**/.DS_Store
351351
**/*.db

setup/AppImage.pupnet.conf

Lines changed: 199 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,199 @@
1+
################################################################################
2+
# PUPNET DEPLOY: 1.9.0
3+
################################################################################
4+
5+
########################################
6+
# APP PREAMBLE
7+
########################################
8+
9+
# Mandatory application base name. This MUST BE the base name of the main executable file. It should NOT
10+
# include any directory part or extension, i.e. do not append '.exe' or '.dll'. It should not contain
11+
# spaces or invalid filename characters.
12+
AppBaseName = SMZ3CasRandomizer
13+
14+
# Mandatory application friendly name.
15+
AppFriendlyName = "SMZ3 Cas' Randomizer"
16+
17+
# Mandatory application ID in reverse DNS form. The value should stay constant for lifetime of the software.
18+
AppId = org.trackercouncil.smz3
19+
20+
# Mandatory application version and package release of form: 'VERSION[RELEASE]'. Use optional square
21+
# brackets to denote package release, i.e. '1.2.3[1]'. Release refers to a change to the deployment
22+
# package, rather the application. If release part is absent (i.e. '1.2.3'), the release value defaults
23+
# to '1'. Note that the version-release value given here may be overridden from the command line.
24+
AppVersionRelease = 1.0.0
25+
26+
# Mandatory single line application summary text in default (English) language.
27+
AppShortSummary = "SMZ3 Cas' Randomizer"
28+
29+
# Multi-line (surround with triple """ quotes) application description which provides longer explanation
30+
# than AppShortSummary in default language. Optional but it is recommended to specify this. Text
31+
# separated by an empty line will be treated as separate paragraphs. Avoid complex formatting, and do not
32+
# use HTML or markdown, other than list items beginning with "* ", "+ " or "- ". This content is
33+
# used by package builders where supported, including RPM and DEB, and is used to populate the
34+
# ${APPSTREAM_DESCRIPTION_XML} element used within AppStream metadata.
35+
AppDescription = """
36+
UI application for selecting, randomizing, and shuffling MSUs for various rom hacks and randomizers.
37+
"""
38+
39+
# Mandatory application license ID. This should be one of the recognized SPDX license
40+
# identifiers, such as: 'MIT', 'GPL-3.0-or-later' or 'Apache-2.0'. For a proprietary or
41+
# custom license, use 'LicenseRef-Proprietary' or 'LicenseRef-LICENSE'.
42+
AppLicenseId = MIT
43+
44+
# Optional path to application copyright/license text file. If provided, it will be packaged with the
45+
# application and used with package builders where supported.
46+
AppLicenseFile = ../LICENSE
47+
48+
# Optional path to application changelog file. IMPORTANT. If given, this file should contain version
49+
# information in a predefined format. Namely, it should contain one or more version headings of form:
50+
# '+ VERSION;DATE', under which are to be listed change items of form: '- Change description'. Formatted
51+
# information will be parsed and used to expand the ${APPSTREAM_CHANGELOG_XML} macro used
52+
# for AppStream metadata (superfluous text is ignored, so the file may also contain README information).
53+
# The given file will also be packaged with the application verbatim. See: https://github.com/kuiperzone/PupNet-Deploy.
54+
AppChangeFile =
55+
56+
########################################
57+
# PUBLISHER
58+
########################################
59+
60+
# Mandatory publisher, group or creator name.
61+
PublisherName = The Tracker Council
62+
63+
# Publisher ID in reverse DNS form. Invariably, this would be the same as AppId, excluding the app leaf
64+
# name. The value populates the ${PUBLISHER_ID} macro used AppStream metainfo. If omitted, defaults to
65+
# the leading parts of AppId. It is highly recommended to specify the value explicitly.
66+
PublisherId = org.trackercouncil
67+
68+
# Optional copyright statement.
69+
PublisherCopyright =
70+
71+
# Optional publisher or application web-link name. Note that Windows Setup packages
72+
# require both PublisherLinkName and PublisherLinkUrl in order to include the link as
73+
# an item in program menu entries. Do not modify name, as may leave old entries in updated installations.
74+
PublisherLinkName = Home Page
75+
76+
# Publisher or application web-link URL. Although optional, it should be considered mandatory if using
77+
# MetaFile
78+
PublisherLinkUrl = https://github.com/TheTrackerCouncil
79+
80+
# Publisher or maintainer email contact. Although optional, some package builders (i.e. DEB) require it
81+
# and may warn or fail unless provided.
82+
PublisherEmail = [email protected]
83+
84+
########################################
85+
# DESKTOP INTEGRATION
86+
########################################
87+
88+
# Boolean (true or false) which indicates whether the application is hidden on the desktop. It is used to
89+
# populate the 'NoDisplay' field of the .desktop file. The default is false. Setting to true will also
90+
# cause the main application start menu entry to be omitted for Windows Setup.
91+
DesktopNoDisplay = false
92+
93+
# Boolean (true or false) which indicates whether the application runs in the terminal, rather than
94+
# providing a GUI. It is used to populate the 'Terminal' field of the .desktop file.
95+
DesktopTerminal = false
96+
97+
# Optional path to a Linux desktop file. If empty (default), one will be generated automatically from
98+
# the information in this file. Supplying a custom file, however, allows for mime-types and
99+
# internationalisation. If supplied, the file MUST contain the line: 'Exec=${INSTALL_EXEC}'
100+
# in order to use the correct install location. Other macros may be used to help automate the content.
101+
# Note. PupNet Deploy can generate you a desktop file. Use --help and 'pupnet --help macro' for reference.
102+
# See: https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html
103+
DesktopFile = Smz3CasRandomizer.desktop
104+
105+
# Optional command name to start the application from the terminal. If, for example, AppBaseName is
106+
# 'Zone.Kuiper.HelloWorld', the value here may be set to a simpler and/or lower-case variant such as
107+
# 'helloworld'. It must not contain spaces or invalid filename characters. Do not add any extension such
108+
# as '.exe'. If empty, the application will not be in the path and cannot be started from the command line.
109+
# For Windows Setup packages, see also SetupCommandPrompt. StartCommand is not
110+
# supported for all packages kinds (i.e. Flatpak). Default is empty (none).
111+
StartCommand = SMZ3CasRandomizer
112+
113+
# Optional category for the application. The value should be one of the recognized Freedesktop top-level
114+
# categories, such as: Audio, Development, Game, Office, Utility etc. Only a single value should be
115+
# provided here which will be used, where supported, to populate metadata. The default is empty.
116+
# See: https://specifications.freedesktop.org/menu-spec/latest/apa.html
117+
PrimeCategory = Game
118+
119+
# Path to AppStream metadata file. It is optional, but recommended as it is used by software centers.
120+
# Note. The contents of the files may use macro variables. Use 'pupnet --help macro' for reference.
121+
# See: https://docs.appimage.org/packaging-guide/optional/appstream.html
122+
MetaFile = app.metainfo.xml
123+
124+
# Optional icon file paths. The value may include multiple filenames separated with semicolon or given
125+
# in multi-line form. Valid types are SVG, PNG and ICO (ICO ignored on Linux). Note that the inclusion
126+
# of a scalable SVG is preferable on Linux, whereas PNGs must be one of the standard sizes and MUST
127+
# include the size in the filename in the form: name.32x32.png' or 'name.32.png'.
128+
IconFiles = """
129+
../src/TrackerCouncil.Smz3.UI/Assets/icon.512.png
130+
../src/TrackerCouncil.Smz3.UI/Assets/icon.256.png
131+
../src/TrackerCouncil.Smz3.UI/Assets/icon.128.png
132+
../src/TrackerCouncil.Smz3.UI/Assets/icon.64.png
133+
../src/TrackerCouncil.Smz3.UI/Assets/icon.48.png
134+
../src/TrackerCouncil.Smz3.UI/Assets/icon.32.png
135+
../src/TrackerCouncil.Smz3.UI/Assets/icon.24.png
136+
../src/TrackerCouncil.Smz3.UI/Assets/icon.16.png
137+
"""
138+
139+
########################################
140+
# DOTNET PUBLISH
141+
########################################
142+
143+
# Optional path relative to this file in which to find the dotnet project (.csproj) file, or the
144+
# directory containing it. If empty (default), a single project file is expected under the same
145+
# directory as this file. IMPORTANT. If set to 'NONE', dotnet publish is disabled
146+
# (i.e. not called). Instead, only DotnetPostPublish is called.
147+
DotnetProjectPath = ../src/TrackerCouncil.Smz3.UI
148+
149+
# Optional arguments supplied to 'dotnet publish'. Do NOT include '-r' (runtime), or '-c' (configuration)
150+
# here as they will be added according to command line arguments. Typically you want as a minimum:
151+
# '-p:Version=${APP_VERSION} --self-contained true'. Additional useful arguments include:
152+
# '-p:DebugType=None -p:DebugSymbols=false -p:PublishSingleFile=true -p:PublishReadyToRun=true
153+
# -p:PublishTrimmed=true -p:TrimMode=link'. Note. This value may use macro variables. Use 'pupnet --help macro'
154+
# for reference. See: https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-publish
155+
DotnetPublishArgs = -p:Version=${APP_VERSION} --self-contained true -p:DebugType=None -p:DebugSymbols=false
156+
157+
DotnetPostPublish = AppImageBundleFiles.sh
158+
159+
########################################
160+
# PACKAGE OUTPUT
161+
########################################
162+
163+
# Optional package name (excludes version etc.). If empty, defaults to AppBaseName. However, it is
164+
# used not only to specify the base output filename, but to identify the application in DEB and RPM
165+
# packages. You may wish, therefore, to ensure that the value represents a unique name. Naming
166+
# requirements are strict and must contain only alpha-numeric and '-', '+' and '.' characters.
167+
PackageName = SMZ3CasRandomizer
168+
169+
# Output directory, or subdirectory relative to this file. It will be created if it does not exist and
170+
# will contain the final deploy output files. If empty, it defaults to the location of this file.
171+
OutputDirectory = Output
172+
173+
########################################
174+
# APPIMAGE OPTIONS
175+
########################################
176+
177+
# Additional arguments for use with appimagetool, i.e. '--no-appstream' to disable pedantic metadata checking.
178+
# Use for signing with '--sign'. Default is empty.
179+
AppImageArgs =
180+
181+
# Optional path to AppImage fuse runtime(s), but not to be confused with .NET runtime ID. If AppImageRuntimePath is
182+
# left empty (default), appimagetool will download the latest runtime automatically. Specifying a path here avoids
183+
# the need for an internet connection during build, and fixes the runtime version. If AppImageRuntimePath
184+
# points to a file, the value is supplied directly to appimagetool using '--runtime-file'. If it points to a
185+
# directory, the directory should contain expected runtimes, which will be selected for the target architecture,
186+
# namely one of: runtime-aarch64, runtime-armhf, runtime-i686 or runtime-x86_64. Runtimes can be downloaded:
187+
# https://github.com/AppImage/type2-runtime/releases
188+
AppImageRuntimePath =
189+
190+
# Boolean (true or false) which sets whether to include the application version in the AppImage filename,
191+
# i.e. 'HelloWorld-1.2.3-x86_64.AppImage'. Default is false. It is ignored if the output filename is
192+
# specified at command line.
193+
AppImageVersionOutput = false
194+
195+
196+
FlatpakPlatformRuntime = 1.0.0
197+
FlatpakPlatformSdk = 1.0.0
198+
FlatpakPlatformVersion = 1.0.0
199+
SetupMinWindowsVersion = 1.0.0

0 commit comments

Comments
 (0)