3D引擎,图形开发,C++

  博客园 :: 首页 :: 新随笔 :: 联系 :: 订阅 :: 管理 ::

INNO 常见代码

[Files]
Source: "F:\软件发布\dzj\nocompress\*"; DestDir: "{app}\data"; Flags: ignoreversion nocompression
Source: "F:\软件发布\dzj\13-1-31\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs nocompression
Source: "F:\软件发布\dzj\other\dotnetfx20.exe"; DestDir: "{tmp}"; Flags: ignoreversion dontcopy

[code]
function CheckDotNet2_0():boolean;
begin
  Result:= RegKeyExists(HKLM, 'SOFTWARE\Microsoft\.NETFramework\policy\v2.0');
end;

function CopyFile(): Boolean;
var ResultCode: Integer;
Psrc :string;

begin
  Psrc:= '/c xcopy '+ExpandConstant('{src}')+'\nocompress\*.* ' +ExpandConstant('{app}')+'\data\';
  Exec(ExpandConstant('{cmd}'), Psrc,'', SW_SHOWNORMAL, ewWaitUntilTerminated, ResultCode);
  Result:=true;
end;

function InitializeSetup(): Boolean;
var Path:string;
ResultCode: Integer;
begin
   if (CheckDotNet2_0() = false) then
     begin
    ExtractTemporaryFile('F:\软件发布\dzj\other\dotnetfx20.exe');
    Exec(ExpandConstant('{tmp}/dotnetfx20.exe'), '', '', SW_SHOWNORMAL, ewWaitUntilTerminated, ResultCode);
  end;
Result:=true;
end;

procedure CurStepChanged(CurStep: TSetupStep);
begin
if CurStep=ssinstall then
  begin
    CopyFile();
  end;
end;

 

[Run]
;Filename: "{cmd}"; Parameters: "/c xcopy {src}\nocompress\*.* {app}\data"; Flags: hidewizard


[Registry]
Root: HKLM; Subkey: "Software\ShanLian"; Flags: uninsdeletekeyifempty
Root: HKLM; Subkey: "Software\ShanLian\sutraSoft"; Flags: uninsdeletekey
Root: HKLM; Subkey: "Software\ShanLian\sutraSoft"; ValueType: string; ValueName: "PATH"; ValueData: "{app}"
Root: HKLM; Subkey: "Software\ShanLian\sutraSoft"; ValueType: string; ValueName: "Version"; ValueData: #MyAppVersion

posted on 2013-02-02 07:34  灵隐西湖  阅读(538)  评论(0)    收藏  举报