Skip to content

Commit 2e50e86

Browse files
committed
Remove desktop workspace due to packager not recognizing hoisted modules
1 parent c5330d0 commit 2e50e86

File tree

6 files changed

+5862
-13
lines changed

6 files changed

+5862
-13
lines changed

.github/workflows/build-desktop.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
build:
1616
strategy:
1717
matrix:
18-
os: [windows-latest, ubuntu-latest]
18+
os: [windows-latest, ubuntu-latest, macos-latest]
1919
runs-on: ${{ matrix.os }}
2020

2121
steps:
@@ -43,10 +43,12 @@ jobs:
4343
run: npm install --workspace=web
4444

4545
- name: Install desktop dependencies
46-
run: npm install --workspace=desktop
46+
run: npm install
47+
working-directory: desktop
4748

4849
- name: Rebuild native modules
49-
run: npm run rebuild-native --workspace=desktop
50+
run: npm run rebuild-native
51+
working-directory: desktop
5052

5153
- name: Build Electron App
5254
run: |

.github/workflows/build-mobile.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ jobs:
2525
- name: Checkout
2626
uses: actions/checkout@v4
2727

28-
- name: Set up JDK 17
28+
- name: Set up JDK 21
2929
uses: actions/setup-java@v3
3030
with:
31-
java-version: "17"
31+
java-version: "21"
3232
distribution: "temurin"
3333

3434
- name: Setup Android SDK
@@ -43,6 +43,7 @@ jobs:
4343
run: |
4444
mkdir .keystore
4545
echo ${{ secrets.ANDROID_KEYSTORE }} | base64 --decode > .keystore/keystore.jks
46+
working-directory: mobile
4647

4748
- name: Setup Node.js
4849
uses: actions/setup-node@v4
@@ -78,5 +79,6 @@ jobs:
7879
working-directory: mobile
7980

8081
- name: Build Capacitor App
81-
run: npx cap build android --keystorepath .keystore/keystore.jks --keystorepass ${{ secrets.ANDROID_KEYSTORE_PASS }} --androidreleasetype APK
82+
run: npx cap build android --keystorepath ./.keystore/keystore.jks --keystorepass ${{ secrets.ANDROID_KEYSTORE_PASS }} --androidreleasetype APK
8283
working-directory: mobile
84+

desktop/forge.config.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import fs from "fs-extra";
55
function moveModule(moduleList: string[], resourcePath: string) {
66
moduleList.forEach((module) => {
77
fs.moveSync(
8-
path.join(resourcePath, module),
8+
path.join("./node_modules", module),
99
path.join(resourcePath, "app/node_modules", module)
1010
);
1111
});
@@ -20,7 +20,7 @@ const config: ForgeConfig = {
2020
icon: path.join(__dirname, "../shared-assets/icons/electron/pulse_editor"),
2121
// Copy the electron modules and the nextjs build to the electron build.
2222
extraResource: electronModules
23-
.map((module) => `../node_modules/${module}`)
23+
.map((module) => `./node_modules/${module}`)
2424
.concat("../build/next"),
2525
afterComplete: [
2626
(extractPath, electronVersion, platform, arch, done) => {
@@ -34,7 +34,6 @@ const config: ForgeConfig = {
3434
path.join(extractPath, "pulse-editor.app/Contents/Resources")
3535
);
3636
} else if (platform === "linux") {
37-
moveModule(electronModules, path.join(extractPath, "resources"));
3837
}
3938

4039
done();

0 commit comments

Comments
 (0)