CorelVBA.iss 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. ; Script generated by the Inno Setup Script Wizard.
  2. ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
  3. #define MyAppName "蘭雅CorelVBA 2023版"
  4. #define MyAppVersion "1.1"
  5. #define MyAppPublisher "蘭雅sRGB CorelDRAW 免费开源插件"
  6. #define MyAppURL "https://262235.xyz/"
  7. #define MyAppExeName "GMS"
  8. #define MyAppAssocName MyAppName + ""
  9. #define MyAppAssocExt ".myp"
  10. #define MyAppAssocKey StringChange(MyAppAssocName, " ", "") + MyAppAssocExt
  11. [Setup]
  12. ; NOTE: The value of AppId uniquely identifies this application. Do not use the same AppId value in installers for other applications.
  13. ; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
  14. AppId={{0006790C-7107-4C59-A557-7F2EEDB64AFB}
  15. AppName={#MyAppName}
  16. AppVersion={#MyAppVersion}
  17. ;AppVerName={#MyAppName} {#MyAppVersion}
  18. AppPublisher={#MyAppPublisher}
  19. AppPublisherURL={#MyAppURL}
  20. AppSupportURL={#MyAppURL}
  21. AppUpdatesURL={#MyAppURL}
  22. ChangesAssociations=yes
  23. DisableProgramGroupPage=yes
  24. ; Uncomment the following line to run in non administrative install mode (install for current user only.)
  25. ;PrivilegesRequired=lowest
  26. OutputDir=C:\app\CorelVBA
  27. OutputBaseFilename=蘭雅CorelVBA
  28. SetupIconFile=C:\app\CorelVBA\GMS\262235.xyz\蘭.ico
  29. Compression=lzma
  30. SolidCompression=yes
  31. WizardStyle=modern
  32. UsePreviousAppDir=no
  33. DefaultDirName={code:GetInstallDir}
  34. [Code]
  35. function GetInstallDir(Param: String): String;
  36. var
  37. InstallDir: String;
  38. begin
  39. // 从注册表中读取安装目录
  40. if RegQueryStringValue(HKLM64, 'SOFTWARE\Corel\Setup\CorelDRAW Graphics Suite 2022', 'Destination', InstallDir) then
  41. begin
  42. Result := ExtractFilePath(InstallDir) + 'Draw\GMS';
  43. end
  44. else if RegQueryStringValue(HKLM64, 'SOFTWARE\Corel\Setup\CorelDRAW Graphics Suite 2020', 'Destination', InstallDir) then
  45. begin
  46. Result := ExtractFilePath(InstallDir) + 'Draw\GMS';
  47. end
  48. else if RegQueryStringValue(HKLM64, 'SOFTWARE\Corel\Setup\CorelDRAW Graphics Suite 16', 'Destination', InstallDir) then
  49. begin
  50. Result := ExtractFilePath(InstallDir) + 'Draw\GMS';
  51. end
  52. else
  53. begin
  54. // 如果读取失败,则使用默认安装目录
  55. Result := ExpandConstant('C:\Program Files\Corel\CorelDRAW Graphics Suite 2020\Draw\GMS');
  56. end;
  57. end;
  58. [Languages]
  59. Name: "chinesesimplified"; MessagesFile: "compiler:Languages\ChineseSimplified.isl"
  60. [Tasks]
  61. Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
  62. [Files]
  63. Source: "C:\app\CorelVBA\GMS\262235.xyz.gms"; DestDir: "{app}"; Flags: ignoreversion
  64. Source: "C:\app\CorelVBA\GMS\Adobe_Illustrator.gms"; DestDir: "{app}"; Flags: ignoreversion
  65. Source: "C:\app\CorelVBA\GMS\ColorMark.cdr"; DestDir: "{app}"; Flags: ignoreversion
  66. Source: "C:\app\CorelVBA\GMS\ZeroBase.gms"; DestDir: "{app}"; Flags: ignoreversion
  67. Source: "C:\app\CorelVBA\GMS\学习CorelVBA.gms"; DestDir: "{app}"; Flags: ignoreversion
  68. ; NOTE: Don't use "Flags: ignoreversion" on any shared system files
  69. Source: "C:\app\CorelVBA\GMS\262235.xyz\*"; DestDir: "{app}\262235.xyz\"; Flags: ignoreversion
  70. Source: "C:\app\CorelVBA\TSP\*"; DestDir: "C:\TSP\"; Flags: ignoreversion
  71. [Icons]
  72. Name: "{autoprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
  73. Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
  74. [Run]
  75. ;Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: shellexec postinstall skipifsilent