add universal package for macOS
This commit is contained in:
parent
704d235feb
commit
29d6146e02
1
app/build.d.ts
vendored
1
app/build.d.ts
vendored
|
@ -10,5 +10,6 @@ declare function _exports(options?: {
|
||||||
skipLinux?: boolean;
|
skipLinux?: boolean;
|
||||||
skipMacOS?: boolean;
|
skipMacOS?: boolean;
|
||||||
unnotarize?: boolean;
|
unnotarize?: boolean;
|
||||||
|
skipUniversal?: boolean;
|
||||||
}): void;
|
}): void;
|
||||||
export = _exports;
|
export = _exports;
|
||||||
|
|
28
app/build.js
28
app/build.js
|
@ -177,14 +177,8 @@ async function cmd(options) {
|
||||||
if (isTrue(options, 'unnotarize')) delete config.mac.entitlements
|
if (isTrue(options, 'unnotarize')) delete config.mac.entitlements
|
||||||
if (isTrue(options, 'unnotarize')) delete config.mac.entitlementsInherit
|
if (isTrue(options, 'unnotarize')) delete config.mac.entitlementsInherit
|
||||||
if (isTrue(options, 'unnotarize')) process.env.CSC_IDENTITY_AUTO_DISCOVERY = false
|
if (isTrue(options, 'unnotarize')) process.env.CSC_IDENTITY_AUTO_DISCOVERY = false
|
||||||
if (arch === 'x64') {
|
if (isTrue(options, 'unnotarize')) delete config.afterSign
|
||||||
if (!isTrue(options, 'skipX64')) {
|
if (!isTrue(options, 'skipUniversal')) await build(Platform.MAC, Arch.universal, config)
|
||||||
await build(Platform.MAC, Arch.x64, config)
|
|
||||||
fs.renameSync(
|
|
||||||
`../build/TheDesk-${version}.dmg`,
|
|
||||||
`../build/TheDesk-${version}-x64.dmg`
|
|
||||||
)
|
|
||||||
}
|
|
||||||
if (isTrue(options, 'withArm64')) {
|
if (isTrue(options, 'withArm64')) {
|
||||||
await build(Platform.MAC, Arch.arm64, config)
|
await build(Platform.MAC, Arch.arm64, config)
|
||||||
fs.renameSync(
|
fs.renameSync(
|
||||||
|
@ -192,21 +186,13 @@ async function cmd(options) {
|
||||||
`../build/TheDesk-${version}-arm64.dmg`
|
`../build/TheDesk-${version}-arm64.dmg`
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
fs.renameSync(
|
if (isTrue(options, 'withX64')) {
|
||||||
`../build/TheDesk-${version}-x64.dmg`,
|
await build(Platform.MAC, Arch.x64, config)
|
||||||
`../build/TheDesk-${version}.dmg`
|
|
||||||
)
|
|
||||||
}
|
|
||||||
if (arch === 'arm64') {
|
|
||||||
if (isTrue(options, 'unnotarize')) delete config.afterSign
|
|
||||||
await build(Platform.MAC, Arch.arm64, config)
|
|
||||||
fs.renameSync(
|
fs.renameSync(
|
||||||
`../build/TheDesk-${version}.dmg`,
|
`../build/TheDesk-${version}.dmg`,
|
||||||
`../build/TheDesk-${version}-arm64.dmg`
|
`../build/TheDesk-${version}-x64.dmg`
|
||||||
)
|
)
|
||||||
if (!isTrue(options, 'skipX64')) await build(Platform.MAC, Arch.x64, config)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -246,6 +232,10 @@ TheDesk Builder command tool
|
||||||
|
|
||||||
[only macOS]
|
[only macOS]
|
||||||
--unnotarize: Without notarize
|
--unnotarize: Without notarize
|
||||||
|
Build as a "universal" package.
|
||||||
|
--skipUniversal: skip build for universal enviroment
|
||||||
|
--withX64: build x64-only build
|
||||||
|
--withArm64: build arm64-only build
|
||||||
`
|
`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
"build": "node buildCli.js",
|
"build": "node buildCli.js",
|
||||||
"build:pwa": "node view/make/makeCli.js --pwa",
|
"build:pwa": "node view/make/makeCli.js --pwa",
|
||||||
"build:all:x64": "node buildCli.js --withStore",
|
"build:all:x64": "node buildCli.js --withStore",
|
||||||
"build:all": "node buildCli.js --withStore --withIa32 --withArm64",
|
"build:all": "node buildCli.js --withStore --withX64 --withIa32 --withArm64",
|
||||||
"lint:fix": "eslint js --fix",
|
"lint:fix": "eslint js --fix",
|
||||||
"lint": "eslint js"
|
"lint": "eslint js"
|
||||||
},
|
},
|
||||||
|
|
|
@ -97,8 +97,7 @@
|
||||||
<button class="waves-effect btn linux hide" onclick="update('linux')" style="margin-left: 15px;">@@linux@@</button>
|
<button class="waves-effect btn linux hide" onclick="update('linux')" style="margin-left: 15px;">@@linux@@</button>
|
||||||
<button class="waves-effect btn linux hide" onclick="update('linuxdeb')" style="margin-left: 15px;">@@linuxdeb@@</button>
|
<button class="waves-effect btn linux hide" onclick="update('linuxdeb')" style="margin-left: 15px;">@@linuxdeb@@</button>
|
||||||
<button class="waves-effect btn linux hide" onclick="update('linuxsnap')" style="margin-left: 15px;">@@linuxsnap@@</button>
|
<button class="waves-effect btn linux hide" onclick="update('linuxsnap')" style="margin-left: 15px;">@@linuxsnap@@</button>
|
||||||
<button class="waves-effect btn mac hide" onclick="update('mac')" style="margin-left: 15px;">@@download@@(Intel Mac)</button>
|
<button class="waves-effect btn mac hide" onclick="update('mac')" style="margin-left: 15px;">@@download@@</button>
|
||||||
<button class="waves-effect btn mac hide" onclick="update('macarm64')" style="margin-left: 15px;">@@download@@(M1 Mac)</button>
|
|
||||||
<br />
|
<br />
|
||||||
@@problem1@@<br />@@problem2@@
|
@@problem1@@<br />@@problem2@@
|
||||||
</div>
|
</div>
|
||||||
|
@ -221,10 +220,6 @@
|
||||||
var url = json['mac']
|
var url = json['mac']
|
||||||
var file = 'TheDesk-' + json.unique_mac + '.dmg'
|
var file = 'TheDesk-' + json.unique_mac + '.dmg'
|
||||||
var filesize = json.mac_size
|
var filesize = json.mac_size
|
||||||
} else if (sel == 'macarm64') {
|
|
||||||
var url = json['macarm64']
|
|
||||||
var file = 'TheDesk-' + json.unique_mac + '.dmg'
|
|
||||||
var filesize = json.macarm64_size
|
|
||||||
}
|
}
|
||||||
postMessage(['downloadButton', [url, file, filesize]], '*')
|
postMessage(['downloadButton', [url, file, filesize]], '*')
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue
Block a user