-
Notifications
You must be signed in to change notification settings - Fork 210
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #318 from viktor44/windows-7
Station for Windows 7
- Loading branch information
Showing
24 changed files
with
503 additions
and
852 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,57 +4,6 @@ on: | |
branches: | ||
- release | ||
jobs: | ||
Linux: | ||
runs-on: ubuntu-latest | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
GOOGLE_CLIENT_ID: ${{ secrets.GOOGLE_CLIENT_ID }} | ||
GOOGLE_CLIENT_SECRET: ${{ secrets.GOOGLE_CLIENT_SECRET }} | ||
steps: | ||
- uses: actions/checkout@master | ||
- uses: actions/setup-node@master | ||
with: | ||
node-version: "18" | ||
cache: "yarn" | ||
# See https://github.com/nodejs/node-gyp/blob/main/docs/Force-npm-to-use-global-node-gyp.md | ||
# https://github.com/nodejs/node-gyp/blob/main/docs/Updating-npm-bundled-node-gyp.md | ||
# - name: Update node-gyp | ||
# run: | | ||
# npm install --global [email protected] | ||
# npm config set node_gyp $(npm prefix -g)/lib/node_modules/node-gyp/bin/node-gyp.js | ||
- name: Install dependencies | ||
run: yarn install --frozen-lockfile && yarn run rebuild-all-native | ||
- name: Build and Release | ||
run: yarn run release | ||
|
||
MacOs: | ||
runs-on: macos-13 | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }} | ||
CSC_LINK: ${{ secrets.CSC_LINK }} | ||
AC_USERNAME: ${{ secrets.AC_USERNAME }} | ||
AC_PASSWORD: ${{ secrets.AC_PASSWORD }} | ||
AC_TEAM_ID: ${{ secrets.AC_TEAM_ID }} | ||
GOOGLE_CLIENT_ID: ${{ secrets.GOOGLE_CLIENT_ID }} | ||
GOOGLE_CLIENT_SECRET: ${{ secrets.GOOGLE_CLIENT_SECRET }} | ||
steps: | ||
- uses: actions/checkout@master | ||
- uses: actions/setup-node@master | ||
with: | ||
node-version: "18" | ||
cache: "yarn" | ||
- name: Configure Node | ||
run: | | ||
# npm v9 doesn't allow custom config parameters (i.e. node_gyp) anymode, so we have to downgrade it to v8 | ||
npm install -g npm@8 | ||
npm install -g node-gyp@latest | ||
npm config set node_gyp $(npm prefix -g)/lib/node_modules/node-gyp/bin/node-gyp.js | ||
- name: Install dependencies | ||
run: yarn install --frozen-lockfile && yarn run rebuild-all-native | ||
- name: Build and Release | ||
run: yarn run release | ||
|
||
Windows: | ||
runs-on: windows-2019 | ||
env: | ||
|
@@ -67,18 +16,16 @@ jobs: | |
- uses: actions/checkout@master | ||
- uses: actions/setup-node@master | ||
with: | ||
node-version: "18" | ||
node-version: "16" | ||
- name: Configure Node | ||
shell: powershell | ||
run: | | ||
# npm v9 doesn't allow custom config parameters (i.e. node_gyp) anymode, so we have to downgrade it to v8 | ||
npm install -g npm@8 | ||
npm install -g node-gyp@latest | ||
npm prefix -g | % {npm config set node_gyp "$_\node_modules\node-gyp\bin\node-gyp.js"} | ||
# npm install --global [email protected] | ||
# npm prefix -g | % {npm config set node_gyp "$_\node_modules\node-gyp\bin\node-gyp.js"} | ||
npm config set registry "http://registry.npmjs.org" | ||
yarn config set registry "http://registry.npmjs.org" | ||
yarn config set network-timeout 300000 | ||
- name: Install dependencies | ||
run: yarn install --frozen-lockfile && yarn run rebuild-all-native | ||
- name: Build and Release | ||
run: yarn run release | ||
run: yarn run release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,52 +11,6 @@ on: | |
- "README.md" | ||
- "CHANGELOG.md" | ||
jobs: | ||
Linux: | ||
runs-on: ubuntu-latest | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
steps: | ||
- uses: actions/checkout@master | ||
- uses: actions/setup-node@master | ||
with: | ||
node-version: "18" | ||
cache: "yarn" | ||
# - name: Update node-gyp | ||
# run: | | ||
# npm install --global [email protected] | ||
# npm config set node_gyp $(npm prefix -g)/lib/node_modules/node-gyp/bin/node-gyp.js | ||
- name: Install dependencies | ||
run: yarn install --frozen-lockfile --prefer-offline && yarn run rebuild-all-native | ||
# - name: Lint | ||
# run: yarn run lint:ci | ||
- name: Build | ||
run: yarn run build | ||
|
||
MacOs: | ||
runs-on: macos-latest | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
steps: | ||
- uses: actions/checkout@master | ||
- uses: actions/setup-node@master | ||
with: | ||
node-version: "18" | ||
cache: "yarn" | ||
- name: Configure Node | ||
run: | | ||
# npm v9 doesn't allow custom config parameters (i.e. node_gyp) anymode, so we have to downgrade it to v8 | ||
npm install -g npm@8 | ||
npm install -g node-gyp@latest | ||
npm config set node_gyp $(npm prefix -g)/lib/node_modules/node-gyp/bin/node-gyp.js | ||
- name: Install dependencies | ||
run: yarn install --frozen-lockfile --prefer-offline && yarn run rebuild-all-native | ||
# - name: Lint | ||
# run: yarn run lint:ci | ||
- name: Tests | ||
run: yarn run test | ||
- name: Build | ||
run: yarn run build | ||
|
||
Windows: | ||
runs-on: windows-2019 | ||
env: | ||
|
@@ -65,15 +19,13 @@ jobs: | |
- uses: actions/checkout@master | ||
- uses: actions/setup-node@master | ||
with: | ||
node-version: "18" | ||
node-version: "16" | ||
cache: "yarn" | ||
- name: Configure Node | ||
shell: powershell | ||
run: | | ||
# npm v9 doesn't allow custom config parameters (i.e. node_gyp) anymode, so we have to downgrade it to v8 | ||
npm install -g npm@8 | ||
npm install -g node-gyp@latest | ||
npm prefix -g | % {npm config set node_gyp "$_\node_modules\node-gyp\bin\node-gyp.js"} | ||
# npm install --global [email protected] | ||
# npm prefix -g | % {npm config set node_gyp "$_\node_modules\node-gyp\bin\node-gyp.js"} | ||
npm config set registry "http://registry.npmjs.org" | ||
yarn config set registry "http://registry.npmjs.org" | ||
yarn config set network-timeout 300000 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
runtime = electron | ||
disturl = https://electronjs.org/headers | ||
target = 25.9.8 | ||
target = 22.3.27 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
18.15.0 | ||
16.17.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,12 @@ | ||
import { autoUpdater as autoUpdaterProd } from 'electron-updater'; | ||
|
||
import { isPackaged } from '../../../utils/env'; | ||
import { isWindows7 } from '../../../utils/process'; | ||
import AutoUpdaterMock from './AutoUpdaterMock'; | ||
import { autoUpdater as autoUpdaterProd } from 'electron-updater'; | ||
|
||
if (isPackaged) { | ||
autoUpdaterProd.allowPrerelease = false; | ||
} | ||
|
||
export const autoUpdater = isPackaged ? autoUpdaterProd : new AutoUpdaterMock(); | ||
export const autoUpdater = isPackaged && !isWindows7() // Disable auto update for Windows | ||
? autoUpdaterProd : new AutoUpdaterMock(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,32 @@ | ||
import { net, protocol } from 'electron'; | ||
import { protocol } from 'electron'; | ||
import { dirname } from 'path'; | ||
import { pathToFileURL } from 'url'; | ||
import { parse } from 'url'; | ||
import { BX_PROTOCOL } from './const'; | ||
import handlers from './handlers'; | ||
|
||
protocol.registerSchemesAsPrivileged([ | ||
{ | ||
scheme: BX_PROTOCOL, | ||
privileges: { | ||
standard: true, | ||
secure: true, | ||
} | ||
}, | ||
{ scheme: BX_PROTOCOL, privileges: { standard: true, secure: true } }, | ||
]); | ||
|
||
export function start() { | ||
protocol.handle(BX_PROTOCOL, (req: GlobalRequest) => { | ||
const parsedUrl = new URL(req.url); | ||
protocol.registerFileProtocol(BX_PROTOCOL, (req, callback) => { | ||
const parsedUrl = parse(req.url); | ||
const handler = handlers.find(h => h.hostname === parsedUrl.hostname); | ||
|
||
if (!handler) { | ||
return new Response(new Blob([`Handler not found for ${req.url}`]), { status: 404 }); | ||
// @ts-ignore | ||
return callback(-6); // file not found | ||
} | ||
|
||
if (!parsedUrl.pathname) { | ||
return new Response(new Blob([`Empty path in ${req.url}`]), { status: 404 }); | ||
// @ts-ignore | ||
return callback(-6); // file not found | ||
} | ||
|
||
if (parsedUrl.pathname !== '/') { | ||
const fileUrl = `${dirname(handler.filePath)}/${parsedUrl.pathname.substring(1)}`; | ||
return net.fetch(pathToFileURL(fileUrl).toString()); | ||
return callback(`${dirname(handler.filePath)}/${parsedUrl.pathname.substr(1)}`); | ||
} | ||
|
||
return net.fetch(pathToFileURL(handler.filePath).toString()); | ||
return callback(handler.filePath); | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.