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

DNM Add flatpak manifest: offline theia build not working #390

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
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
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@
**/plugins
**/tsconfig.tsbuildinfo
*.log
license-check-summary.txt*
license-check-summary.txt*
.flatpak-builder/
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "shared-modules"]
path = shared-modules
url = https://github.com/flathub/shared-modules.git
24,865 changes: 24,865 additions & 0 deletions generated-sources.json

Large diffs are not rendered by default.

86 changes: 86 additions & 0 deletions org.eclipse.theia-ide.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
id: org.eclipse.theia-ide
base: org.electronjs.Electron2.BaseApp
base-version: '23.08'
runtime: org.freedesktop.Platform
runtime-version: '23.08'
sdk: org.freedesktop.Sdk
sdk-extensions:
- org.freedesktop.Sdk.Extension.node18
command: run.sh
finish-args:
- --share=ipc
- --socket=wayland
- --socket=fallback-x11
- --socket=pulseaudio
- --socket=ssh-auth
- --share=network
- --device=all
- --filesystem=host
#- --persist=.vscode-oss
- --allow=devel
- --talk-name=org.freedesktop.secrets
- --talk-name=org.kde.kwalletd5
- --talk-name=org.freedesktop.Flatpak
- --env=XCURSOR_PATH=/run/host/user-share/icons:/run/host/share/icons
- --filesystem=xdg-run/gnupg:ro
- --filesystem=xdg-config/kdeglobals:ro
- --talk-name=com.canonical.AppMenu.Registrar
- --system-talk-name=org.freedesktop.login1
separate-locales: false
build-options:
append-path: /usr/lib/sdk/node18/bin
env:
NPM_CONFIG_LOGLEVEL: info
modules:
- shared-modules/libsecret/libsecret.json
- name: theia-ide
buildsystem: simple
build-options:
append-path: /usr/lib/sdk/node18/bin
env:
# https://stackoverflow.com/questions/25146976/can-i-get-npm-gyp-to-use-ccache
CC: ccache gcc
CXX: ccache g++
XDG_CACHE_HOME: /run/build/theia-ide/flatpak-node/cache
TMPDIR: /run/build/theia-ide/flatpak-node/tmp/
npm_config_nodedir: /usr/lib/sdk/node18
npm_config_offline: 'true'
npm_config_no_save: 'true'
PUPPETEER_SKIP_DOWNLOAD: 'true'
arch:
i386:
env:
npm_config_arch: ia32
npm_config_target_arch: ia32
x86_64:
env:
npm_config_arch: x64
npm_config_target_arch: x64
arm:
env:
npm_config_arch: armv7l
npm_config_target_arch: armv7l
aarch64:
env:
npm_config_arch: arm64
npm_config_target_arch: arm64
build-commands:
- HOME=$PWD yarn config --offline set yarn-offline-mirror $FLATPAK_BUILDER_BUILDDIR/flatpak-node/yarn-mirror
- yarn --offline --non-interactive --frozen-lockfile --ignore-optional --check-files --$npm_config_arch
- yarn build
#- yarn download:plugins
#- yarn package:applications:prod
- cp -va applications/electron/dist/* /app/main
- install -Dm755 -t /app/bin/ ../run.sh
sources:
#- type: archive
# url: https://github.com/eclipse-theia/theia-blueprint/archive/1.52.0.tar.gz
# sha256: xyz
- type: dir
path: .
# flatpak-node-generator --electron-node-headers --recursive yarn yarn.lock
- generated-sources.json
- type: script
dest-filename: run.sh
commands:
- zypak-wrapper.sh /app/main/theia-ide "$@"
7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"clean": "lerna run clean && rimraf node_modules",
"build": "yarn build:extensions && yarn build:applications",
"build:dev": "yarn build:extensions && yarn build:applications:dev",
"build:applications": "yarn build:extensions && lerna run --scope=\"theia-ide*app\" build:prod --concurrency 1",
"build:applications": "yarn build:extensions && lerna run --scope=\"theia-ide-electron-app\" build:prod --concurrency 1",
"build:applications:dev": "yarn build:extensions && lerna run --scope=\"theia-ide*app\" build --concurrency 1",
"build:extensions": "lerna run --scope=\"theia-ide*ext\" build",
"download:plugins": "theia download:plugins --rate-limit=15 --parallel=false --ignore-errors",
Expand Down Expand Up @@ -79,9 +79,8 @@
],
"resolutions": {
"@types/puppeteer": "^5.4.0",
"@yarnpkg/parsers": "3.0.0-rc.44",
"@yarnpkg/parsers": "3.0.2",
"**/multer": "1.4.4-lts.1",
"**/nan": "2.20.0",
"**/cpu-features": "0.0.9"
"**/nan": "2.20.0"
}
}
10 changes: 5 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3855,10 +3855,10 @@
resolved "https://registry.yarnpkg.com/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz#e77a97fbd345b76d83245edcd17d393b1b41fb31"
integrity sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ==

"@yarnpkg/[email protected].44", "@yarnpkg/[email protected].0-rc.46":
version "3.0.0-rc.44"
resolved "https://registry.yarnpkg.com/@yarnpkg/parsers/-/parsers-3.0.0-rc.44.tgz#43bf7943c039681da8f343cc6d73c2ab3184978b"
integrity sha512-UVAt9Icc8zfGXioeYJ8XMoSTxOYVmlal2TRNxy9Uh91taS72kQFalK7LpIslcvEBKy4XtarmfIwcFIU3ZY64lw==
"@yarnpkg/[email protected].46", "@yarnpkg/[email protected].2":
version "3.0.2"
resolved "https://registry.yarnpkg.com/@yarnpkg/parsers/-/parsers-3.0.2.tgz#48a1517a0f49124827f4c37c284a689c607b2f32"
integrity sha512-/HcYgtUSiJiot/XWGLOlGxPYUG65+/31V8oqk17vZLW1xlCoR4PampyePljOxY2n8/3jz9+tIFzICsyGujJZoA==
dependencies:
js-yaml "^3.10.0"
tslib "^2.4.0"
Expand Down Expand Up @@ -5617,7 +5617,7 @@ [email protected]:
parse-json "^5.0.0"
path-type "^4.0.0"

cpu-features@0.0.9, cpu-features@~0.0.9:
cpu-features@~0.0.9:
version "0.0.9"
resolved "https://registry.yarnpkg.com/cpu-features/-/cpu-features-0.0.9.tgz#5226b92f0f1c63122b0a3eb84cb8335a4de499fc"
integrity sha512-AKjgn2rP2yJyfbepsmLfiYcmtNn/2eUvocUyM/09yB0YDiz39HteK/5/T4Onf0pmdYDMgkBoGvRLvEguzyL7wQ==
Expand Down