💄 format
This commit is contained in:
4
bin/builders/BaseBuilder.ts
vendored
4
bin/builders/BaseBuilder.ts
vendored
@@ -171,7 +171,7 @@ export default abstract class BaseBuilder {
|
||||
|
||||
// Add features
|
||||
const features = ['cli-build'];
|
||||
|
||||
|
||||
// Add macos-proxy feature for modern macOS (Darwin 23+ = macOS 14+)
|
||||
if (IS_MAC) {
|
||||
const macOSVersion = this.getMacOSMajorVersion();
|
||||
@@ -179,7 +179,7 @@ export default abstract class BaseBuilder {
|
||||
features.push('macos-proxy');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (features.length > 0) {
|
||||
fullCommand += ` --features ${features.join(',')}`;
|
||||
}
|
||||
|
||||
12
bin/builders/MacBuilder.ts
vendored
12
bin/builders/MacBuilder.ts
vendored
@@ -38,24 +38,20 @@ export default class MacBuilder extends BaseBuilder {
|
||||
const baseCommand = this.options.debug
|
||||
? 'npm run tauri build -- --debug'
|
||||
: 'npm run tauri build --';
|
||||
|
||||
|
||||
// Use temporary config directory to avoid modifying source files
|
||||
const configPath = path.join(
|
||||
'src-tauri',
|
||||
'.pake',
|
||||
'tauri.conf.json',
|
||||
);
|
||||
const configPath = path.join('src-tauri', '.pake', 'tauri.conf.json');
|
||||
let fullCommand = `${baseCommand} --target universal-apple-darwin -c "${configPath}"`;
|
||||
|
||||
// Add features
|
||||
const features = ['cli-build'];
|
||||
|
||||
|
||||
// Add macos-proxy feature for modern macOS (Darwin 23+ = macOS 14+)
|
||||
const macOSVersion = this.getMacOSMajorVersion();
|
||||
if (macOSVersion >= 23) {
|
||||
features.push('macos-proxy');
|
||||
}
|
||||
|
||||
|
||||
if (features.length > 0) {
|
||||
fullCommand += ` --features ${features.join(',')}`;
|
||||
}
|
||||
|
||||
16
bin/helpers/tauriConfig.ts
vendored
16
bin/helpers/tauriConfig.ts
vendored
@@ -5,10 +5,18 @@ import { npmDirectory } from '@/utils/dir';
|
||||
// Load configs from npm package directory, not from project source
|
||||
const tauriSrcDir = path.join(npmDirectory, 'src-tauri');
|
||||
const pakeConf = fsExtra.readJSONSync(path.join(tauriSrcDir, 'pake.json'));
|
||||
const CommonConf = fsExtra.readJSONSync(path.join(tauriSrcDir, 'tauri.conf.json'));
|
||||
const WinConf = fsExtra.readJSONSync(path.join(tauriSrcDir, 'tauri.windows.conf.json'));
|
||||
const MacConf = fsExtra.readJSONSync(path.join(tauriSrcDir, 'tauri.macos.conf.json'));
|
||||
const LinuxConf = fsExtra.readJSONSync(path.join(tauriSrcDir, 'tauri.linux.conf.json'));
|
||||
const CommonConf = fsExtra.readJSONSync(
|
||||
path.join(tauriSrcDir, 'tauri.conf.json'),
|
||||
);
|
||||
const WinConf = fsExtra.readJSONSync(
|
||||
path.join(tauriSrcDir, 'tauri.windows.conf.json'),
|
||||
);
|
||||
const MacConf = fsExtra.readJSONSync(
|
||||
path.join(tauriSrcDir, 'tauri.macos.conf.json'),
|
||||
);
|
||||
const LinuxConf = fsExtra.readJSONSync(
|
||||
path.join(tauriSrcDir, 'tauri.linux.conf.json'),
|
||||
);
|
||||
|
||||
const platformConfigs = {
|
||||
win32: WinConf,
|
||||
|
||||
Reference in New Issue
Block a user