diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml deleted file mode 100644 index 2435a03..0000000 --- a/.github/workflows/codeql.yml +++ /dev/null @@ -1,51 +0,0 @@ -name: "CodeQL" - -on: - push: - branches: [ "develop", master, staging ] - pull_request: - # The branches below must be a subset of the branches above - branches: [ "develop" ] - schedule: - - cron: '19 9 * * 6' - -jobs: - analyze: - name: Analyze - runs-on: ubuntu-latest - permissions: - actions: read - contents: read - security-events: write - - strategy: - fail-fast: false - matrix: - # We have a single C file for the rebrand_stub which we don't want/need to analyse - # but it prevents us from using the built-in CodeQL scanner - language: [ 'javascript' ] - # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] - # Use only 'java' to analyze code written in Java, Kotlin or both - # Use only 'javascript' to analyze code written in JavaScript, TypeScript or both - # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support - - steps: - - name: Checkout repository - uses: actions/checkout@v3 - - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@v2 - with: - languages: ${{ matrix.language }} - # If you wish to specify custom queries, you can do so here or in a config file. - # By default, queries listed here will override any specified in a config file. - # Prefix the list here with "+" to use these queries and those in the config file. - - # Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs - # queries: security-extended,security-and-quality - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 - with: - category: "/language:${{matrix.language}}" diff --git a/build/rebrand_stub/rebrand_stub.c b/build/rebrand_stub/rebrand_stub.c deleted file mode 100644 index bd6e194..0000000 --- a/build/rebrand_stub/rebrand_stub.c +++ /dev/null @@ -1,51 +0,0 @@ -#include -#include -#include -#include - -/* - * This just runs 'Element.exe' with the same args as - * this process was invoked with. This gets around the fact that - * squirrel always tries to run an executable with the same name, - * so fails to restart if the app's name has changed. - */ -void _tmain( int argc, TCHAR *argv[] ) -{ - LPSTR myCmdLine = GetCommandLineA(); - char cmdLine[32767]; - - LPSTR cmdLinePos = cmdLine; - LPSTR toRun = "\"Element.exe\" "; - strncpy(cmdLinePos, toRun, strlen(toRun)); - cmdLinePos += strlen(toRun); - - if (myCmdLine[0] == '"') ++myCmdLine; - myCmdLine += strlen(argv[0]); - if (myCmdLine[0] == '"') ++myCmdLine; - if (myCmdLine[0] == ' ') ++myCmdLine; - - strncpy(cmdLinePos, myCmdLine, (cmdLine + 32767) - cmdLinePos); - - STARTUPINFO si; - PROCESS_INFORMATION pi; - - ZeroMemory(&si, sizeof(si)); - si.cb = sizeof(si); - ZeroMemory(&pi, sizeof(pi)); - - if (!CreateProcess(NULL, - cmdLine, // Command line - NULL, // Process handle not inheritable - NULL, // Thread handle not inheritable - FALSE, // Set handle inheritance to FALSE - 0, // No creation flags - NULL, // Use parent's environment block - NULL, // Use parent's starting directory - &si, // Pointer to STARTUPINFO structure - &pi ) // Pointer to PROCESS_INFORMATION structure - ) - { - printf("CreateProcess failed (%d).\n", GetLastError()); - return; - } -} diff --git a/build/rebrand_stub/rebrand_stub.exe b/build/rebrand_stub/rebrand_stub.exe deleted file mode 100644 index 9d083f4..0000000 Binary files a/build/rebrand_stub/rebrand_stub.exe and /dev/null differ diff --git a/package.json b/package.json index 18b537b..2e1a8d9 100644 --- a/package.json +++ b/package.json @@ -160,7 +160,6 @@ "directories": { "output": "dist" }, - "afterPack": "scripts/electron_afterPack", "protocols": [ { "name": "element", diff --git a/scripts/electron_afterPack.js b/scripts/electron_afterPack.js deleted file mode 100644 index 82a2397..0000000 --- a/scripts/electron_afterPack.js +++ /dev/null @@ -1,15 +0,0 @@ -const fsProm = require("fs").promises; -const path = require("path"); - -exports.default = async function (context) { - const { electronPlatformName, appOutDir } = context; - - // Squirrel windows will try to relaunch the app using an executable of the same name as - // before in the new version, so will fail if the executable is now called something else. - // We add a fake Riot.exe that it can run which runs the real one. - // This also gets signed automatically, presumably because electron-build just looks for all - // exe files and signs them all... - if (electronPlatformName === "win32") { - await fsProm.copyFile("build/rebrand_stub/rebrand_stub.exe", path.join(appOutDir, "Riot.exe")); - } -};