File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -47,6 +47,36 @@ Right click me and use "Run as administrator"
4747else
4848{
4949 Log ( "Didn't find Overwolf/CurseForge.. anyhow.." , LogLevel . Warning ) ;
50+
51+ Log ( "Do you want to enter your own path? [Y/N]" ) ;
52+ var acceptedKeys = new [ ] { ConsoleKey . Y , ConsoleKey . N } ;
53+ ConsoleKey key ;
54+ do
55+ {
56+ key = Console . ReadKey ( true ) . Key ;
57+ if ( ! acceptedKeys . Contains ( key ) )
58+ {
59+ Log ( $ "That was { key } , not Y or N, try again..", LogLevel . Error ) ;
60+ }
61+ } while ( ! acceptedKeys . Contains ( key ) ) ;
62+
63+ if ( key == ConsoleKey . N )
64+ {
65+ Log ( "Oh.. Ok, exiting! Bye!" ) ;
66+ return 0 ;
67+ }
68+
69+ Log ( "Enter the path of your modding folder from CurseForge/Overwolf" ) ;
70+ var path = Console . ReadLine ( ) ;
71+ if ( string . IsNullOrWhiteSpace ( path ) )
72+ {
73+ Log ( "You didn't enter anything.. exiting.." , LogLevel . Error ) ;
74+ return - 1 ;
75+ }
76+
77+ var cfJavaExecutables = GetJavaExecutablesFromPath ( path , "javaw.exe" ) ;
78+ Log ( $ "Found { cfJavaExecutables . Count } executables, adding to list") ;
79+ javaExecutables . AddRange ( cfJavaExecutables . Select ( j => j . FullName ) ) ;
5080}
5181
5282if ( javaExecutables . Count == 0 )
You can’t perform that action at this time.
0 commit comments