Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,18 +76,23 @@ jobs:
echo "Using version ${{ github.event.inputs.version }}"
echo "RELEASE_VERSION=${{ github.event.inputs.version }}" >> $GITHUB_ENV

- name: Set up .NET 9
- name: Set up .NET
uses: actions/setup-dotnet@v3
with:
# Net 8 needed for PupNet
# Net 9 for app, Net 8 for PupNet 1.9
dotnet-version: |
8.0.x
9.0.x

- name: Install PupNet
- name: Install AppImage build dependencies
run: |
sudo apt-get -y install libfuse2
dotnet tool install -g KuiperZone.PupNet --version 1.8.0
sudo apt-get -y install fuse3
wget -q https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-x86_64.AppImage
sudo mv appimagetool-x86_64.AppImage /usr/local/bin/
sudo chmod +x /usr/local/bin/appimagetool-x86_64.AppImage

- name: Install PupNet
run: dotnet tool install -g KuiperZone.PupNet --version 1.9.1

- name: PupNet Build
env:
Expand Down
9 changes: 7 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,13 @@ The `output_dir` environment variable can be specified or defaults to `./out/osx
```
### Linux
```bash
sudo apt-get -y install libfuse2
dotnet tool install -g KuiperZone.PupNet
sudo apt-get -y install fuse3
# Download appimagetool (uses static type2-runtime; end users still need
# fusermount or fusermount3 setuid helper on their system, or can use
# --appimage-extract-and-run as a fallback)
sudo wget -q https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-x86_64.AppImage -O /usr/local/bin/appimagetool
sudo chmod +x /usr/local/bin/appimagetool
dotnet tool install -g KuiperZone.PupNet --version 1.9.1
pupnet -r linux-x64 -c Release --kind appimage --app-version $RELEASE_VERSION --clean
```

Expand Down
6 changes: 5 additions & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,13 @@ node("Diligence") {
}

stage('Publish Linux') {
// Prerequisites on Jenkins agent:
// - fuse3 (provides fusermount3 for appimagetool AppImage)
// - appimagetool in $PATH (/usr/local/bin/)
// - pupnet 1.9.1 globally installed
Comment thread
NeuralFault marked this conversation as resolved.
sh "rm -rf StabilityMatrix.Avalonia/bin/*"
sh "rm -rf StabilityMatrix.Avalonia/obj/*"
sh "/home/jenkins/.dotnet/tools/pupnet --runtime linux-x64 --kind appimage --app-version ${version} --clean -y"
sh "/home/jenkins/.dotnet/tools/pupnet -r linux-x64 -c Release --kind appimage --app-version $RELEASE_VERSION --clean"
}
}
} finally {
Expand Down
132 changes: 89 additions & 43 deletions StabilityMatrix.Avalonia.pupnet.conf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
################################################################################
# PUPNET DEPLOY: 1.4.0
# PUPNET DEPLOY: 1.9.1
################################################################################

########################################
Expand All @@ -14,7 +14,7 @@ AppBaseName = StabilityMatrix.Avalonia
# Mandatory application friendly name.
AppFriendlyName = Stability Matrix

# Mandatory application ID in reverse DNS form. This should stay constant for lifetime of the software.
# Mandatory application ID in reverse DNS form. The value should stay constant for lifetime of the software.
AppId = zone.lykos.stabilitymatrix

# Mandatory application version and package release of form: 'VERSION[RELEASE]'. Use optional square
Expand All @@ -23,17 +23,18 @@ AppId = zone.lykos.stabilitymatrix
# to '1'. Note that the version-release value given here may be overridden from the command line.
AppVersionRelease = 2.0.0[1]

# Mandatory single line application short summary description.
# Mandatory single line application summary text in default (English) language.
AppShortSummary = Package and checkpoint manager for Stable Diffusion.

# Optional multi-line (surround with triple """ quotes) application description which may provide
# longer text than AppShortSummary. Text separated by an empty line will be treated as paragraphs
# (complex formatting should be avoided). The content is used by package builders where supported,
# including RPM and DEB, and may optionally be used to populate the '<description>' element in the
# AppStream metadata through the use of a macro variable.
AppDescription =
# Multi-line (surround with triple """ quotes) application description which provides longer explanation
# than AppShortSummary in default language. Optional but it is recommended to specify this. Text
# separated by an empty line will be treated as separate paragraphs. Avoid complex formatting, and do not
# use HTML or markdown, other than list items beginning with "* ", "+ " or "- ". This content is
# used by package builders where supported, including RPM and DEB, and is used to populate the
# ${APPSTREAM_DESCRIPTION_XML} element used within AppStream metadata.
AppDescription =

# Mandatory application license ID. This should be one of the recognised SPDX license
# Mandatory application license ID. This should be one of the recognized SPDX license
# identifiers, such as: 'MIT', 'GPL-3.0-or-later' or 'Apache-2.0'. For a proprietary or
# custom license, use 'LicenseRef-Proprietary' or 'LicenseRef-LICENSE'.
AppLicenseId = LicenseRef-Proprietary
Expand All @@ -45,19 +46,23 @@ AppLicenseFile = LICENSE
# Optional path to application changelog file. IMPORTANT. If given, this file should contain version
# information in a predefined format. Namely, it should contain one or more version headings of form:
# '+ VERSION;DATE', under which are to be listed change items of form: '- Change description'. Formatted
# information will be parsed and used to populate AppStream metadata. Additionally, it will be packaged
# with the application and used with package builders where supported. NOTE. Superfluous text in the file
# is ignored, so the file may also contain README information.
# For information: https://github.com/kuiperzone/PupNet-Deploy.
AppChangeFile =
# information will be parsed and used to expand the ${APPSTREAM_CHANGELOG_XML} macro used
# for AppStream metadata (superfluous text is ignored, so the file may also contain README information).
# The given file will also be packaged with the application verbatim. See: https://github.com/kuiperzone/PupNet-Deploy.
AppChangeFile =

########################################
# PUBLISHER
########################################

# Mandatory publisher, group or creator.
# Mandatory publisher, group or creator name.
PublisherName = Lykos

# Publisher ID in reverse DNS form. Invariably, this would be the same as AppId, excluding the app leaf
# name. The value populates the ${PUBLISHER_ID} macro used AppStream metainfo. If omitted, defaults to
# the leading parts of AppId. It is highly recommended to specify the value explicitly.
PublisherId = zone.lykos

# Optional copyright statement.
PublisherCopyright = Copyright (C) Lykos 2023

Expand All @@ -66,13 +71,19 @@ PublisherCopyright = Copyright (C) Lykos 2023
# an item in program menu entries. Do not modify name, as may leave old entries in updated installations.
PublisherLinkName = Home Page

# Optional publisher or application web-link URL.
# Publisher or application web-link URL. Although optional, it should be considered mandatory if using
# MetaFile
PublisherLinkUrl = https://lykos.ai

# Publisher or maintainer email contact. Although optional, some package builders (i.e. DEB) require it
# and may warn or fail unless provided.
PublisherEmail = stability-matrix@lykos.ai

# Publisher GPG key fingerprint for Linux package signing. This must be in the keyring and is used for AppImage,
# RPM and Flatpak (Deb files are not signed). Do NOT include spaces. If the key requires a passphrase, the build may
# require desktop specific interaction. Signing is optional but recommended. Leave blank to disable.
PublisherGpgKeyId =

########################################
# DESKTOP INTEGRATION
########################################
Expand All @@ -92,7 +103,7 @@ DesktopTerminal = false
# in order to use the correct install location. Other macros may be used to help automate the content.
# Note. PupNet Deploy can generate you a desktop file. Use --help and 'pupnet --help macro' for reference.
# See: https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html
DesktopFile =
DesktopFile =

# Optional command name to start the application from the terminal. If, for example, AppBaseName is
# 'Zone.Kuiper.HelloWorld', the value here may be set to a simpler and/or lower-case variant such as
Expand All @@ -102,7 +113,7 @@ DesktopFile =
# supported for all packages kinds (i.e. Flatpak). Default is empty (none).
StartCommand = stabilitymatrix

# Optional category for the application. The value should be one of the recognised Freedesktop top-level
# Optional category for the application. The value should be one of the recognized Freedesktop top-level
# categories, such as: Audio, Development, Game, Office, Utility etc. Only a single value should be
# provided here which will be used, where supported, to populate metadata. The default is empty.
# See: https://specifications.freedesktop.org/menu-spec/latest/apa.html
Expand All @@ -111,7 +122,7 @@ PrimeCategory = Utility
# Path to AppStream metadata file. It is optional, but recommended as it is used by software centers.
# Note. The contents of the files may use macro variables. Use 'pupnet --help macro' for reference.
# See: https://docs.appimage.org/packaging-guide/optional/appstream.html
MetaFile =
MetaFile =

# Optional icon file paths. The value may include multiple filenames separated with semicolon or given
# in multi-line form. Valid types are SVG, PNG and ICO (ICO ignored on Linux). Note that the inclusion
Expand All @@ -126,10 +137,10 @@ IconFiles = """
# DOTNET PUBLISH
########################################

# Optional path relative to this file in which to find the dotnet project (.csproj) or solution (.sln)
# file, or the directory containing it. If empty (default), a single project or solution file is
# expected under the same directory as this file. IMPORTANT. If set to 'NONE', dotnet publish
# is disabled (not called). Instead, only DotnetPostPublish is called.
# Optional path relative to this file in which to find the dotnet project (.csproj) file, or the
# directory containing it. If empty (default), a single project file is expected under the same
# directory as this file. IMPORTANT. If set to 'NONE', dotnet publish is disabled
# (i.e. not called). Instead, only DotnetPostPublish is called.
DotnetProjectPath = StabilityMatrix.Avalonia/StabilityMatrix.Avalonia.csproj

# Optional arguments supplied to 'dotnet publish'. Do NOT include '-r' (runtime), or '-c' (configuration)
Expand All @@ -144,16 +155,15 @@ DotnetPublishArgs = -p:Version=${APP_VERSION} -p:PublishReadyToRun=true -p:Publi
# publish, but before the final output is built. This could, for example, be a script which copies
# additional files into the build directory given by ${BUILD_APP_BIN}. The working directory will be
# the location of this file. This value is optional, but becomes mandatory if DotnetProjectPath equals
# 'NONE'. Note. This value may use macro variables. Additionally, scripts may use these as environment
# variables. Use 'pupnet --help macro' for reference.
DotnetPostPublish =
# 'NONE'. This value may use macro variables. The script may also use these as environment
# variables, such as ${BUILD_APP_BIN}. See 'pupnet --help macro' for reference.
DotnetPostPublish =

# Post-publish (or standalone build) command on Windows (ignored on Linux). This should perform
# the equivalent operation, as required, as DotnetPostPublish, but using DOS commands and batch
# scripts. Multiple commands may be specified, separated by semicolon or given in multi-line form.
# Note. This value may use macro variables. Additionally, scripts may use these as environment
# variables. Use 'pupnet --help macro' for reference.
DotnetPostPublishOnWindows =
# Post-publish (or standalone build) command on Windows (ignored on Linux). This should perform the
# equivalent operation as DotnetPostPublish, but using a Windows specific script. This value may use
# macro variables. The script may also use these as environment variables, such as %BUILD_APP_BIN%.
# See 'pupnet --help macro' for reference.
DotnetPostPublishOnWindows =

########################################
# PACKAGE OUTPUT
Expand All @@ -173,8 +183,18 @@ OutputDirectory = Release/linux-x64
# APPIMAGE OPTIONS
########################################

# Additional arguments for use with appimagetool. Useful for signing. Default is empty.
AppImageArgs =
# Additional arguments for use with appimagetool, i.e. '--no-appstream' to disable pedantic metadata checking.
# Do not use for signing if PublisherGpgKeyId is used. Default is empty.
AppImageArgs =

# Optional path to AppImage fuse runtime(s), but not to be confused with .NET runtime ID. If AppImageRuntimePath is
# left empty (default), appimagetool will download the latest runtime automatically. Specifying a path here avoids
# the need for an internet connection during build, and fixes the runtime version. If AppImageRuntimePath
# points to a file, the value is supplied directly to appimagetool using '--runtime-file'. If it points to a
# directory, the directory should contain expected runtimes, which will be selected for the target architecture,
# namely one of: runtime-aarch64, runtime-armhf, runtime-i686 or runtime-x86_64. Runtimes can be downloaded:
# https://github.com/AppImage/type2-runtime/releases
AppImageRuntimePath =

# Boolean (true or false) which sets whether to include the application version in the AppImage filename,
# i.e. 'HelloWorld-1.2.3-x86_64.AppImage'. Default is false. It is ignored if the output filename is
Expand All @@ -198,19 +218,27 @@ FlatpakPlatformSdk = org.freedesktop.Sdk
FlatpakPlatformVersion = 22.08

# Flatpak manifest 'finish-args' sandbox permissions. Optional, but if empty, the application will have
# extremely limited access to the host environment. This option may be used to grant required
# application permissions. Values here should be prefixed with '--' and separated by semicolon or given
# in multi-line form. Refer: https://docs.flatpak.org/en/latest/sandbox-permissions.html
# extremely limited access to the host environment and may not work. Values here should be prefixed with '--'
# and separated by semicolon or given in multi-line form. The default includes only "--socket=x11" as Avalonia
# currently supports X11. Other common permissions:
# --socket=wayland
# --socket=fallback-x11
# --share=network
# --socket=pulseaudio
# --socket=cups
# --filesystem=/home
# --filesystem=/tmp
# Refer: https://docs.flatpak.org/en/latest/sandbox-permissions.html
FlatpakFinishArgs = """
--socket=wayland
--socket=x11
--filesystem=host
--share=network
"""

# Additional arguments for use with flatpak-builder. Useful for signing. Default is empty.
# See flatpak-builder --help.
FlatpakBuilderArgs =
# Additional arguments for use with flatpak-builder. Do not use for signing if PublisherGpgKeyId is used.
# Default is empty. See flatpak-builder --help.
FlatpakBuilderArgs =

########################################
# RPM OPTIONS
Expand Down Expand Up @@ -262,6 +290,12 @@ DebianRecommends = """
# WINDOWS SETUP OPTIONS
########################################

# Optional application group name used as the Start Menu folder and install directory under Program Files.
# Specifically, it is used to define the InnoSetup DefaultGroupName and DefaultDirName parameters.
# If empty (default), suitable values are used based on your application.
# See: https://jrsoftware.org/ishelp/index.php?topic=setup_defaultgroupname
SetupGroupName =

# Boolean (true or false) which specifies whether the application is to be installed in administrative
# mode, or per-user. Default is false. See: https://jrsoftware.org/ishelp/topic_admininstallmode.htm
SetupAdminInstall = false
Expand All @@ -279,14 +313,26 @@ SetupMinWindowsVersion = 10
# Optional name and parameters of the Sign Tool to be used to digitally sign: the installer,
# uninstaller, and contained exe and dll files. If empty, files will not be signed.
# See: https://jrsoftware.org/ishelp/topic_setup_signtool.htm
SetupSignTool =
SetupSignTool =

# Optional suffix for the installer output filename. The default is empty, but you may wish set it to:
# 'Setup' or similar. This, for example, will output a file of name: HelloWorldSetup-x86_64.exe
# Ignored if the output filename is specified at command line.
SetupSuffixOutput =
SetupSuffixOutput =

# Boolean (true or false) which sets whether to include the application version in the setup filename,
# i.e. 'HelloWorld-1.2.3-x86_64.exe'. Default is false. Ignored if the output filename is specified
# at command line.
SetupVersionOutput = false

# Optional name of a script to run before uninstall with InnoSetup. The file is relative to the directory of the
# application and must have a default file association. This binds to the `[UninstallRun]` section of InnoSetup.
SetupUninstallScript =

########################################
# ZIP OPTIONS
########################################

# Boolean (true or false) which sets whether to include the application version in the zip/tar.gz filename, i.e.
# 'HelloWorld-1.2.3-x86_64.zip'. Default is true. It is ignored if the output filename is specified at command line.
ZipVersionOutput = true
Loading