Skip to content

Commit 6b9cd8d

Browse files
committed
r0b08x [chore] 3/19/2024, 10:36:45 AM
1 parent fc78b34 commit 6b9cd8d

6 files changed

+885
-7152
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,4 @@ package-lock.json
1414

1515
/.flatpak-builder
1616
/.build
17+
yarn.lock

generated-sources.json

+850-850
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
app-id: com.patrikx3.onenote
1+
app-id: org.flathub.p3x-onenote
22
runtime: org.freedesktop.Platform
33
runtime-version: '23.08'
44
sdk: org.freedesktop.Sdk
@@ -9,33 +9,46 @@ sdk-extensions:
99
command: run.sh
1010
separate-locales: false
1111
finish-args:
12-
- --share=ipc
13-
- --socket=x11
14-
- --socket=pulseaudio
15-
- --share=network
16-
# - --device=dri
12+
- "--socket=wayland"
13+
- "--socket=x11"
14+
- "--share=ipc"
15+
- "--device=dri"
16+
- "--socket=pulseaudio"
17+
- "--filesystem=home"
18+
- "--share=network"
19+
- "--talk-name=org.freedesktop.Notifications"
1720
build-options:
1821
append-path: /usr/lib/sdk/node18/bin
1922
env:
2023
NPM_CONFIG_LOGLEVEL: info
2124
modules:
22-
- name: onenote
25+
- name: p3x-onenote
2326
buildsystem: simple
2427
subdir: main
2528
build-options:
29+
cflags: -O2 -g
30+
cxxflags: -O2 -g
2631
env:
27-
XDG_CACHE_HOME: /run/build/onenote/flatpak-node/cache
28-
npm_config_cache: /run/build/onenote/flatpak-node/npm-cache
32+
XDG_CACHE_HOME: /run/build/p3x-onenote/flatpak-node/cache
33+
npm_config_cache: /run/build/p3x-onenote/flatpak-node/npm-cache
2934
npm_config_offline: 'true'
30-
#PUPPETEER_SKIP_DOWNLOAD: "true"
35+
YARN_CACHE_FOLDER: /run/build/p3x-onenote/flatpak-node/yarn-cache
3136
build-commands:
37+
- node ./scripts/fix-packages-publish.js flathub-before
38+
- node ./scripts/fix-packages-publish.js before
3239
# Install npm dependencies
40+
#- echo $PWD
41+
#- npm list --cache
3342
#- npm install --offline
34-
- yarn install --offline
43+
#- echo $YARN_CACHE_FOLDER
44+
#- yarn cache list --offline
45+
- echo "yarn-offline-mirror \"/run/build/p3x-onenote/flatpak-node/yarn-mirror\"" >> .yarnrc
46+
- yarn cache dir --offline
47+
- yarn install --offline
3548
# Build the app; in this example the dist script
3649
# in package.json runs electron-builder
3750
- |
38-
. flatpak-node/electron-builder-arch-args.sh
51+
. ../flatpak-node/electron-builder-arch-args.sh
3952
npm run dist -- $ELECTRON_BUILDER_ARCH_ARGS --linux --dir
4053
# Bundle app and dependencies
4154
- cp -a dist/linux*unpacked /app/main
@@ -46,20 +59,20 @@ modules:
4659
#- install -Dm444 flatpak/br.com.eduk.metainfo.xml ${FLATPAK_DEST}/share/metainfo/${FLATPAK_ID}.metainfo.xml
4760
sources:
4861
# Getting project
49-
# - type: dir
50-
# path: ..
62+
#- type: dir
63+
# path: .
5164
# dest: main
5265
#- type: git
5366
# url: https://github.com/patrikx3/onenote.git
5467
# tag: v2024.4.146
5568
# dest: main
5669
- type: archive
5770
url: https://github.com/patrikx3/onenote/archive/refs/heads/master.tar.gz
58-
sha256: 515c4bda541283b8f639397d62870383214d00b4dbe95e2347cb2e1f78645d7a
71+
sha256: 22415610e6e10d49e5904eb9e36b9d10a934b05cb9034345725141a0c42abc38
5972
dest: main
6073
- generated-sources.json
6174
# Wrapper to launch the app
6275
- type: script
6376
dest-filename: run.sh
6477
commands:
65-
- zypak-wrapper.sh /app/main/onenote "$@"
78+
- zypak-wrapper.sh /app/main/p3x-onenote "$@"

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@
8686
"repo": "onenote"
8787
}
8888
],
89-
"appId": "org.p3x.onenote",
89+
"appId": "com.patrikx3.onenote",
9090
"copyright": "MIT",
9191
"productName": "P3X-OneNote",
9292
"linux": {

scripts/fix-packages-publish.js

+4
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ const asyncStart = async () => {
99
const pkg = JSON.parse((await fs.readFile(pkgFile)).toString())
1010

1111
switch(mode) {
12+
case 'flathub-before':
13+
delete pkg.build.afterAllArtifactBuild
14+
break;
15+
1216
case 'before':
1317
pkg.devDependencies.electron = pkg.dependencies.electron
1418
delete pkg.dependencies.electron

0 commit comments

Comments
 (0)