diff --git a/.github/workflows/stable.yml b/.github/workflows/stable.yml deleted file mode 100644 index abd99ff..0000000 --- a/.github/workflows/stable.yml +++ /dev/null @@ -1,196 +0,0 @@ -name: Release build -on: - push: - branches: - - stable - -env: - FORCE_COLOR: true - -jobs: - build-linux: - runs-on: ubuntu-latest - - steps: - - uses: actions/setup-node@v3 - with: - node-version: '18' - - - name: Checkout code - uses: actions/checkout@v2 - - - name: Install Node dependencies - run: npm install - - - name: Install Electron-Builder - run: npm install -g electron-builder - - - name: Build - run: npm run build && electron-builder --linux && electron-builder --arm64 --linux && electron-builder --armv7l --linux - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: List all files in the dist directory - run: ls -l dist - - name: Delete unpacked builds - run: rm -rf dist/linux-unpacked && rm -rf dist/linux-arm64-unpacked && rm -rf dist/linux-armv7l-unpacked - - name: Upload artifact - uses: actions/upload-artifact@v2 - with: - name: ArmCordLinux - path: dist/ - - - build-mac: - runs-on: macos-latest - - steps: - - uses: actions/setup-node@v3 - with: - node-version: '18' - - - name: Checkout code - uses: actions/checkout@v2 - - - name: Install Node dependencies - run: npm install - - - name: Install Electron-Builder - run: npm install -g electron-builder - - - name: Build - run: npm run build && electron-builder --macos - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: List all files in the dist directory - run: ls -l dist - - name: Delete unpacked builds - run: rm -rf dist/macos-unpacked - - - name: Upload artifact - uses: actions/upload-artifact@v2 - with: - name: ArmCordMac - path: dist/ - - build-windows: - runs-on: windows-latest - - steps: - - uses: actions/setup-node@v3 - with: - node-version: '18' - - - name: Checkout code - uses: actions/checkout@v2 - - - name: Install Node dependencies - run: npm install - - - name: Install Electron-Builder - run: npm install -g electron-builder - - - name: Build - run: npm run build && electron-builder --windows - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Delete unpacked builds - run: Remove-Item -LiteralPath ".\dist\win-unpacked" -Force -Recurse - - name: Upload artifact - uses: actions/upload-artifact@v2 - with: - name: ArmCordWindows - path: dist/ - - - release: - runs-on: ubuntu-latest - needs: [build-linux, build-mac, build-windows] - - steps: - - uses: actions/download-artifact@v2 - with: - name: ArmCordMac - path: macos - - - uses: actions/download-artifact@v2 - with: - name: ArmCordWindows - path: windows - - - uses: actions/download-artifact@v2 - with: - name: ArmCordLinux - path: linux - - name: ls - run: ls - - name: Delete unwanted directories - run: rm -rf {linux,macos,windows}/*/ - rm -rf {linux,macos,windows}/.icon* - rm -rf {linux,macos,windows}/builder-debug.yml - - name: ls dirs - run: ls linux && ls macos && ls windows - - name: Get some values needed for the release - id: vars - shell: bash - run: | - echo "::set-output name=releaseTag::$(git describe --tags --abbrev=0)" - - - uses: dev-drprasad/delete-tag-and-release@v0.2.0 - with: - delete_release: true - tag_name: v3.0.6 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Create Release - uses: actions/github-script@v2 - with: - github-token: ${{secrets.GITHUB_TOKEN}} - script: | - console.log('environment', process.versions); - - const fs = require('fs').promises; - - const { repo: { owner, repo }, sha } = context; - console.log({ owner, repo, sha }); - - const release = await github.repos.createRelease({ - owner, repo, - tag_name: process.env.releaseTag, - draft: true, - target_commitish: sha - }); - - console.log('created release', { release }); - - for (let file of await fs.readdir('linux')) { - // do whatever filtering you want here, I'm just uploading all the files - console.log('uploading', file); - await github.repos.uploadReleaseAsset({ - owner, repo, - release_id: release.data.id, - name: file, - data: await fs.readFile(`./linux/${file}`) - }); - } - for (let file of await fs.readdir('windows')) { - // do whatever filtering you want here, I'm just uploading all the files - console.log('uploading', file); - await github.repos.uploadReleaseAsset({ - owner, repo, - release_id: release.data.id, - name: file, - data: await fs.readFile(`./windows/${file}`) - }); - } - for (let file of await fs.readdir('macos')) { - // do whatever filtering you want here, I'm just uploading all the files - console.log('uploading', file); - await github.repos.uploadReleaseAsset({ - owner, repo, - release_id: release.data.id, - name: file, - data: await fs.readFile(`./macos/${file}`) - }); - } - env: - releaseTag: ${{ steps.vars.outputs.releaseTag }} \ No newline at end of file diff --git a/README.md b/README.md index 80e9f95..c204d55 100644 --- a/README.md +++ b/README.md @@ -73,7 +73,7 @@ ArmCord is also available on the Snap store [here](https://snapcraft.io/armcord) [electron-discord-webapp](https://github.com/SpacingBat3/electron-discord-webapp) [custom-electron-titlebar (css only)](https://github.com/AlexTorresSk/custom-electron-titlebar) [electron-builder](https://electron.build) -[OpenAsar](https://github.com/GooseMod/OpenAsar) +[OpenAsar (~~stole~~ borrowed code for adding custom build info seemlessly)](https://github.com/GooseMod/OpenAsar) # Sponsors [](https://jb.gg/OpenSourceSupport) diff --git a/build/icon.icns b/build/icon.icns deleted file mode 100644 index f030674..0000000 Binary files a/build/icon.icns and /dev/null differ diff --git a/package.json b/package.json index 8fbd10c..72ce55f 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "@types/node": "^17.0.33", "@types/ws": "^8.5.3", "copyfiles": "^2.4.1", - "electron": "^19.0.4", + "electron": "^18.2.4", "electron-builder": "^23.0.3", "husky": "^8.0.1", "prettier": "^2.6.2", @@ -44,7 +44,6 @@ "category": "Network" }, "linux": { - "icon": "build/icon.icns", "category": "Network", "maintainer": "smartfrigde@gmail.com", "target": [ diff --git a/src/content/setup.html b/src/content/setup.html index 4b9d4bd..6ed4c94 100644 --- a/src/content/setup.html +++ b/src/content/setup.html @@ -101,7 +101,6 @@ automaticPatches: false, mods: "cumcord", inviteWebsocket: true, - performanceMode: "none", blurType: "acrylic" }); setTimeout(() => window.armcordinternal.restart(), 5000); @@ -131,7 +130,6 @@ autoLaunch: true, minimizeToTray: true, automaticPatches: false, - performanceMode: "none", mods: options.mod, inviteWebsocket: true, blurType: "acrylic" @@ -147,7 +145,6 @@ automaticPatches: false, autoLaunch: true, mods: "none", - performanceMode: "none", inviteWebsocket: true, blurType: "acrylic" }); diff --git a/src/main.ts b/src/main.ts index 8d1abb9..ec61b77 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,7 +1,7 @@ // Modules to control application life and create native browser window import {app, BrowserWindow, session, dialog} from "electron"; import "v8-compile-cache"; -import {getConfig, setup, checkIfConfigExists, injectElectronFlags} from "./utils"; +import {getConfig, setup, checkIfConfigExists} from "./utils"; import "./extensions/mods"; import "./extensions/plugin"; import "./tray"; @@ -12,7 +12,6 @@ export var settings: any; export var customTitlebar: boolean; export var tabs: boolean; - if (process.platform == "linux") { if (process.env.$XDG_SESSION_TYPE == "wayland") { console.log("Wayland specific patches applied."); @@ -25,7 +24,7 @@ if (process.platform == "linux") { } } checkIfConfigExists(); -injectElectronFlags(); + app.whenReady().then(async () => { switch (await getConfig("windowStyle")) { case "default": diff --git a/src/preload/preload.ts b/src/preload/preload.ts index fcde5a0..2d3fd71 100644 --- a/src/preload/preload.ts +++ b/src/preload/preload.ts @@ -50,30 +50,8 @@ if (window.location.href.indexOf("splash.html") > -1) { } }); } -/* -MIT License -Copyright (c) 2022 GooseNest - -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. -*/ -// Settings info version injection +// Settings info version injection (Stolen and modified from OpenAsar, mwuh ha ha ha ha >:D) setInterval(() => { const host = document.getElementsByClassName("info-3pQQBb")[0]; if (!host || document.querySelector("#ac-ver")) return; diff --git a/src/settings/settings.html b/src/settings/settings.html index c57151c..7d723c5 100644 --- a/src/settings/settings.html +++ b/src/settings/settings.html @@ -58,14 +58,7 @@
Client mod:
-Performance mode:
-