使用interbase是因其体积小巧,运行效率高。
下面以inno setup5.0的安装脚本为例介绍一下最小化打包interbase的方法。本安装脚本仅适合win2000及以上操作系统,不兼容win9X。本脚本在xp下安装通过,win2000应该也一样。如果您有更好的安装脚本或别的意见建议,欢迎与我联系 ufo2003@126.com
[Files]
;以下为客户端所需文件,计5个,大小为875K
Source: "E:softib7win32Clientininstreg.exe"; DestDir: "{pf}BorlandInterBase7in"Source: "E:softib7win32Clientinterbase.msg"; DestDir: "{pf}BorlandInterBase7"; Flags: Promptifolder sharedfile
Source: "E:softib7Set3050.exe"; DestDir: "{tmp}"; Flags: deleteafterinstall
Source: "E:softib7win32Clientgds32.dll"; DestDir: "{sys}"; Flags: sharedfile
Source: "E:softib7win32Clientmsvcrt.dll"; DestDir: "{sys}"; Flags: onlyifdoesntexist uninsneveruninstall sharedfile
;以下为服务器端文件,所需文件为6个,大小为2.6M
(本文来源于图老师网站,更多请访问https://m.tulaoshi.com/bianchengyuyan/)Source: "E:softib7win32Serveradmin.ib"; DestDir: "{pf}BorlandInterBase7"; Flags: onlyifdoesntexist uninsneveruninstallSource: "C:Program FilesBorlandInterBaseibconfig"; DestDir: "{pf}BorlandInterBase7"; Flags: Promptifolder
Source: "C:Program FilesBorlandInterBaseinibguard.exe"; DestDir: "{pf}BorlandInterBase7in"; Flags: sharedfile
Source: "C:Program FilesBorlandInterBaseinibserver.exe"; DestDir: "{pf}BorlandInterBase7in"; Flags: sharedfile
Source: "C:Program FilesBorlandInterBaseib_license.dat"; DestDir: "{pf}BorlandInterBase7"; Flags: Promptifolder
Source: "C:Program FilesBorlandInterBaseininstsvc.exe"; DestDir: "{pf}BorlandInterBase7in"
[Registry] ;--注册服务器路径和卸载要求
(本文来源于图老师网站,更多请访问https://m.tulaoshi.com/bianchengyuyan/) Root: HKLM; Subkey: "SoftwareBorlandInterBaseCurrentVersion"; ValueType: string; ValueName: "ServerDirectory"; ValueData: "{pf}BorlandInterBase7in"; Flags: uninsdeletevalue
Root: HKLM; Subkey: SoftwareBorlandInterBaseCurrentVersion; Flags: uninsdeletekeyifempty
Root: HKLM; Subkey: SoftwareBorlandInterBase; Flags: uninsdeletekeyifempty
[Run] ;--安装后运行自注册文件来注册客户端和服务器端,并启动服务程序
Filename: "{tmp}Set3050.exe"; Flags: runminimizedFilename: "{pf}BorlandInterBase7ininstreg.exe"; Parameters: "install ""{pf}BorlandInterBase7"""; Flags: nowait runminimized
Filename: "{pf}BorlandInterBase7ininstsvc.exe"; Parameters: "install ""{pf}BorlandInterBase7"" -auto -z"; Flags: runminimized
Filename: "{pf}BorlandInterBase7ininstsvc.exe"; Parameters: start; Flags: nowait runminimized