@@ -179,6 +179,7 @@ public async Task CheckAndDownloadAsync(MVersion version)
179179 }
180180 }
181181
182+ // not stable
182183 public Process CreateProcess ( string mcversion , string forgeversion , MLaunchOption option )
183184 {
184185 CheckAndDownload ( GetVersion ( mcversion ) ) ;
@@ -188,27 +189,35 @@ public Process CreateProcess(string mcversion, string forgeversion, MLaunchOptio
188189 return CreateProcess ( versionName , option ) ;
189190 }
190191
191- public Process CreateProcess ( string versionName , MLaunchOption option )
192- => CreateProcess ( GetVersion ( versionName ) , option ) ;
192+ public Process CreateProcess ( string versionName , MLaunchOption option , bool checkAndDownload = true )
193+ => CreateProcess ( GetVersion ( versionName ) , option , checkAndDownload ) ;
193194
194195 [ MethodTimer . Time ]
195- public Process CreateProcess ( MVersion version , MLaunchOption option )
196+ public Process CreateProcess ( MVersion version , MLaunchOption option , bool checkAndDownload = true )
196197 {
197198 option . StartVersion = version ;
198- CheckAndDownload ( option . StartVersion ) ;
199+
200+ if ( checkAndDownload )
201+ CheckAndDownload ( option . StartVersion ) ;
202+
199203 return CreateProcess ( option ) ;
200204 }
201205
202- public async Task < Process > CreateProcessAsync ( string versionName , MLaunchOption option )
206+ public async Task < Process > CreateProcessAsync ( string versionName , MLaunchOption option ,
207+ bool checkAndDownload = true )
203208 {
204209 var version = await GetVersionAsync ( versionName ) . ConfigureAwait ( false ) ;
205- return await CreateProcessAsync ( version , option ) . ConfigureAwait ( false ) ;
210+ return await CreateProcessAsync ( version , option , checkAndDownload ) . ConfigureAwait ( false ) ;
206211 }
207212
208- public async Task < Process > CreateProcessAsync ( MVersion version , MLaunchOption option )
213+ public async Task < Process > CreateProcessAsync ( MVersion version , MLaunchOption option ,
214+ bool checkAndDownload = true )
209215 {
210216 option . StartVersion = version ;
211- await CheckAndDownloadAsync ( option . StartVersion ) . ConfigureAwait ( false ) ;
217+
218+ if ( checkAndDownload )
219+ await CheckAndDownloadAsync ( option . StartVersion ) . ConfigureAwait ( false ) ;
220+
212221 return await CreateProcessAsync ( option ) . ConfigureAwait ( false ) ;
213222 }
214223
0 commit comments