mirror of
https://github.com/wavetermdev/waveterm.git
synced 2024-12-21 16:38:23 +01:00
Snap support (#1095)
Adds Snap support, though I'm still waiting to hear back from the Snapcraft team about getting our package listed. closes #1092
This commit is contained in:
parent
1fc6dd7c1a
commit
81a8a7f3eb
20
.github/workflows/build-helper.yml
vendored
20
.github/workflows/build-helper.yml
vendored
@ -40,11 +40,8 @@ jobs:
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install --no-install-recommends -y libarchive-tools libopenjp2-tools rpm squashfs-tools
|
||||
|
||||
# We use Zig instead of glibc for cgo compilation as it is more-easily statically linked
|
||||
- name: Setup Zig (Linux only)
|
||||
if: matrix.platform == 'linux'
|
||||
run: sudo snap install zig --classic --beta
|
||||
sudo snap install snapcraft --classic
|
||||
sudo snap install zig --classic --beta # We use Zig instead of glibc for cgo compilation as it is more-easily statically linked
|
||||
|
||||
# The pre-installed version of the AWS CLI has a segfault problem so we'll install it via Homebrew instead.
|
||||
- name: Upgrade AWS CLI (Mac only)
|
||||
@ -122,8 +119,15 @@ jobs:
|
||||
path: ${{env.STATIC_DOCSITE_PATH}}
|
||||
|
||||
# Build and upload packages
|
||||
- name: Build (not Windows)
|
||||
if: matrix.platform != 'windows'
|
||||
- name: Build (Linux)
|
||||
if: matrix.platform == 'linux'
|
||||
run: task package
|
||||
env:
|
||||
USE_SYSTEM_FPM: true # Ensure that the installed version of FPM is used rather than the bundled one.
|
||||
STATIC_DOCSITE_PATH: ${{env.STATIC_DOCSITE_PATH}}
|
||||
SNAPCRAFT_BUILD_ENVIRONMENT: host
|
||||
- name: Build (Darwin)
|
||||
if: matrix.platform == 'darwin'
|
||||
run: task package
|
||||
env:
|
||||
USE_SYSTEM_FPM: true # Ensure that the installed version of FPM is used rather than the bundled one.
|
||||
@ -133,7 +137,7 @@ jobs:
|
||||
APPLE_APP_SPECIFIC_PASSWORD: ${{ matrix.platform == 'darwin' && secrets.PROD_MACOS_NOTARIZATION_PWD_2 }}
|
||||
APPLE_TEAM_ID: ${{ matrix.platform == 'darwin' && secrets.PROD_MACOS_NOTARIZATION_TEAM_ID_2 }}
|
||||
STATIC_DOCSITE_PATH: ${{env.STATIC_DOCSITE_PATH}}
|
||||
- name: Build (Windows only)
|
||||
- name: Build (Windows)
|
||||
if: matrix.platform == 'windows'
|
||||
run: task package
|
||||
env:
|
||||
|
@ -58,7 +58,7 @@ const config = {
|
||||
artifactName: "${name}-${platform}-${arch}-${version}.${ext}",
|
||||
category: "TerminalEmulator",
|
||||
executableName: pkg.name,
|
||||
target: ["zip", "deb", "rpm", "AppImage", "pacman"],
|
||||
target: ["zip", "deb", "rpm", "snap", "AppImage", "pacman"],
|
||||
synopsis: pkg.description,
|
||||
description: null,
|
||||
desktop: {
|
||||
@ -84,6 +84,11 @@ const config = {
|
||||
appImage: {
|
||||
license: "LICENSE",
|
||||
},
|
||||
snap: {
|
||||
base: "core22",
|
||||
confinement: "classic",
|
||||
allowNativeWayland: true,
|
||||
},
|
||||
publish: {
|
||||
provider: "generic",
|
||||
url: "https://dl.waveterm.dev/releases-w2",
|
||||
@ -111,9 +116,6 @@ const config = {
|
||||
})
|
||||
.filter((f) => f.isFile() && f.name.startsWith("wavesrv"))
|
||||
.forEach((f) => fs.chmodSync(path.resolve(f.parentPath ?? f.path, f.name), 0o755)); // 0o755 corresponds to -rwxr-xr-x
|
||||
} else if (context.electronPlatformName === "linux") {
|
||||
const chromeSandboxPath = path.resolve(context.appOutDir, "chrome-sandbox");
|
||||
fs.chmodSync(chromeSandboxPath, 0o4755);
|
||||
}
|
||||
},
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user