Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: create .snap and app image for linux #2739

Merged
merged 3 commits into from
Feb 4, 2025
Merged
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
4 changes: 2 additions & 2 deletions .github/workflows/build-and-e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04, macos-13, windows-latest]
os: [ubuntu-latest, macos-13, windows-latest]
include:
- os: ubuntu-22.04
- os: ubuntu-latest
# https://github.com/microsoft/playwright/issues/11932
E2E: xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- yarn test:e2e:ci
- os: macos-13
Expand Down
10 changes: 7 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@
"update-commit-hash:darwin:linux": "COMMIT_INFO=$(git describe --exact-match --tags 2> /dev/null || git rev-parse --short HEAD); echo \"{\\\"commitInfo\\\" : \\\"$COMMIT_INFO\\\" }\" > \"src/commitInfo.json\"",
"update-commit-hash:win32": "tools/get_app_version_for_windows.bat",
"generate-notice": "mkdirp notices && yarn licenses generate-disclaimer --production > notices/notices.txt && yarn node tools/generateNotices.mjs",
"ship-linux": "yarn install-deps:linux && yarn build && electron-builder --linux --x64 --publish never && mkdir -p release/linux && mv 'release/OpossumUI-0.1.0.AppImage' 'release/linux/OpossumUI-for-linux.AppImage'",
"ship-linux": "yarn install-deps:linux && yarn build && tools/build_linux_release.sh",
"ship-win": "yarn install-deps:win32 && yarn build && electron-builder --win --x64 --publish never && mkdirp release/win && mv \"release/OpossumUI Setup 0.1.0.exe\" \"release/win/OpossumUI-for-win.exe\"",
"ship-mac": "yarn install-deps:darwin && yarn build && electron-builder --mac --x64 --publish never && zip -r -y -q 'release/mac/OpossumUI-for-mac.zip' 'release/mac/'",
"ship": "yarn ship-linux && yarn ship-win && yarn ship-mac",
Expand Down Expand Up @@ -170,8 +170,12 @@
"icon": "public/icons/icon_512x512.png"
},
"linux": {
"target": "AppImage",
"icon": "public/icons/icon_512x512.png"
"target": [
"snap",
"AppImage"
],
"icon": "public/icons/icon_512x512.png",
"category": "Development"
},
"extraMetadata": {
"main": "build/ElectronBackend/app.js"
Expand Down
3 changes: 3 additions & 0 deletions src/e2e-tests/utils/fixtures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ export const test = base.extend<{

const [executablePath, main] = getLaunchProps();
const args = ['--reset'];
if (os.platform() === 'linux') {
args.push('--no-sandbox');
}

const app = await electron.launch({
args: [main, ...(!filePath ? args : args.concat([filePath]))],
Expand Down
13 changes: 13 additions & 0 deletions tools/build_linux_release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env bash

# SPDX-FileCopyrightText: Meta Platforms, Inc. and its affiliates
# SPDX-FileCopyrightText: TNG Technology Consulting GmbH<https://www.tngtech.com>
#
# SPDX-License-Identifier: Apache-2.0

set -e

electron-builder --linux --x64 --publish never
mkdir -p release/linux
mv 'release/opossum-ui_0.1.0_amd64.snap' 'release/linux/OpossumUI-for-linux.snap'
mv 'release/OpossumUI-0.1.0.AppImage' 'release/linux/OpossumUI-for-linux.AppImage'
Loading