11import { reactive } from 'vue'
22import { VueExtend } from './core/VueExtend'
3- import { AppI18n } from '@lang/index'
3+ import { AppI18n , I18nT } from '@lang/index'
44import App from './App.vue'
55// import App from './APPTest.vue'
66import './index.scss'
@@ -15,16 +15,17 @@ import { AppToolStore } from '@/components/Tools/store'
1515import { SetupStore } from '@/components/Setup/store'
1616import { AppLogStore } from '@/components/AppLog/store'
1717import { AppCustomerModule } from '@/core/Module'
18- import { lang , nativeTheme } from '@/util/NodeFn'
18+ import { dialog , lang , nativeTheme , shell , app } from '@/util/NodeFn'
1919import { MessageError , MessageSuccess , MessageWarning } from '@/util/Element'
2020import { AsyncComponentShow } from '@/util/AsyncComponent'
2121import { FlyEnvHelperSetup } from '@/components/FlyEnvHelper/setup'
2222import { isEqual } from 'lodash-es'
2323import CapturerSetup from '@/components/Tools/Capturer/setup'
24+ import { join } from '@/util/path-browserify'
2425
2526window . Server = reactive ( { } ) as any
2627
27- const app = VueExtend ( App )
28+ const appRoot = VueExtend ( App )
2829lang . loadCustomerLang ( ) . then ( ) . catch ( )
2930
3031let inited = false
@@ -42,7 +43,7 @@ IPC.on('APP-Ready-To-Show').then((key: string, res: any) => {
4243 ThemeInit ( )
4344 const config = store . config . setup
4445 AppI18n ( config ?. lang )
45- app . mount ( '#app' )
46+ appRoot . mount ( '#app' )
4647 } )
4748 . catch ( )
4849 SiteSuckerStore ( ) . init ( )
@@ -92,9 +93,25 @@ IPC.on('APP-FlyEnv-Helper-Notice').then((key: string, res: any) => {
9293 } else if ( res . code === 1 ) {
9394 MessageError ( res ?. msg )
9495 if ( res ?. status === 'installFaild' && inited && ! FlyEnvHelperSetup . show ) {
95- import ( '@/components/FlyEnvHelper/index.vue' ) . then ( ( m ) => {
96- AsyncComponentShow ( m . default ) . then ( )
97- } )
96+ if ( window . Server . isWindows ) {
97+ dialog
98+ . showMessageBox ( {
99+ type : 'info' ,
100+ title : I18nT ( 'host.warning' ) ,
101+ message : I18nT ( 'setup.flyenvHelperInstallFailTips' ) ,
102+ buttons : [ I18nT ( 'base.confirm' ) ]
103+ } )
104+ . then ( ( ) => {
105+ app . getPath ( 'exe' ) . then ( ( path : string ) => {
106+ const item = join ( path , 'resources/helper/flyenv-helper.exe' )
107+ shell . showItemInFolder ( item ) . catch ( )
108+ } )
109+ } )
110+ } else {
111+ import ( '@/components/FlyEnvHelper/index.vue' ) . then ( ( m ) => {
112+ AsyncComponentShow ( m . default ) . then ( )
113+ } )
114+ }
98115 }
99116 } else if ( res . code === 2 ) {
100117 MessageWarning ( res ?. msg )
0 commit comments