aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Lee <andrew@alee14.me>2025-04-23 20:23:51 -0400
committerAndrew Lee <andrew@alee14.me>2025-04-23 20:23:51 -0400
commit983fb3ae3c832b33a7259d56d74a56a6db60e32f (patch)
treeaec64f428ae06b5d8d8aa2c2d42b6f03b6a9b320
parent911307d3e0997d711a2e147429d34d3c2f8abf89 (diff)
downloadalaska-client-983fb3ae3c832b33a7259d56d74a56a6db60e32f.tar.gz
alaska-client-983fb3ae3c832b33a7259d56d74a56a6db60e32f.tar.bz2
alaska-client-983fb3ae3c832b33a7259d56d74a56a6db60e32f.zip
Client works with electron-builderHEADv1.0.0master
-rw-r--r--.github/workflows/build.yml43
-rw-r--r--LICENSE.md21
-rw-r--r--README.md2
-rw-r--r--index.js18
-rw-r--r--package.json13
-rw-r--r--yarn.lock10
6 files changed, 52 insertions, 55 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
deleted file mode 100644
index 2734b97..0000000
--- a/.github/workflows/build.yml
+++ /dev/null
@@ -1,43 +0,0 @@
-# This is a basic workflow to help you get started with Actions
-
-name: CI
-
-# Controls when the workflow will run
-on: push
-jobs:
- release:
- runs-on: ${{ matrix.os }}
-
- strategy:
- matrix:
- os: [macos-latest, ubuntu-latest, windows-latest]
-
- steps:
- - name: Installing dependencies for Ubuntu
- if: startsWith(matrix.os, 'ubuntu')
- run: sudo apt install --no-install-recommends -y libopenjp2-tools libarchive-tools
-
- - name: Check out Git repository
- uses: actions/checkout@v3
-
- - name: Install Node.js, NPM and Yarn
- uses: actions/setup-node@v3
- with:
- node-version: 16
-
- - name: Build/release Electron app
- uses: samuelmeuli/action-electron-builder@v1
- with:
- # GitHub token, automatically provided to the action
- # (No need to define this secret in the repo settings)
- github_token: ${{ secrets.github_token }}
-
- args: "--x64"
-
- max_attempts: "3"
-
- # If the commit is tagged with a version (e.g. "v1.0.0"),
- # release the app after building
- release: ${{ startsWith(github.ref, 'refs/tags/v') }}
-
-
diff --git a/LICENSE.md b/LICENSE.md
new file mode 100644
index 0000000..39d6944
--- /dev/null
+++ b/LICENSE.md
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2025 Andrew Lee
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..28376c2
--- /dev/null
+++ b/README.md
@@ -0,0 +1,2 @@
+# Alaska Client
+Electron Flash client \ No newline at end of file
diff --git a/index.js b/index.js
index 37e0691..69af246 100644
--- a/index.js
+++ b/index.js
@@ -11,16 +11,24 @@ autoUpdater.logger = log;
autoUpdater.logger.transports.file.level = 'info';
const pluginPaths = {
- win32: path.join(__dirname, 'plugin/pepflashplayer.dll'),
- darwin: path.join(__dirname, 'plugin/PepperFlashPlayer.plugin'),
- linux: path.join(__dirname, 'plugin/libpepflashplayer.so')
-}
+ win32: path.join(app.getAppPath(), 'plugin/pepflashplayer.dll'),
+ darwin: path.join(app.getAppPath(), 'plugin/PepperFlashPlayer.plugin'),
+ linux: path.join(app.getAppPath(), 'plugin/libpepflashplayer.so')
+};
const pluginName = pluginPaths[process.platform];
if (process.platform === 'linux') app.commandLine.appendSwitch('--no-sandbox');
app.commandLine.appendSwitch('ignore-certificate-errors');
-app.commandLine.appendSwitch('ppapi-flash-path', pluginName);
+
+if (process.mainModule.filename.includes('app.asar')) {
+ const unpackedPath = pluginName.replace('app.asar', 'app.asar.unpacked');
+ console.log(`Adjusted plugin path for asar: ${unpackedPath}`);
+ app.commandLine.appendSwitch('ppapi-flash-path', unpackedPath);
+} else {
+ app.commandLine.appendSwitch('ppapi-flash-path', pluginName);
+}
+
app.commandLine.appendSwitch('ppapi-flash-version', '31.0.0.122');
app.on('window-all-closed', () => {
diff --git a/package.json b/package.json
index 040919c..3214413 100644
--- a/package.json
+++ b/package.json
@@ -6,8 +6,8 @@
"main": "index.js",
"license": "MIT",
"dependencies": {
- "electron-updater": "^6.6.2",
- "electron-log": "^5.3.4"
+ "electron-log": "^5.3.4",
+ "electron-updater": "^6.6.2"
},
"devDependencies": {
"electron": "11.5.0",
@@ -22,6 +22,9 @@
"productName": "Alaska Client",
"copyright": "© Copyright 2025, Andrew Lee",
"linux": {
+ "asarUnpack": [
+ "plugin/**"
+ ],
"target": [
"tar.gz",
"appimage",
@@ -31,6 +34,9 @@
"publish": "github"
},
"win": {
+ "asarUnpack": [
+ "plugin/**"
+ ],
"target": [
"zip",
"portable",
@@ -39,6 +45,9 @@
"publish": "github"
},
"mac": {
+ "asarUnpack": [
+ "plugin/**"
+ ],
"target": [
"zip",
"dmg"
diff --git a/yarn.lock b/yarn.lock
index 8b3e05c..efb711d 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -58,9 +58,9 @@
global-agent "^3.0.0"
global-tunnel-ng "^2.7.1"
-"@electron/node-gyp@https://github.com/electron/node-gyp#06b29aafb7708acef8b3669835c8a7857ebc92d2":
+"@electron/node-gyp@git+https://github.com/electron/node-gyp.git#06b29aafb7708acef8b3669835c8a7857ebc92d2":
version "10.2.0-electron.1"
- resolved "https://github.com/electron/node-gyp#06b29aafb7708acef8b3669835c8a7857ebc92d2"
+ resolved "git+https://github.com/electron/node-gyp.git#06b29aafb7708acef8b3669835c8a7857ebc92d2"
dependencies:
env-paths "^2.2.0"
exponential-backoff "^3.1.1"
@@ -812,9 +812,9 @@ delayed-stream@~1.0.0:
integrity sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==
detect-libc@^2.0.1:
- version "2.0.3"
- resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-2.0.3.tgz#f0cd503b40f9939b894697d19ad50895e30cf700"
- integrity sha512-bwy0MGW55bG41VqxxypOsdSdGqLwXPI/focwgTYCFMbdUiBAxLg9CFzG08sz2aqzknwiX7Hkl0bQENjg8iLByw==
+ version "2.0.4"
+ resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-2.0.4.tgz#f04715b8ba815e53b4d8109655b6508a6865a7e8"
+ integrity sha512-3UDv+G9CsCKO1WKMGw9fwq/SWJYbI0c5Y7LU1AXYoDdbhE2AHQ6N6Nb34sG8Fj7T5APy8qXDCKuuIHd1BR0tVA==
detect-node@^2.0.4:
version "2.1.0"