Skip to content

Commit c55de9a

Browse files
Simplify desktop file creation
1 parent 31aee86 commit c55de9a

File tree

14 files changed

+28
-33
lines changed

14 files changed

+28
-33
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,10 @@ jobs:
7070
run: |
7171
pwd
7272
VERSION="${{ needs.build-windows.outputs.version-number }}"
73+
BASE_VERSION="${VERSION%%-*}"
7374
FILE="MSUScripter/App.axaml.cs"
7475
sed -i -E "s|^[[:space:]]*private static readonly string\?[[:space:]]+VersionOverride[[:space:]]*=[[:space:]]*null;|private static readonly string? VersionOverride = \"${VERSION}\";|" "$FILE"
76+
sed -i "s/^AppVersionRelease *= *.*/AppVersionRelease = ${BASE_VERSION}/" Setup/AppImage.pupnet.conf
7577
echo "Updated VersionOverride to: ${VERSION}"
7678
- name: Install PupNet
7779
run: dotnet tool install -g KuiperZone.PupNet
@@ -81,7 +83,7 @@ jobs:
8183
chmod +x "$HOME/.local/bin/appimagetool-x86_64.AppImage"
8284
appimagetool-x86_64.AppImage --version
8385
- name: Run PupNet
84-
run: pupnet Setup/MSUScripter.pupnet.conf --kind appimage -y
86+
run: pupnet Setup/AppImage.pupnet.conf --kind appimage -y
8587
- name: Upload artifact
8688
uses: actions/upload-artifact@v4
8789
if: ${{ github.event_name != 'pull_request' }}

MSUScripter/MSUScripter.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<PackageReference Include="Avalonia.Controls.DataGrid" Version="11.3.2" />
2020
<PackageReference Include="Deadpikle.AvaloniaProgressRing" Version="0.10.10" />
2121
<PackageReference Include="K4os.Hash.xxHash" Version="1.0.8" />
22-
<PackageReference Include="MattEqualsCoder.AppImageDesktopFileCreator" Version="0.2.0" />
22+
<PackageReference Include="MattEqualsCoder.AppImageDesktopFileCreator" Version="0.3.1" />
2323
<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
2424
<PackageReference Include="MattEqualsCoder.AvaloniaControls" Version="1.9.0" />
2525
<PackageReference Include="MattEqualsCoder.GitHubReleaseChecker" Version="1.1.3" />

MSUScripter/Program.cs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -167,17 +167,7 @@ await Dispatcher.UIThread.Invoke(async () =>
167167
[SupportedOSPlatform("linux")]
168168
internal static CreateDesktopFileResponse BuildLinuxDesktopFile()
169169
{
170-
var assembly = Assembly.GetExecutingAssembly();
171170
return new DesktopFileBuilder("org.mattequalscoder.msuscripter", "MSU Scripter")
172-
.AddDescription("UI application for creating MSUs and PCM files")
173-
.AddCategory(DesktopFileCategories.Development)
174-
.AddWindowClass("MSUScripter")
175-
.AddIcon(assembly, "MSUScripter.Assets.icon.16.png", 16)
176-
.AddIcon(assembly, "MSUScripter.Assets.icon.32.png", 32)
177-
.AddIcon(assembly, "MSUScripter.Assets.icon.48.png", 48)
178-
.AddIcon(assembly, "MSUScripter.Assets.icon.256.png", 256)
179-
.AddIcon(assembly, "MSUScripter.Assets.icon.512.png", 512)
180-
.AddIcon(assembly, "MSUScripter.Assets.icon.svg")
181171
.AddUninstallAction(Directories.BaseFolder)
182172
.WithMimeType("application/x-msu-scripter-project", "MSU Scripter Project", "*.msup", true)
183173
.Build();
Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ AppId = org.mattequalscoder.msuscripter
2222
# brackets to denote package release, i.e. '1.2.3[1]'. Release refers to a change to the deployment
2323
# package, rather the application. If release part is absent (i.e. '1.2.3'), the release value defaults
2424
# to '1'. Note that the version-release value given here may be overridden from the command line.
25-
AppVersionRelease = 5.0.0[1]
25+
AppVersionRelease = 1.0.0
2626

2727
# Mandatory single line application summary text in default (English) language.
28-
AppShortSummary = MSU Scripter
28+
AppShortSummary = UI application for creating MSUs and PCM files
2929

3030
# Multi-line (surround with triple """ quotes) application description which provides longer explanation
3131
# than AppShortSummary in default language. Optional but it is recommended to specify this. Text
@@ -116,7 +116,7 @@ StartCommand = MSUScripter
116116
# categories, such as: Audio, Development, Game, Office, Utility etc. Only a single value should be
117117
# provided here which will be used, where supported, to populate metadata. The default is empty.
118118
# See: https://specifications.freedesktop.org/menu-spec/latest/apa.html
119-
PrimeCategory = Utility
119+
PrimeCategory = Development
120120

121121
# Path to AppStream metadata file. It is optional, but recommended as it is used by software centers.
122122
# Note. The contents of the files may use macro variables. Use 'pupnet --help macro' for reference.
@@ -128,13 +128,14 @@ MetaFile = app.metainfo.xml
128128
# of a scalable SVG is preferable on Linux, whereas PNGs must be one of the standard sizes and MUST
129129
# include the size in the filename in the form: name.32x32.png' or 'name.32.png'.
130130
IconFiles = """
131-
../MSUScripter/Assets/icon.512.png
132-
../MSUScripter/Assets/icon.256.png
133-
../MSUScripter/Assets/icon.128.png
134-
../MSUScripter/Assets/icon.64.png
135-
../MSUScripter/Assets/icon.32.png
136-
../MSUScripter/Assets/icon.24.png
137-
../MSUScripter/Assets/icon.16.png
131+
Icons/icon.512.png
132+
Icons/icon.256.png
133+
Icons/icon.128.png
134+
Icons/icon.64.png
135+
Icons/icon.32.png
136+
Icons/icon.24.png
137+
Icons/icon.16.png
138+
Icons/icon.svg
138139
"""
139140

140141
########################################

0 commit comments

Comments
 (0)