@@ -11,18 +11,29 @@ import { createApp } from "vue";
1111
1212import App from "@/App.vue" ;
1313import { ApplicationRootID } from "@/constants/application" ;
14+ import { getASCIIArt } from "@/constants/ascii-art.ts" ;
1415import Errors from "@/lib/errors" ;
1516import General from "@/lib/general" ;
1617import Globals from "@/lib/globals" ;
1718import Logging from "@/lib/logging" ;
1819import { log } from "@/lib/logging/scopes/log.ts" ;
1920
21+ // Share the 'portable' status between other functions
22+ let portable : boolean = false ;
23+
2024// No need to log yet, all logs will go into the previous launch log file
21- await Logging . prepareLogFile ( ) . catch ( ( error : unknown ) => {
25+ try {
26+ const result = await Logging . prepareLogFile ( ) ;
27+
28+ // Now the log file preparation is done (unless something threw an error)
29+ portable = result . portable ;
30+ } catch ( error : unknown ) {
2231 log . error ( "Failed to prepare a log file:" , Errors . prettify ( error ) ) ;
23- } ) ;
32+ }
33+
34+ // Show a pretty ASCII art with the launcher name :3
35+ log . info ( getASCIIArt ( portable ) ) ;
2436
25- // Now the log file preparation is done (unless something threw an error)
2637log . debug ( "Extending global window object in the app namespace" ) ;
2738Globals . declareWindow ( ) ;
2839
@@ -34,6 +45,6 @@ log.debug(`Mounting app instance to the DOM element (${ApplicationRootID})`);
3445AppInstance . mount ( ApplicationRootID ) ;
3546
3647log . debug ( "Initializing launcher" ) ;
37- await General . initializeLauncher ( ) . catch ( ( error : unknown ) => {
48+ await General . initializeLauncher ( portable ) . catch ( ( error : unknown ) => {
3849 log . error ( "Failed to initialize launcher:" , Errors . prettify ( error ) ) ;
3950} ) ;
0 commit comments