diff --git a/app/build.d.ts b/app/build.d.ts
index 8debca9b..f555b71c 100644
--- a/app/build.d.ts
+++ b/app/build.d.ts
@@ -10,5 +10,6 @@ declare function _exports(options?: {
skipLinux?: boolean;
skipMacOS?: boolean;
unnotarize?: boolean;
+ skipUniversal?: boolean;
}): void;
export = _exports;
diff --git a/app/build.js b/app/build.js
index 851e1aa6..9e428475 100644
--- a/app/build.js
+++ b/app/build.js
@@ -177,36 +177,22 @@ async function cmd(options) {
if (isTrue(options, 'unnotarize')) delete config.mac.entitlements
if (isTrue(options, 'unnotarize')) delete config.mac.entitlementsInherit
if (isTrue(options, 'unnotarize')) process.env.CSC_IDENTITY_AUTO_DISCOVERY = false
- if (arch === 'x64') {
- if (!isTrue(options, 'skipX64')) {
- await build(Platform.MAC, Arch.x64, config)
- fs.renameSync(
- `../build/TheDesk-${version}.dmg`,
- `../build/TheDesk-${version}-x64.dmg`
- )
- }
- if (isTrue(options, 'withArm64')) {
- await build(Platform.MAC, Arch.arm64, config)
- fs.renameSync(
- `../build/TheDesk-${version}.dmg`,
- `../build/TheDesk-${version}-arm64.dmg`
- )
- }
- fs.renameSync(
- `../build/TheDesk-${version}-x64.dmg`,
- `../build/TheDesk-${version}.dmg`
- )
- }
- if (arch === 'arm64') {
- if (isTrue(options, 'unnotarize')) delete config.afterSign
+ if (isTrue(options, 'unnotarize')) delete config.afterSign
+ if (!isTrue(options, 'skipUniversal')) await build(Platform.MAC, Arch.universal, config)
+ if (isTrue(options, 'withArm64')) {
await build(Platform.MAC, Arch.arm64, config)
fs.renameSync(
`../build/TheDesk-${version}.dmg`,
`../build/TheDesk-${version}-arm64.dmg`
)
- if (!isTrue(options, 'skipX64')) await build(Platform.MAC, Arch.x64, config)
}
-
+ if (isTrue(options, 'withX64')) {
+ await build(Platform.MAC, Arch.x64, config)
+ fs.renameSync(
+ `../build/TheDesk-${version}.dmg`,
+ `../build/TheDesk-${version}-x64.dmg`
+ )
+ }
}
}
}
@@ -246,6 +232,10 @@ TheDesk Builder command tool
[only macOS]
--unnotarize: Without notarize
+ Build as a "universal" package.
+ --skipUniversal: skip build for universal enviroment
+ --withX64: build x64-only build
+ --withArm64: build arm64-only build
`
}
diff --git a/app/package.json b/app/package.json
index a895bb2b..af05a50b 100644
--- a/app/package.json
+++ b/app/package.json
@@ -18,7 +18,7 @@
"build": "node buildCli.js",
"build:pwa": "node view/make/makeCli.js --pwa",
"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": "eslint js"
},
diff --git a/app/view/make/update.sample.html b/app/view/make/update.sample.html
index c06093c6..07880605 100644
--- a/app/view/make/update.sample.html
+++ b/app/view/make/update.sample.html
@@ -97,8 +97,7 @@
-
-
+
@@problem1@@
@@problem2@@
@@ -221,10 +220,6 @@
var url = json['mac']
var file = 'TheDesk-' + json.unique_mac + '.dmg'
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]], '*')
})