1
1

CorelVBA.iss 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. ; Script generated by the Inno Setup Script Wizard.
  2. ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
  3. #define MyAppName "Lanya CorelVBA Test Version"
  4. #define MyAppVersion "2023.7.5"
  5. #define MyAppPublisher "lyvba.com"
  6. #define MyAppURL "https://lyvba.com/"
  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=Lanya_CorelVBA
  28. SetupIconFile=C:\app\CorelVBA\GMS\LYVBA\LOGO.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 2023', 'Destination', InstallDir) then
  41. begin
  42. Result := ExtractFilePath(InstallDir) + 'Draw\GMS';
  43. end
  44. else if RegQueryStringValue(HKLM64, 'SOFTWARE\Corel\Setup\CorelDRAW Graphics Suite 2022', 'Destination', InstallDir) then
  45. begin
  46. Result := ExtractFilePath(InstallDir) + 'Draw\GMS';
  47. end
  48. else if RegQueryStringValue(HKLM64, 'SOFTWARE\Corel\Setup\CorelDRAW Graphics Suite 2021', 'Destination', InstallDir) then
  49. begin
  50. Result := ExtractFilePath(InstallDir) + 'Draw\GMS';
  51. end
  52. else if RegQueryStringValue(HKLM64, 'SOFTWARE\Corel\Setup\CorelDRAW Graphics Suite 2020', 'Destination', InstallDir) then
  53. begin
  54. Result := ExtractFilePath(InstallDir) + 'Draw\GMS';
  55. end
  56. else if RegQueryStringValue(HKLM64, 'SOFTWARE\Corel\Setup\CorelDRAW Graphics Suite 2019', 'Destination', InstallDir) then
  57. begin
  58. Result := ExtractFilePath(InstallDir) + 'Draw\GMS';
  59. end
  60. else if RegQueryStringValue(HKLM64, 'SOFTWARE\Corel\Setup\CorelDRAW Graphics Suite 2018', 'Destination', InstallDir) then
  61. begin
  62. Result := ExtractFilePath(InstallDir) + 'Draw\GMS';
  63. end
  64. else if RegQueryStringValue(HKLM64, 'SOFTWARE\Corel\Setup\CorelDRAW Graphics Suite 16', 'Destination', InstallDir) then
  65. begin
  66. Result := ExtractFilePath(InstallDir) + 'Draw\GMS';
  67. end
  68. else
  69. begin
  70. // 如果读取失败,则使用默认安装目录
  71. Result := ExpandConstant('C:\Program Files\Corel\CorelDRAW Graphics Suite 2020\Draw\GMS');
  72. end;
  73. end;
  74. [Languages]
  75. Name: en; MessagesFile: "compiler:Default.isl"
  76. Name: "chinesesimplified"; MessagesFile: "compiler:Languages\ChineseSimplified.isl"
  77. Name: nl; MessagesFile: "compiler:Languages\Dutch.isl"
  78. Name: de; MessagesFile: "compiler:Languages\German.isl"
  79. [Tasks]
  80. Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
  81. [Files]
  82. Source: "C:\app\CorelVBA\GMS\LYVBA.gms"; DestDir: "{app}"; Flags: ignoreversion
  83. Source: "C:\app\CorelVBA\GMS\Adobe_Illustrator.gms"; DestDir: "{app}"; Flags: ignoreversion
  84. Source: "C:\app\CorelVBA\GMS\ColorMark.cdr"; DestDir: "{app}"; Flags: ignoreversion
  85. ; NOTE: Don't use "Flags: ignoreversion" on any shared system files
  86. Source: "C:\app\CorelVBA\GMS\LYVBA\*"; DestDir: "{app}\LYVBA\"; Flags: ignoreversion
  87. Source: "C:\app\CorelVBA\GMS\LYVBA\100\*"; DestDir: "{app}\LYVBA\100\"; Flags: ignoreversion
  88. Source: "C:\app\CorelVBA\GMS\LYVBA\125\*"; DestDir: "{app}\LYVBA\125\"; Flags: ignoreversion
  89. Source: "C:\app\CorelVBA\GMS\LYVBA\150\*"; DestDir: "{app}\LYVBA\150\"; Flags: ignoreversion
  90. Source: "C:\app\CorelVBA\GMS\LYVBA\175\*"; DestDir: "{app}\LYVBA\175\"; Flags: ignoreversion
  91. Source: "C:\app\CorelVBA\GMS\LYVBA\200\*"; DestDir: "{app}\LYVBA\200\"; Flags: ignoreversion
  92. Source: "C:\app\CorelVBA\TSP\*"; DestDir: "C:\TSP\"; Flags: ignoreversion
  93. [Icons]
  94. Name: "{autoprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
  95. ;Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
  96. [Run]
  97. ;Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: shellexec postinstall skipifsilent