-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0778271
commit 5170ef1
Showing
18 changed files
with
678 additions
and
682 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
Binary file not shown.
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,3 @@ | ||
nodeLinker: node-modules | ||
supportedArchitectures: | ||
cpu: ['current', 'x64', 'arm64'] |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 |
---|---|---|
@@ -0,0 +1,121 @@ | ||
const { notarize } = require('@electron/notarize'); | ||
const binary = require('binary-info'); | ||
const { Arch } = require('electron-builder'); | ||
const { fdir } = require('fdir'); | ||
const { execSync } = require('node:child_process'); | ||
const { unlinkSync } = require('node:fs'); | ||
const Path = require('path'); | ||
|
||
module.exports = { | ||
appId: 'dev.ulixee.desktop', | ||
productName: 'Ulixee', | ||
directories: { | ||
buildResources: 'build-resources', | ||
}, | ||
files: [ | ||
'package.json', | ||
'!packages/**', | ||
'!dist', | ||
'main/**', | ||
'ui/**', | ||
'resources/*', | ||
'!.vscode', | ||
'!**/node_modules/*/{CHANGELOG.md,README.md,README,readme.md,readme}', | ||
'!**/node_modules/*/{test,__tests__,tests,powered-test,example,examples}', | ||
'!**/node_modules/*.d.ts', | ||
'!**/node_modules/.bin', | ||
], | ||
// asar: false, | ||
asarUnpack: ['resources/**', 'ui/**', '**/*.node', '**/connect'], | ||
npmRebuild: true, | ||
nativeRebuilder: 'parallel', | ||
mac: { | ||
defaultArch: 'arm64', | ||
category: 'public.app-category.developer-tools', | ||
target: { | ||
target: 'default', | ||
arch: ['x64', 'arm64'], | ||
}, | ||
hardenedRuntime: true, | ||
gatekeeperAssess: false, | ||
extendInfo: { | ||
LSUIElement: 1, | ||
}, | ||
entitlements: 'build-resources/entitlements.mac.plist', | ||
entitlementsInherit: 'build-resources/entitlements.mac.plist', | ||
notarize: false, // do this manually | ||
}, | ||
win: { | ||
target: 'NSIS', | ||
}, | ||
linux: { | ||
category: 'Development', | ||
target: 'AppImage', | ||
}, | ||
publish: { | ||
provider: 'github', | ||
releaseType: 'release', | ||
}, | ||
fileAssociations: [ | ||
{ | ||
ext: 'argon', | ||
name: 'ARGON', | ||
description: 'Argon Cash', | ||
icon: 'arg', | ||
rank: 'Owner', | ||
}, | ||
], | ||
async beforePack(context) { | ||
const path = require.resolve('@ulixee/unblocked-agent-mitm-socket/install.js'); | ||
console.log('Running install script', path); | ||
execSync(`node install.js`, { | ||
cwd: Path.dirname(path), | ||
stdio: 'inherit', | ||
env: { | ||
...process.env, | ||
npm_config_target_arch: Arch[context.arch], | ||
npm_config_target_platform: context.electronPlatformName, | ||
npm_config_cpu: Arch[context.arch], | ||
npm_config_os: context.electronPlatformName, | ||
}, | ||
}); | ||
}, | ||
async afterPack(context) { | ||
console.log('Removing incompatible binaries', context.appOutDir); | ||
const dirs = new fdir() | ||
.withFullPaths() | ||
.filter(path => binary.isIncompatible(path, context.electronPlatformName, Arch[context.arch])) | ||
.crawl(context.appOutDir) | ||
.sync(); | ||
for (const file of dirs) { | ||
try { | ||
unlinkSync(file); | ||
console.log('Deleted incompatible binary', file.split(Path.sep).slice(-2).join(Path.sep)); | ||
} catch (e) { | ||
console.error('Unable to delete file', file, e); | ||
} | ||
} | ||
}, | ||
async afterSign(context) { | ||
const { electronPlatformName, appOutDir } = context; | ||
|
||
if ( | ||
electronPlatformName !== 'darwin' || | ||
process.env.SKIP_NOTARIZE || | ||
process.env.CSC_IDENTITY_AUTO_DISCOVERY === 'false' | ||
) { | ||
return; | ||
} | ||
|
||
const appName = context.packager.appInfo.productFilename; | ||
|
||
return await notarize({ | ||
tool: 'notarytool', | ||
appPath: `${appOutDir}/${appName}.app`, | ||
appleApiKey: '~/.private_keys/AuthKey_27VRA75WCS.p8', | ||
appleApiKeyId: '27VRA75WCS', | ||
appleApiIssuer: 'a89474ed-637f-4cf0-8429-da45ef388882', | ||
// teamId: 'DY8K483XWV', | ||
}); | ||
}, | ||
}; |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
"version": "2.0.0-alpha.29", | ||
"description": "This is a builder project that uses the dual package.json approach (./app contains the app package.json).", | ||
"private": true, | ||
"author": "Ulixee Foundation", | ||
"main": "./main/index.js", | ||
"type": "commonjs", | ||
"license": "MIT", | ||
|
@@ -18,18 +19,16 @@ | |
"build": "yarn typecheck && yarn build:run", | ||
"build:deps": "electron-builder install-app-deps", | ||
"build:run": "vite build --config vite.config.ts", | ||
"build:unpack": "yarn build && CSC_IDENTITY_AUTO_DISCOVERY=false electron-builder --dir", | ||
"build:win": "yarn build && electron-builder --win", | ||
"build:mac": "yarn build && electron-builder --mac", | ||
"build:linux": "yarn build && electron-builder --linux", | ||
"dist:unpack": "yarn build && CSC_IDENTITY_AUTO_DISCOVERY=false electron-builder --dir", | ||
"dist:local": "shx rm -rf ~/.cache/config-file-ts && PYTHON=python3.10 electron-builder", | ||
"sync": "yarn sync:repos && yarn sync:build", | ||
"sync:build": "shx rm -rf node_modules/@ulixee && yarn install --refresh-lockfile", | ||
"sync:build": "rm yarn.lock && yarn install --check-resolutions", | ||
"sync:repos": "NODE_OPTIONS=\"-r ts-node/register --no-warnings\" node scripts/importMonorepo.ts", | ||
"sync:repos:dist": "yarn sync:repos build-dist", | ||
"unpack:asar": "npx @electron/asar extract dist/mac-arm64/Ulixee.app/Contents/Resources/app.asar dist/mac-arm64/app_unpacked" | ||
"unpack:asar": "npx @electron/asar extract dist/mac/Ulixee.app/Contents/Resources/app.asar dist/mac/app_unpacked" | ||
}, | ||
"dependencies": { | ||
"@argonprotocol/localchain": "0.0.8", | ||
"@argonprotocol/localchain": "^0.0.8", | ||
"@electron-toolkit/preload": "^3.0.0", | ||
"@ulixee/cloud": "2.0.0-alpha.29", | ||
"@ulixee/commons": "2.0.0-alpha.29", | ||
|
@@ -45,6 +44,7 @@ | |
"@ulixee/net": "2.0.0-alpha.29", | ||
"@ulixee/platform-specification": "2.0.0-alpha.29", | ||
"@ulixee/platform-utils": "2.0.0-alpha.29", | ||
"@ulixee/unblocked-agent-mitm-socket": "^2.0.0-alpha.29", | ||
"@ulixee/unblocked-specification": "2.0.0-alpha.29", | ||
"better-sqlite3": "^11.1.2", | ||
"electron-log": "^5.1.7", | ||
|
@@ -61,6 +61,7 @@ | |
"@electron-toolkit/eslint-config-ts": "^2.0.0", | ||
"@electron-toolkit/tsconfig": "^1.0.1", | ||
"@electron/asar": "^3.2.13", | ||
"@electron/notarize": "^2.5.0", | ||
"@headlessui/vue": "^1.7.17", | ||
"@heroicons/vue": "^2.1.1", | ||
"@rushstack/eslint-patch": "^1.10.3", | ||
|
@@ -75,11 +76,13 @@ | |
"@vue/eslint-config-typescript": "^13.0.0", | ||
"@webcomponents/custom-elements": "^1.6.0", | ||
"autoprefixer": "^10.4.17", | ||
"binary-info": "^0.1.0", | ||
"electron": "^32.1.0", | ||
"electron-builder": "25.0.5", | ||
"eslint": "^8.57.0", | ||
"eslint-plugin-prettier": "^5.1.3", | ||
"eslint-plugin-vue": "^9.26.0", | ||
"fdir": "^6.3.0", | ||
"magic-string": "^0.30.11", | ||
"moment": "^2.29.4", | ||
"pinia": "^2.1.7", | ||
|
@@ -117,5 +120,8 @@ | |
}, | ||
"swc": true | ||
}, | ||
"packageManager": "[email protected]" | ||
"resolutions": { | ||
"@electron/notarize": "2.5.0" | ||
}, | ||
"packageManager": "[email protected]" | ||
} |
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.