The first glance at Inno

Inno Setup,做安装包的好玩意

 

正如某位以C语言代码行命名的同事所说的那样,永远不要以为自己不会做B&I,明天就是你。 Piaoger终于也要B and I了。

做安装包,无非WIX、NSIS和Inno,Piaoger觉得WIX太专业,NSIS找不到人问,Inno则既简单还能找到人帮忙。

 

# Inno

[Home page] (http://www.jrsoftware.org/isinfo.php)

 

# Setup

如果要在Inno Script中使用#define 或者Code, 需要安装ISPP。切记!!

 

 

# 我的处女 *.iss

 

[Setup] 
AppName=SolidMCP Client
AppVerName=SolidMCP Client
AppPublisher=SolidMCP, Inc
OutputBaseFilename=SolidMCP-Setup
DefaultDirName={pf}\SolidMCP
DefaultGroupName=SolidMCP\ClientApplication
Compression=lzma/max
SolidCompression=yes 
 
[Icons]
; Desktop Shortcut
Name: "{commondesktop}\SolidMCP"; Filename: "{app}\Bin\boot.exe";IconFilename:"{app}\Data\app.ico"
 
; Command Group in Start Menu
Name: "{group}\boot"; Filename: "{app}\Bin\boot.exe";
Name: "{group}\Uninstall"; Filename: "{uninstallexe}"
 
[Files] 
; Readme
Source: "..\..\..\Readme.txt";                        DestDir: {app};       Flags: ignoreversion replacesameversion isreadme; 
; VC Redist
Source: "..\..\..\Build\Win\Tools\VCRedist\*.dll";    DestDir: {app}\Bin;   Flags: ignoreversion replacesameversion; 
; Dlls
Source: "..\..\..\Release\*.dll";                     DestDir: {app}\bin;   Flags: ignoreversion replacesameversion;
; EXE
Source: "..\..\..\release\*.exe";                     DestDir: {app}\bin;   Flags: ignoreversion replacesameversion; 
; Data
Source: "..\..\..\Data\*";                            DestDir: {app}\Data;  Flags: ignoreversion replacesameversion Recursesubdirs;
 
[Code]
function InitializeUninstall(): Boolean;
begin
  Result := True
end;
 
procedure DeinitializeUninstall();
begin
  //MsgBox('DeinitializeUninstall:' #13#13 'Bye bye!', mbInformation, MB_OK);
end;
 
procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep);
begin
  case CurUninstallStep of
    usUninstall:
      begin
        //MsgBox('usUninstall:' #13#13 'Ok, bye bye.', mbInformation, MB_OK);
      end;
    usPostUninstall:
      begin
        //MsgBox('usPostUninstall:' #13#13 'Ok, bye bye.', mbInformation, MB_OK);
      end;
  end;
end;

 

# References

[ Inno Setup入门] (http://blog.csdn.net/wangyong0921/article/details/6873473)

 

 

posted on 2013-01-06 11:00  飘行天下  阅读(338)  评论(0编辑  收藏  举报

导航