IsSkin_Example.iss 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. ; 脚本由 Inno Setup 脚本向导 生成!
  2. ; 有关创建 Inno Setup 脚本文件的详细资料请查阅帮助文档!
  3. [Setup]
  4. AppName=ISSkin 示例
  5. AppVerName=ISSkin 示例 v1.0
  6. AppVersion=1.0.0.3
  7. AppCopyright=?1998-2008 Codejock Software
  8. DefaultDirName={pf}\ISSkin
  9. DefaultGroupName=ISSkin
  10. Compression=lzma
  11. SolidCompression=true
  12. WizardImageFile=compiler:Office2007.bmp
  13. WizardSmallImageFile=compiler:WizModernSmallImage-IS.bmp
  14. UninstallDisplayIcon={app}\SkinHelper.exe
  15. OutputDir=userdocs:Inno Setup Examples Output
  16. OutputBaseFilename=SetupOffice2007
  17. VersionInfoVersion=1.0.0.3
  18. VersionInfoCompany=Codejock Software
  19. VersionInfoDescription=ISSkin Example Setup
  20. VersionInfoTextVersion=1, 0, 0, 3
  21. [Files]
  22. ; Add the ISSkin DLL used for skinning Inno Setup installations.
  23. Source: compiler:ISSkin.dll; DestDir: {app}; Flags: dontcopy
  24. ; Add the Visual Style resource contains resources used for skinning,
  25. ; you can also use Microsoft Visual Styles (*.msstyles) resources.
  26. Source: compiler:IsSkins\Office2007.cjstyles; DestDir: {tmp}; Flags: dontcopy
  27. [Icons]
  28. Name: {group}\Uninstall =ISSkin; Filename: {app}\unins000.exe
  29. ; The following code block is used to load the ISS, pass in
  30. ; an empty string ('') as the second parameter to LoadSkin to use
  31. ; the Blue color scheme, this is the default color scheme for
  32. ; Office2007.cjstyles.
  33. [Code]
  34. // Importing LoadSkin API from ISSkin.DLL
  35. procedure LoadSkin(lpszPath: AnsiString; lpszIniFileName: AnsiString);
  36. external 'LoadSkin@files:isskin.dll stdcall';
  37. // Importing UnloadSkin API from ISSkin.DLL
  38. procedure UnloadSkin();
  39. external 'UnloadSkin@files:isskin.dll stdcall';
  40. // Importing ShowWindow Windows API from User32.DLL
  41. function ShowWindow(hWnd: Integer; uType: Integer): Integer;
  42. external 'ShowWindow@user32.dll stdcall';
  43. function InitializeSetup(): Boolean;
  44. begin
  45. ExtractTemporaryFile('Office2007.cjstyles');
  46. LoadSkin(AnsiString(ExpandConstant('{tmp}\Office2007.cjstyles')), '');
  47. Result := True;
  48. end;
  49. procedure DeinitializeSetup();
  50. begin
  51. // Hide Window before unloading skin so user does not get
  52. // a glimse of an unskinned window before it is closed.
  53. ShowWindow(StrToInt(ExpandConstant('{wizardhwnd}')), 0);
  54. UnloadSkin();
  55. end;