🐛 fix: temporary test build fixes
Signed-off-by: Pauline <git@ethanlibs.co>
This commit is contained in:
parent
d350d11cb3
commit
79d0cab1f4
7 changed files with 252 additions and 466 deletions
|
|
@ -60,7 +60,7 @@
|
|||
"license": "GPL-3.0-only",
|
||||
"homepage": "https://polyfrost.org/",
|
||||
"longDescription": "Next-generation open source Minecraft launcher",
|
||||
"createUpdaterArtifacts": "v1Compatible",
|
||||
"createUpdaterArtifacts": false,
|
||||
"resources": [],
|
||||
"externalBin": [],
|
||||
"linux": {
|
||||
|
|
@ -75,7 +75,6 @@
|
|||
"exceptionDomain": null,
|
||||
"frameworks": [],
|
||||
"dmg": {
|
||||
"background": "../../packages/distribution/macos/dmg-background.png",
|
||||
"appPosition": {
|
||||
"x": 190,
|
||||
"y": 190
|
||||
|
|
|
|||
|
|
@ -28,10 +28,10 @@
|
|||
"@t3-oss/env-core": "^0.11.0",
|
||||
"@tanstack/solid-query": "^5.56.2",
|
||||
"@tauri-apps/api": "=2.0.0-rc.4",
|
||||
"@tauri-apps/plugin-clipboard-manager": "=2.0.0-rc.1",
|
||||
"@tauri-apps/plugin-clipboard-manager": "2.0.0-rc.2",
|
||||
"@tauri-apps/plugin-dialog": "=2.0.0-rc.1",
|
||||
"@tauri-apps/plugin-shell": "=2.0.0-rc.1",
|
||||
"@unocss/reset": "^0.62.3",
|
||||
"@unocss/reset": "^0.62.4",
|
||||
"@untitled-theme/icons-solid": "^0.10.5",
|
||||
"overlayscrollbars": "^2.10.0",
|
||||
"overlayscrollbars-solid": "^0.5.5",
|
||||
|
|
@ -48,7 +48,7 @@
|
|||
"jsdom": "^25.0.0",
|
||||
"rollup-plugin-visualizer": "^5.12.0",
|
||||
"sass": "^1.78.0",
|
||||
"unocss": "^0.62.3",
|
||||
"unocss": "^0.62.4",
|
||||
"vite": "^5.4.5",
|
||||
"vite-plugin-solid": "^2.10.2",
|
||||
"vite-plugin-solid-svg": "^0.8.1",
|
||||
|
|
|
|||
|
|
@ -57,9 +57,9 @@
|
|||
]
|
||||
},
|
||||
"devDependencies": {
|
||||
"@flowr/eslint-config": "^4.3.1",
|
||||
"@flowr/eslint-config": "^4.3.3",
|
||||
"@types/node": "^22.5.5",
|
||||
"@unocss/eslint-plugin": "^0.62.3",
|
||||
"@unocss/eslint-plugin": "^0.62.4",
|
||||
"@vitest/ui": "^2.1.1",
|
||||
"bumpp": "^9.5.2",
|
||||
"eslint": "^9.10.0",
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ function targetFilter(filter: 'b' | 't') {
|
|||
|
||||
const targets = args.filter(targetFilter('t')).flatMap(t => t.split(','));
|
||||
const bundles = args.filter(targetFilter('b')).flatMap(b => b.split(','));
|
||||
consola.info('tauri constants prepared, determining arguments');
|
||||
|
||||
try {
|
||||
switch (args[0]) {
|
||||
|
|
@ -53,8 +54,10 @@ try {
|
|||
}
|
||||
}
|
||||
|
||||
consola.info('starting tauri...');
|
||||
await execa('pnpm', ['exec', 'tauri', ...args], { cwd: __desktop });
|
||||
|
||||
consola.info('build completed, fixing linux build');
|
||||
if (args[0] === 'build' && bundles.some(b => b === 'deb' || b === 'all')) {
|
||||
const linuxTargets = targets.filter(t => t.includes('-linux-'));
|
||||
if (linuxTargets.length > 0)
|
||||
|
|
@ -80,6 +83,7 @@ catch (error) {
|
|||
}
|
||||
}
|
||||
finally {
|
||||
consola.info('cleaning up');
|
||||
cleanup();
|
||||
env.__exit(store.code);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,10 +22,9 @@ export function checkEnvironment(meta: ImportMeta) {
|
|||
const __dirname = dirname(__filename);
|
||||
const __debug = process.env.NODE_ENV === 'debug';
|
||||
const __root = resolve(join(__dirname, '..', '..'));
|
||||
const __deps = resolve(join(__root, '.deps'));
|
||||
const __exit = process.exit;
|
||||
|
||||
return { __filename, __dirname, __debug, __root, __deps, __exit };
|
||||
return { __filename, __dirname, __debug, __root, __exit };
|
||||
}
|
||||
|
||||
async function where(cmd: string): Promise<boolean> {
|
||||
|
|
|
|||
|
|
@ -11,8 +11,8 @@ export async function tauriUpdateKey(env: CheckedEnvironment): Promise<string |
|
|||
if (process.env.TAURI_SIGNING_PRIVATE_KEY)
|
||||
return;
|
||||
|
||||
const privateKeyPath = resolve(join(env.__deps, 'tauri.key'));
|
||||
const publicKeyPath = resolve(join(env.__deps, 'tauri.key.pub'));
|
||||
const privateKeyPath = resolve(join(env.__root, 'tauri.key'));
|
||||
const publicKeyPath = resolve(join(env.__root, 'tauri.key.pub'));
|
||||
|
||||
const readKeys = () => Promise.all([
|
||||
fs.readFile(publicKeyPath, 'utf-8'),
|
||||
|
|
@ -31,7 +31,8 @@ export async function tauriUpdateKey(env: CheckedEnvironment): Promise<string |
|
|||
consola.error(error);
|
||||
}
|
||||
|
||||
const quote = type() === 'Windows_NT' ? '"' : '\'';
|
||||
// eslint-disable-next-line style/quotes -- h
|
||||
const quote = type() === 'Windows_NT' ? '"' : "'";
|
||||
await execa`pnpm exec tauri signer generate --ci -w ${quote}${privateKeyPath}${quote}`;
|
||||
[keys.publicKey, keys.privateKey] = await readKeys();
|
||||
if (keys.privateKey === '' || keys.publicKey === '')
|
||||
|
|
@ -78,10 +79,15 @@ export async function patchTauri(env: CheckedEnvironment, targets: string[], arg
|
|||
tauriPatch.build.features.push('devtools');
|
||||
break;
|
||||
case 'build':
|
||||
if (tauriConfig.bundle?.createUpdaterArtifacts !== false) {
|
||||
const pubKey = await tauriUpdateKey(env);
|
||||
if (pubKey != null)
|
||||
tauriPatch.plugins.updater.pubkey = pubKey;
|
||||
try {
|
||||
if (tauriConfig.bundle?.createUpdaterArtifacts !== false) {
|
||||
const pubKey = await tauriUpdateKey(env);
|
||||
if (pubKey != null)
|
||||
tauriPatch.plugins.updater.pubkey = pubKey;
|
||||
}
|
||||
}
|
||||
catch (err) {
|
||||
consola.error('failed to generate tauri updater keys', err);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
678
pnpm-lock.yaml
generated
678
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load diff
Loading…
Add table
Reference in a new issue