File tree Expand file tree Collapse file tree 4 files changed +19
-2
lines changed Expand file tree Collapse file tree 4 files changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ import { PakeAppOptions } from '@/types';
77import { checkRustInstalled , installRust } from '@/helpers/rust' ;
88import { mergeConfig } from '@/helpers/merge' ;
99import tauriConfig from '@/helpers/tauriConfig' ;
10+ import { generateIdentifierSafeName } from '@/utils/name' ;
1011import { npmDirectory } from '@/utils/dir' ;
1112import { getSpinner } from '@/utils/info' ;
1213import { shellExec } from '@/utils/shell' ;
@@ -409,7 +410,7 @@ export default abstract class BaseBuilder {
409410
410411 // Linux uses the unique binary name we set in merge.ts
411412 if ( process . platform === 'linux' ) {
412- return `pake-${ appName . toLowerCase ( ) } ${ extension } ` ;
413+ return `pake-${ generateIdentifierSafeName ( appName ) } ${ extension } ` ;
413414 }
414415
415416 // Windows and macOS use 'pake' as binary name
Original file line number Diff line number Diff line change @@ -127,10 +127,16 @@ program
127127 )
128128 . addOption (
129129 new Option (
130- '--hide-on-close' ,
130+ '--hide-on-close [boolean] ' ,
131131 'Hide window on close instead of exiting (default: true for macOS, false for others)' ,
132132 )
133133 . default ( DEFAULT . hideOnClose )
134+ . argParser ( ( value ) => {
135+ if ( value === undefined ) return true ; // --hide-on-close without value
136+ if ( value === 'true' ) return true ;
137+ if ( value === 'false' ) return false ;
138+ throw new Error ( '--hide-on-close must be true or false' ) ;
139+ } )
134140 . hideHelp ( ) ,
135141 )
136142 . addOption ( new Option ( '--title <string>' , 'Window title' ) . hideHelp ( ) )
Original file line number Diff line number Diff line change @@ -285,7 +285,12 @@ Specify the system tray icon. This is only effective when the system tray is ena
285285Hide window instead of closing the application when clicking close button. Platform-specific default: ` true ` for macOS, ` false ` for Windows/Linux.
286286
287287``` shell
288+ # Hide on close (default behavior on macOS)
288289--hide-on-close
290+ --hide-on-close true
291+
292+ # Close application immediately (default behavior on Windows/Linux)
293+ --hide-on-close false
289294```
290295
291296#### [ title]
Original file line number Diff line number Diff line change @@ -284,7 +284,12 @@ pake https://github.com --name GitHub
284284点击关闭按钮时隐藏窗口而不是退出应用程序。平台特定默认值:macOS 为 ` true ` ,Windows/Linux 为 ` false ` 。
285285
286286``` shell
287+ # 关闭时隐藏(macOS 默认行为)
287288--hide-on-close
289+ --hide-on-close true
290+
291+ # 立即关闭应用程序(Windows/Linux 默认行为)
292+ --hide-on-close false
288293```
289294
290295#### [ title]
You can’t perform that action at this time.
0 commit comments