LiveUpdate.dpr
上传用户:youjie821
上传日期:2013-01-27
资源大小:459k
文件大小:1k
- program LiveUpdate;
- uses
- Forms,
- Classes,
- SysUtils,
- Windows,
- frmMain in 'frmMain.pas' {MainForm},
- hxVersion in '..Common FileshxVersion.pas',
- hxFileRes in '..Common FileshxFileRes.pas',
- hxSysUtils in '..Common FileshxSysUtils.pas',
- hxUpdate in '..Common FileshxUpdate.pas',
- frmConfig in 'frmConfig.pas' {ConfigForm},
- hxClientApp in 'hxClientApp.pas',
- hxClasses in '..Common FileshxClasses.pas',
- frmMiniUpdate in 'frmMiniUpdate.pas' {MiniUpdateForm};
- {$R *.res}
- procedure RaiseLaunchError;
- begin
- raise Exception.Create('程序启动失败!');
- end;
- begin
- Application.Initialize;
- try
- case ParamCount of
- 1: Application.CreateForm(TMainForm, MainForm);
- 3:
- if UpperCase(ParamStr(2)) = '-A' then
- Application.CreateForm(TMiniUpdateForm, MiniUpdateForm)
- else
- RaiseLaunchError;
- else
- RaiseLaunchError;
- end;
- except
- MessageBox(Application.Handle, '程序启动失败,正确格式如下:' + #13#10 +
- 'LiveUpdate <ProjectName> [-a <AutoRunExeName>]' + #13#10#13#10 +
- '参数说明:' + #13#10 +
- 'ProjectName - 工程名称' + #13#10 +
- '-a - 自动更新' + #13#10 +
- 'AutoRunExeName - 更新完毕后自动运行的程序',
- '提示', MB_OK + MB_ICONERROR);
- Exit;
- end;
- Application.Run;
- end.