From 41be011d5e2480e23cda0e6ab38cb639f26ad435 Mon Sep 17 00:00:00 2001 From: Anton Bracke Date: Tue, 22 Feb 2022 10:41:55 +0100 Subject: [PATCH] move electron folder --- .github/workflows/build-and-release-desktop.yml | 14 +++++++------- .github/workflows/continuous_integration.yml | 10 +++++----- desktop/{ => electron}/.eslintrc.json | 0 desktop/{ => electron}/.gitignore | 0 desktop/{ => electron}/.prettierignore | 0 desktop/{ => electron}/.prettierrc.json | 0 .../{ => electron}/assets/icons/logo-round.png | Bin desktop/{ => electron}/assets/icons/logo-text.png | Bin .../{ => electron}/assets/icons/logo-white.png | Bin desktop/{ => electron}/assets/icons/logo.icns | Bin desktop/{ => electron}/assets/icons/logo.ico | Bin desktop/{ => electron}/assets/icons/logo.png | Bin desktop/{ => electron}/assets/icons/logo.svg | 0 desktop/{ => electron}/electron-builder.yml | 3 ++- desktop/{ => electron}/package.json | 4 ++-- desktop/{ => electron}/src/app.ts | 0 desktop/{ => electron}/src/auto-launch.ts | 0 desktop/{ => electron}/src/auto-updater.ts | 0 desktop/{ => electron}/src/ipc.ts | 0 desktop/{ => electron}/src/log.ts | 0 desktop/{ => electron}/src/main.ts | 0 desktop/{ => electron}/src/notification.ts | 0 desktop/{ => electron}/src/preload-app/preload.ts | 0 desktop/{ => electron}/src/preload-app/types.ts | 0 .../src/preload-local-app/preload.ts | 0 .../{ => electron}/src/preload-local-app/types.ts | 0 desktop/{ => electron}/src/serve.ts | 0 desktop/{ => electron}/src/settings.ts | 0 desktop/{ => electron}/src/shortcuts.ts | 0 desktop/{ => electron}/src/tray.ts | 0 desktop/{ => electron}/src/window.ts | 0 desktop/{ => electron}/tests/.gitkeep | 0 desktop/{ => electron}/tsconfig.json | 0 desktop/{ => electron}/yarn.lock | 0 desktop/local-app/src/lib/Sidebar.svelte | 4 ++-- desktop/local-app/src/views/Home.svelte | 2 +- 36 files changed, 19 insertions(+), 18 deletions(-) rename desktop/{ => electron}/.eslintrc.json (100%) rename desktop/{ => electron}/.gitignore (100%) rename desktop/{ => electron}/.prettierignore (100%) rename desktop/{ => electron}/.prettierrc.json (100%) rename desktop/{ => electron}/assets/icons/logo-round.png (100%) rename desktop/{ => electron}/assets/icons/logo-text.png (100%) rename desktop/{ => electron}/assets/icons/logo-white.png (100%) rename desktop/{ => electron}/assets/icons/logo.icns (100%) rename desktop/{ => electron}/assets/icons/logo.ico (100%) rename desktop/{ => electron}/assets/icons/logo.png (100%) rename desktop/{ => electron}/assets/icons/logo.svg (100%) rename desktop/{ => electron}/electron-builder.yml (90%) rename desktop/{ => electron}/package.json (92%) rename desktop/{ => electron}/src/app.ts (100%) rename desktop/{ => electron}/src/auto-launch.ts (100%) rename desktop/{ => electron}/src/auto-updater.ts (100%) rename desktop/{ => electron}/src/ipc.ts (100%) rename desktop/{ => electron}/src/log.ts (100%) rename desktop/{ => electron}/src/main.ts (100%) rename desktop/{ => electron}/src/notification.ts (100%) rename desktop/{ => electron}/src/preload-app/preload.ts (100%) rename desktop/{ => electron}/src/preload-app/types.ts (100%) rename desktop/{ => electron}/src/preload-local-app/preload.ts (100%) rename desktop/{ => electron}/src/preload-local-app/types.ts (100%) rename desktop/{ => electron}/src/serve.ts (100%) rename desktop/{ => electron}/src/settings.ts (100%) rename desktop/{ => electron}/src/shortcuts.ts (100%) rename desktop/{ => electron}/src/tray.ts (100%) rename desktop/{ => electron}/src/window.ts (100%) rename desktop/{ => electron}/tests/.gitkeep (100%) rename desktop/{ => electron}/tsconfig.json (100%) rename desktop/{ => electron}/yarn.lock (100%) diff --git a/.github/workflows/build-and-release-desktop.yml b/.github/workflows/build-and-release-desktop.yml index e2716929..cc0d4d48 100644 --- a/.github/workflows/build-and-release-desktop.yml +++ b/.github/workflows/build-and-release-desktop.yml @@ -62,24 +62,24 @@ jobs: - name: "Install dependencies" run: yarn install --froze-lockfile - working-directory: "desktop" + working-directory: "desktop/electron" - name: "Build typescript" run: yarn build - working-directory: "desktop" + working-directory: "desktop/electron" - name: "Build app" run: yarn bundle --publish never env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - working-directory: "desktop" + working-directory: "desktop/electron" if: ${{ github.event_name != 'release' }} - name: "Build & publish App" run: yarn release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - working-directory: "desktop" + working-directory: "desktop/electron" if: ${{ github.event_name == 'release' }} - name: Upload Linux .AppImage artifact @@ -87,18 +87,18 @@ jobs: if: startsWith(matrix.os, 'ubuntu') with: name: workadventure-desktop-linux-x64.AppImage - path: desktop/build/workadventure-desktop-*-x86_64.AppImage + path: desktop/electron/build/workadventure-desktop-*-x86_64.AppImage - name: Upload Windows .exe artifact uses: actions/upload-artifact@v2 if: startsWith(matrix.os, 'windows') with: name: workadventure-desktop-win-x64.exe - path: desktop/build/workadventure-desktop-*.exe + path: desktop/electron/build/workadventure-desktop-*.exe - name: Upload MacOS .dmg artifact uses: actions/upload-artifact@v2 if: startsWith(matrix.os, 'macos') with: name: workadventure-mac.dmg - path: desktop/build/workadventure-desktop-*.dmg + path: desktop/electron/build/workadventure-desktop-*.dmg diff --git a/.github/workflows/continuous_integration.yml b/.github/workflows/continuous_integration.yml index 202eb3c8..99fc6302 100644 --- a/.github/workflows/continuous_integration.yml +++ b/.github/workflows/continuous_integration.yml @@ -194,23 +194,23 @@ jobs: - name: "Build" run: yarn build - working-directory: "desktop" + working-directory: "desktop/electron" - name: "Typecheck" run: yarn typecheck - working-directory: "desktop" + working-directory: "desktop/electron" - name: "Lint" run: yarn lint - working-directory: "desktop" + working-directory: "desktop/electron" - name: "Jasmine" run: yarn test - working-directory: "desktop" + working-directory: "desktop/electron" - name: "Prettier" run: yarn pretty-check - working-directory: "desktop" + working-directory: "desktop/electron" continuous-integration-desktop-local-app: name: "Continuous Integration Desktop Local App" diff --git a/desktop/.eslintrc.json b/desktop/electron/.eslintrc.json similarity index 100% rename from desktop/.eslintrc.json rename to desktop/electron/.eslintrc.json diff --git a/desktop/.gitignore b/desktop/electron/.gitignore similarity index 100% rename from desktop/.gitignore rename to desktop/electron/.gitignore diff --git a/desktop/.prettierignore b/desktop/electron/.prettierignore similarity index 100% rename from desktop/.prettierignore rename to desktop/electron/.prettierignore diff --git a/desktop/.prettierrc.json b/desktop/electron/.prettierrc.json similarity index 100% rename from desktop/.prettierrc.json rename to desktop/electron/.prettierrc.json diff --git a/desktop/assets/icons/logo-round.png b/desktop/electron/assets/icons/logo-round.png similarity index 100% rename from desktop/assets/icons/logo-round.png rename to desktop/electron/assets/icons/logo-round.png diff --git a/desktop/assets/icons/logo-text.png b/desktop/electron/assets/icons/logo-text.png similarity index 100% rename from desktop/assets/icons/logo-text.png rename to desktop/electron/assets/icons/logo-text.png diff --git a/desktop/assets/icons/logo-white.png b/desktop/electron/assets/icons/logo-white.png similarity index 100% rename from desktop/assets/icons/logo-white.png rename to desktop/electron/assets/icons/logo-white.png diff --git a/desktop/assets/icons/logo.icns b/desktop/electron/assets/icons/logo.icns similarity index 100% rename from desktop/assets/icons/logo.icns rename to desktop/electron/assets/icons/logo.icns diff --git a/desktop/assets/icons/logo.ico b/desktop/electron/assets/icons/logo.ico similarity index 100% rename from desktop/assets/icons/logo.ico rename to desktop/electron/assets/icons/logo.ico diff --git a/desktop/assets/icons/logo.png b/desktop/electron/assets/icons/logo.png similarity index 100% rename from desktop/assets/icons/logo.png rename to desktop/electron/assets/icons/logo.png diff --git a/desktop/assets/icons/logo.svg b/desktop/electron/assets/icons/logo.svg similarity index 100% rename from desktop/assets/icons/logo.svg rename to desktop/electron/assets/icons/logo.svg diff --git a/desktop/electron-builder.yml b/desktop/electron/electron-builder.yml similarity index 90% rename from desktop/electron-builder.yml rename to desktop/electron/electron-builder.yml index 143c80b1..faca3d73 100644 --- a/desktop/electron-builder.yml +++ b/desktop/electron/electron-builder.yml @@ -3,7 +3,8 @@ appId: re.workadventu.desktop files: - "dist/**/*" - "assets/**/*" - - "local-app/dist/**/*" + - from: "../local-app/dist/" + to: "local-app/dist" directories: output: ./build diff --git a/desktop/package.json b/desktop/electron/package.json similarity index 92% rename from desktop/package.json rename to desktop/electron/package.json index 57d76e63..c0eabedb 100644 --- a/desktop/package.json +++ b/desktop/electron/package.json @@ -7,9 +7,9 @@ "license": "SEE LICENSE IN LICENSE.txt", "scripts": { "build": "tsup-node ./src/main.ts ./src/preload-local-app/preload.ts ./src/preload-app/preload.ts", - "build:local-app": "cd local-app && yarn && yarn build", + "build:local-app": "cd ../local-app && yarn && yarn build", "dev": "yarn build --watch --onSuccess 'yarn electron dist/main.js'", - "dev:local-app": "cd local-app && yarn && yarn dev", + "dev:local-app": "cd ../local-app && yarn && yarn dev", "bundle": "yarn build:local-app && yarn build && electron-builder install-app-deps && electron-builder", "release": "yarn bundle", "typecheck": "tsc --noEmit", diff --git a/desktop/src/app.ts b/desktop/electron/src/app.ts similarity index 100% rename from desktop/src/app.ts rename to desktop/electron/src/app.ts diff --git a/desktop/src/auto-launch.ts b/desktop/electron/src/auto-launch.ts similarity index 100% rename from desktop/src/auto-launch.ts rename to desktop/electron/src/auto-launch.ts diff --git a/desktop/src/auto-updater.ts b/desktop/electron/src/auto-updater.ts similarity index 100% rename from desktop/src/auto-updater.ts rename to desktop/electron/src/auto-updater.ts diff --git a/desktop/src/ipc.ts b/desktop/electron/src/ipc.ts similarity index 100% rename from desktop/src/ipc.ts rename to desktop/electron/src/ipc.ts diff --git a/desktop/src/log.ts b/desktop/electron/src/log.ts similarity index 100% rename from desktop/src/log.ts rename to desktop/electron/src/log.ts diff --git a/desktop/src/main.ts b/desktop/electron/src/main.ts similarity index 100% rename from desktop/src/main.ts rename to desktop/electron/src/main.ts diff --git a/desktop/src/notification.ts b/desktop/electron/src/notification.ts similarity index 100% rename from desktop/src/notification.ts rename to desktop/electron/src/notification.ts diff --git a/desktop/src/preload-app/preload.ts b/desktop/electron/src/preload-app/preload.ts similarity index 100% rename from desktop/src/preload-app/preload.ts rename to desktop/electron/src/preload-app/preload.ts diff --git a/desktop/src/preload-app/types.ts b/desktop/electron/src/preload-app/types.ts similarity index 100% rename from desktop/src/preload-app/types.ts rename to desktop/electron/src/preload-app/types.ts diff --git a/desktop/src/preload-local-app/preload.ts b/desktop/electron/src/preload-local-app/preload.ts similarity index 100% rename from desktop/src/preload-local-app/preload.ts rename to desktop/electron/src/preload-local-app/preload.ts diff --git a/desktop/src/preload-local-app/types.ts b/desktop/electron/src/preload-local-app/types.ts similarity index 100% rename from desktop/src/preload-local-app/types.ts rename to desktop/electron/src/preload-local-app/types.ts diff --git a/desktop/src/serve.ts b/desktop/electron/src/serve.ts similarity index 100% rename from desktop/src/serve.ts rename to desktop/electron/src/serve.ts diff --git a/desktop/src/settings.ts b/desktop/electron/src/settings.ts similarity index 100% rename from desktop/src/settings.ts rename to desktop/electron/src/settings.ts diff --git a/desktop/src/shortcuts.ts b/desktop/electron/src/shortcuts.ts similarity index 100% rename from desktop/src/shortcuts.ts rename to desktop/electron/src/shortcuts.ts diff --git a/desktop/src/tray.ts b/desktop/electron/src/tray.ts similarity index 100% rename from desktop/src/tray.ts rename to desktop/electron/src/tray.ts diff --git a/desktop/src/window.ts b/desktop/electron/src/window.ts similarity index 100% rename from desktop/src/window.ts rename to desktop/electron/src/window.ts diff --git a/desktop/tests/.gitkeep b/desktop/electron/tests/.gitkeep similarity index 100% rename from desktop/tests/.gitkeep rename to desktop/electron/tests/.gitkeep diff --git a/desktop/tsconfig.json b/desktop/electron/tsconfig.json similarity index 100% rename from desktop/tsconfig.json rename to desktop/electron/tsconfig.json diff --git a/desktop/yarn.lock b/desktop/electron/yarn.lock similarity index 100% rename from desktop/yarn.lock rename to desktop/electron/yarn.lock diff --git a/desktop/local-app/src/lib/Sidebar.svelte b/desktop/local-app/src/lib/Sidebar.svelte index 5d281e17..b0ec6333 100644 --- a/desktop/local-app/src/lib/Sidebar.svelte +++ b/desktop/local-app/src/lib/Sidebar.svelte @@ -53,12 +53,12 @@ > {#if isDevelopment} - + {/if} diff --git a/desktop/local-app/src/views/Home.svelte b/desktop/local-app/src/views/Home.svelte index f3603e00..3175be49 100644 --- a/desktop/local-app/src/views/Home.svelte +++ b/desktop/local-app/src/views/Home.svelte @@ -1,7 +1,7 @@