@@ -82,29 +82,17 @@ ipcMain.on('wp-start', async (event, arg) => {
82
82
console . log ( 8 , app . getAppPath ( ) . replace ( '/app.asar' , '' ) ) ;
83
83
console . log (
84
84
9 ,
85
- String (
86
- path . join ( app . getAppPath ( ) , 'assets' , 'bin' , 'warp-plus' )
87
- ) . replace ( '/app.asar' , '' )
85
+ String ( path . join ( app . getAppPath ( ) . replace ( '/app.asar' , '' ) , 'assets' , 'bin' , 'warp-plus' ) )
86
+ ) ;
87
+ console . log ( 10 , path . join ( app . getAppPath ( ) . replace ( '/app.asar' , '' ) , 'assets' , 'bin' ) ) ;
88
+
89
+ const wpFileName = `warp-plus${ platform === 'win32' ? '.exe' : '' } ` ;
90
+ const command = path . join (
91
+ app . getAppPath ( ) . replace ( '/app.asar' , '' ) ,
92
+ 'assets' ,
93
+ 'bin' ,
94
+ wpFileName
88
95
) ;
89
-
90
- let command = '' ;
91
- if ( platform === 'win32' ) {
92
- if ( isDev ( ) ) {
93
- command = path . join ( 'assets' , 'bin' , 'warp-plus.exe' ) ;
94
- } else {
95
- command = String (
96
- path . join ( app . getAppPath ( ) , 'resources' , 'assets' , 'bin' , 'warp-plus.exe' )
97
- ) . replace ( '/app.asar' , '' ) ;
98
- }
99
- } else {
100
- if ( isDev ( ) ) {
101
- command = path . join ( 'assets' , 'bin' , 'warp-plus' ) ;
102
- } else {
103
- command = String (
104
- path . join ( app . getAppPath ( ) , 'resources' , 'assets' , 'bin' , 'warp-plus' )
105
- ) . replace ( '/app.asar' , '' ) ;
106
- }
107
- }
108
96
console . log ( 'command' , command ) ;
109
97
110
98
child = spawn ( command , args ) ;
0 commit comments