CheckVersionState.ts 448 B

123456789101112
  1. import { LaunchContext, LaunchState, LaunchStateId } from './LaunchState';
  2. export class CheckVersionState implements LaunchState {
  3. readonly id = LaunchStateId.CheckVersion;
  4. async enter(context: LaunchContext): Promise<LaunchStateId> {
  5. context.progress({ state: this.id, title: '检查版本' });
  6. await context.kernel.version.check();
  7. context.progress({ state: this.id, progress: 0.25 });
  8. return LaunchStateId.HotUpdate;
  9. }
  10. }