使用interbase是因其体积小巧,运行效率高。
下面以inno setup5.0的安装脚本为例介绍一下最小化打包interbase的方法。本安装脚本仅适合win2000及以上操作系统,不兼容win9X。本脚本在xp下安装通过,win2000应该也一样。如果您有更好的安装脚本或别的意见建议,欢迎与我联系 [email protected]
[Files]
;以下为客户端所需文件,计5个,大小为875K
Source: "E:/soft/ib7/win32/Client/bin/instreg.exe"; DestDir: "{pf}/Borland/InterBase7/bin"
Source: "E:/soft/ib7/win32/Client/interbase.msg"; DestDir: "{pf}/Borland/InterBase7"; Flags: Promptifolder sharedfile
Source: "E:/soft/ib7/Set3050.exe"; DestDir: "{tmp}"; Flags: deleteafterinstall
Source: "E:/soft/ib7/win32/Client/gds32.dll"; DestDir: "{sys}"; Flags: sharedfile
Source: "E:/soft/ib7/win32/Client/msvcrt.dll"; DestDir: "{sys}"; Flags: onlyifdoesntexist uninsneveruninstall sharedfile
;以下为服务器端文件,所需文件为6个,大小为2.6M
Source: "E:/soft/ib7/win32/Server/admin.ib"; DestDir: "{pf}/Borland/InterBase7"; Flags: onlyifdoesntexist uninsneveruninstall
Source: "C:/Program Files/Borland/InterBase/ibconfig"; DestDir: "{pf}/Borland/InterBase7"; Flags: Promptifolder
Source: "C:/Program Files/Borland/InterBase/bin/ibguard.exe"; DestDir: "{pf}/Borland/InterBase7/bin"; Flags: sharedfile
Source: "C:/Program Files/Borland/InterBase/bin/ibserver.exe"; DestDir: "{pf}/Borland/InterBase7/bin"; Flags: sharedfile
Source: "C:/Program Files/Borland/InterBase/ib_license.dat"; DestDir: "{pf}/Borland/InterBase7"; Flags: Promptifolder
Source: "C:/Program Files/Borland/InterBase/bin/instsvc.exe"; DestDir: "{pf}/Borland/InterBase7/bin"
[Registry] ;--注册服务器路径和卸载要求
Root: HKLM; Subkey: "Software/Borland/InterBase/CurrentVersion"; ValueType: string; ValueName: "ServerDirectory"; ValueData: "{pf}/Borland/InterBase7/bin"; Flags: uninsdeletevalue
Root: HKLM; Subkey: Software/Borland/InterBase/CurrentVersion; Flags: uninsdeletekeyifempty
Root: HKLM; Subkey: Software/Borland/InterBase; Flags: uninsdeletekeyifempty
[Run] ;--安装后运行自注册文件来注册客户端和服务器端,并启动服务程序
Filename: "{tmp}/Set3050.exe"; Flags: runminimized
Filename: "{pf}/Borland/InterBase7/bin/instreg.exe"; Parameters: "install ""{pf}/Borland/InterBase7"""; Flags: nowait runminimized
Filename: "{pf}/Borland/InterBase7/bin/instsvc.exe"; Parameters: "install ""{pf}/Borland/InterBase7"" -auto -z"; Flags: runminimized
Filename: "{pf}/Borland/InterBase7/bin/instsvc.exe"; Parameters: start; Flags: nowait runminimized