大家都用什么工具打包工程呢? installshield,INNO ,,VS自带的

时间:2022-06-01 20:16:49
由于工作需要,现在要用经常打包软件给多个客户,
我选择了INNO setup .觉得里面功能相当不错.
而且还是免费的.不过现在更新比较慢了.
里面要写的脚本是用pascal 谎言,蛮好的.
由于pascal语法严谨,编译速度飞快.
我惯用C/c++的,借这个打包工具又多学了一门语言.

还请大家说说打包的技巧.

21 个解决方案

#1


我也用这东西啊,关键是免费,基本功能也足够了

而且网上还有那个仿InstallSheild界面的例子

#2


我都不打包,生成个静态库支持的可执行文件,拷贝给他们就好了。
而且他们都要源码,我也就不费那劲儿了。

#3


InnoSetup,呵呵,关键是免费

#4


InstallSheild不是有破解的吗?

#5


我也是用INNO setup的。功能强大又免费。

#6


n

#7



我用 NSIS ,制作 WinAMP 的公司做的,也是免费的。


http://nsis.sourceforge.net/

#8


偶用的也是NSIS。

#9


InstallSheild

#10


INNO setup 不错

#11


如何使打包程序在安装时检测老版本程序.
提示用户覆盖原有程序,或是重新安装另一版本.

CODE不太会写.还请高人指点.

#12


你如果用的INNO的话,帮助中有例子可以参考看看。有你所需要的资料。

#13


up楼上。补下下载地址
http://dl.pconline.com.cn/html_2/1/61/id=1149&pn=0.html

#14


就这个INNO

#15


学习了

#16


你可以试试setup factory,也不错的。

#17


学习了

#18


.

#19


给你个我用的例子:

; 脚本用 Inno Setup 脚本向导生成。
; 查阅文档获取创建 INNO SETUP 脚本文件详细资料!

[Setup]
AppName=Common downloader
AppVerName=Common downloader
DefaultDirName={pf}\XXX\Common downloader
DefaultGroupName=XXX\Common downloader
DisableProgramGroupPage=yes
OutputDir= .\Setup
OutputBaseFilename=Common downloader setup V1.0.0
Compression=lzma
SolidCompression=yes
VersionInfoCompany=XXX
VersionInfoVersion=1.0.0

[Languages]
Name: "Chinese"; MessagesFile: "compiler:Languages\Chinese.isl"
Name: "English"; MessagesFile: "compiler:Languages\English.isl"

[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: dontinheritcheck

[Files]
Source: "CMDL.exe"; DestName: "Common downloader.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "DL.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "DM.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "config.ini"; DestDir: "{app}"; Flags: ignoreversion
Source: "App\*"; DestDir: "{app}\\App"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "Boot\*"; DestDir: "{app}\\Boot"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "Resource_cn\*"; DestDir: "{app}\Resource"; Languages: Chinese; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "Resource_en\*"; DestDir: "{app}\Resource"; Languages: English; Flags: ignoreversion recursesubdirs createallsubdirs
; 注意: 不要在任何共享系统文件中使用“Flags: ignoreversion”

[Icons]
Name: "{group}\Common downloader"; Filename: "{app}\Common downloader.exe"
Name: "{group}\{cm:UninstallProgram,Common downloader}"; Filename: "{uninstallexe}"
Name: "{userdesktop}\Common downloader"; Filename: "{app}\Common downloader.exe"; Tasks: desktopicon

[Run]
Filename: "{app}\Common downloader.exe"; Description: "{cm:LaunchProgram,Common downloader}"; Flags: nowait postinstall skipifsilent

[Registry]
Root: HKLM; Subkey: "Software\XXX"; Flags: createvalueifdoesntexist
Root: HKLM; Subkey: "Software\XXX\Common downloader"; Flags: uninsdeletekeyifempty
Root: HKLM; Subkey: "Software\XXX\Common downloader"; ValueType: string; ValueName: "Path"; ValueData: "{app}"
Root: HKLM; Subkey: "Software\XXX\Common downloader"; ValueType: string; ValueName: "Version"; ValueData: "V1.0.0"
Root: HKLM; Subkey: "Software\XXX\Common downloader"; ValueType: dword; ValueName: "VersionNum"; ValueData: "100"
Root: HKLM; Subkey: "Software\XXX\Common downloader"; ValueType: string; ValueName: "Release Date"; ValueData: "2008/09/29"

[Code]
function InitializeSetup(): Boolean;
var
   Version: string;
   strPath: string;
   ResultCode: Integer;
begin
   Result:= TRUE;
  //read the version
  if RegQueryStringValue(HKEY_LOCAL_MACHINE, 'Software\XXX\Common downloader',
     'Version', Version) then
  begin
    // Successfully read the value
    Version := Format('Exist the version %s,whether uninstall it?',[Version]);
    if MsgBox(Version,mbConfirmation,MB_YESNO) = IDYES then
    begin
     //read the path
     if RegQueryStringValue(HKEY_LOCAL_MACHINE, 'Software\XXX\Common downloader',
     'Path', strPath) then
        begin
         // Successfully read the value
         strPath:= strPath + '\unins000.exe';
         Exec(ExpandConstant(strPath), '', '', SW_SHOW,
              ewWaitUntilTerminated, ResultCode);
        end;
    end else
    Result:= FALSE;
  end;
end;

这个例子可以在安装之前卸载以前的版本,并提示你卸载之前的版本信息。

#20


Inno

#21


NSIS是最好的免费打包工具,功能强大。暴风影音,ppstream,QQ,搜狗拼音,flashget等知名软件都是用它打包的,而且学习简单,下几个例子就会了,缺点和INNO一样,都是脚本的,没有方便的GUI向导,(其实第三方工具是有GUI代码生成器的)这个论坛有比较丰富的案例http://www.dreams8.com/forum-66-1.html

INNO和installshield现在都有解包器了,我指的不是资源解包,而是源码解包,不安全。

Setupfactory是傻瓜式部署工具,GUI向导很人性化极易上手,几乎不要代码。但扩充功能少了些,多国语言支持一般。6.0是经典,7.0发现反而难用很多。

Dot net自带的在部署.net程序上有优势,但扩充功能较少。

还有Wise,不过感觉类似Install shield,而且界面不是很好看。


另:NSIS只有几十Kb到100多KB的开销,所以他的出的包最小了。



上述常用部署工具,只有INNO和NSIS是免费的,其他都是收费的,滥用盗版可能会被起诉。

#1


我也用这东西啊,关键是免费,基本功能也足够了

而且网上还有那个仿InstallSheild界面的例子

#2


我都不打包,生成个静态库支持的可执行文件,拷贝给他们就好了。
而且他们都要源码,我也就不费那劲儿了。

#3


InnoSetup,呵呵,关键是免费

#4


InstallSheild不是有破解的吗?

#5


我也是用INNO setup的。功能强大又免费。

#6


n

#7



我用 NSIS ,制作 WinAMP 的公司做的,也是免费的。


http://nsis.sourceforge.net/

#8


偶用的也是NSIS。

#9


InstallSheild

#10


INNO setup 不错

#11


如何使打包程序在安装时检测老版本程序.
提示用户覆盖原有程序,或是重新安装另一版本.

CODE不太会写.还请高人指点.

#12


你如果用的INNO的话,帮助中有例子可以参考看看。有你所需要的资料。

#13


up楼上。补下下载地址
http://dl.pconline.com.cn/html_2/1/61/id=1149&pn=0.html

#14


就这个INNO

#15


学习了

#16


你可以试试setup factory,也不错的。

#17


学习了

#18


.

#19


给你个我用的例子:

; 脚本用 Inno Setup 脚本向导生成。
; 查阅文档获取创建 INNO SETUP 脚本文件详细资料!

[Setup]
AppName=Common downloader
AppVerName=Common downloader
DefaultDirName={pf}\XXX\Common downloader
DefaultGroupName=XXX\Common downloader
DisableProgramGroupPage=yes
OutputDir= .\Setup
OutputBaseFilename=Common downloader setup V1.0.0
Compression=lzma
SolidCompression=yes
VersionInfoCompany=XXX
VersionInfoVersion=1.0.0

[Languages]
Name: "Chinese"; MessagesFile: "compiler:Languages\Chinese.isl"
Name: "English"; MessagesFile: "compiler:Languages\English.isl"

[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: dontinheritcheck

[Files]
Source: "CMDL.exe"; DestName: "Common downloader.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "DL.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "DM.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "config.ini"; DestDir: "{app}"; Flags: ignoreversion
Source: "App\*"; DestDir: "{app}\\App"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "Boot\*"; DestDir: "{app}\\Boot"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "Resource_cn\*"; DestDir: "{app}\Resource"; Languages: Chinese; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "Resource_en\*"; DestDir: "{app}\Resource"; Languages: English; Flags: ignoreversion recursesubdirs createallsubdirs
; 注意: 不要在任何共享系统文件中使用“Flags: ignoreversion”

[Icons]
Name: "{group}\Common downloader"; Filename: "{app}\Common downloader.exe"
Name: "{group}\{cm:UninstallProgram,Common downloader}"; Filename: "{uninstallexe}"
Name: "{userdesktop}\Common downloader"; Filename: "{app}\Common downloader.exe"; Tasks: desktopicon

[Run]
Filename: "{app}\Common downloader.exe"; Description: "{cm:LaunchProgram,Common downloader}"; Flags: nowait postinstall skipifsilent

[Registry]
Root: HKLM; Subkey: "Software\XXX"; Flags: createvalueifdoesntexist
Root: HKLM; Subkey: "Software\XXX\Common downloader"; Flags: uninsdeletekeyifempty
Root: HKLM; Subkey: "Software\XXX\Common downloader"; ValueType: string; ValueName: "Path"; ValueData: "{app}"
Root: HKLM; Subkey: "Software\XXX\Common downloader"; ValueType: string; ValueName: "Version"; ValueData: "V1.0.0"
Root: HKLM; Subkey: "Software\XXX\Common downloader"; ValueType: dword; ValueName: "VersionNum"; ValueData: "100"
Root: HKLM; Subkey: "Software\XXX\Common downloader"; ValueType: string; ValueName: "Release Date"; ValueData: "2008/09/29"

[Code]
function InitializeSetup(): Boolean;
var
   Version: string;
   strPath: string;
   ResultCode: Integer;
begin
   Result:= TRUE;
  //read the version
  if RegQueryStringValue(HKEY_LOCAL_MACHINE, 'Software\XXX\Common downloader',
     'Version', Version) then
  begin
    // Successfully read the value
    Version := Format('Exist the version %s,whether uninstall it?',[Version]);
    if MsgBox(Version,mbConfirmation,MB_YESNO) = IDYES then
    begin
     //read the path
     if RegQueryStringValue(HKEY_LOCAL_MACHINE, 'Software\XXX\Common downloader',
     'Path', strPath) then
        begin
         // Successfully read the value
         strPath:= strPath + '\unins000.exe';
         Exec(ExpandConstant(strPath), '', '', SW_SHOW,
              ewWaitUntilTerminated, ResultCode);
        end;
    end else
    Result:= FALSE;
  end;
end;

这个例子可以在安装之前卸载以前的版本,并提示你卸载之前的版本信息。

#20


Inno

#21


NSIS是最好的免费打包工具,功能强大。暴风影音,ppstream,QQ,搜狗拼音,flashget等知名软件都是用它打包的,而且学习简单,下几个例子就会了,缺点和INNO一样,都是脚本的,没有方便的GUI向导,(其实第三方工具是有GUI代码生成器的)这个论坛有比较丰富的案例http://www.dreams8.com/forum-66-1.html

INNO和installshield现在都有解包器了,我指的不是资源解包,而是源码解包,不安全。

Setupfactory是傻瓜式部署工具,GUI向导很人性化极易上手,几乎不要代码。但扩充功能少了些,多国语言支持一般。6.0是经典,7.0发现反而难用很多。

Dot net自带的在部署.net程序上有优势,但扩充功能较少。

还有Wise,不过感觉类似Install shield,而且界面不是很好看。


另:NSIS只有几十Kb到100多KB的开销,所以他的出的包最小了。



上述常用部署工具,只有INNO和NSIS是免费的,其他都是收费的,滥用盗版可能会被起诉。