1
1

CorelVBA.iss 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  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"
  4. #define MyAppVersion "2026.5.28"
  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_64.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 2026', 'Destination', InstallDir) then
  41. begin
  42. Result := ExtractFilePath(InstallDir) + 'Draw\GMS';
  43. end
  44. else if RegQueryStringValue(HKLM64, 'SOFTWARE\Corel\Setup\CorelDRAW Graphics Suite 2025', 'Destination', InstallDir) then
  45. begin
  46. Result := ExtractFilePath(InstallDir) + 'Draw\GMS';
  47. end
  48. else if RegQueryStringValue(HKLM64, 'SOFTWARE\Corel\Setup\CorelDRAW Graphics Suite 2024', 'Destination', InstallDir) then
  49. begin
  50. Result := ExtractFilePath(InstallDir) + 'Draw\GMS';
  51. end
  52. else if RegQueryStringValue(HKLM64, 'SOFTWARE\Corel\Setup\CorelDRAW Graphics Suite 2023', 'Destination', InstallDir) then
  53. begin
  54. Result := ExtractFilePath(InstallDir) + 'Draw\GMS';
  55. end
  56. else if RegQueryStringValue(HKLM64, 'SOFTWARE\Corel\Setup\CorelDRAW Graphics Suite 2022', 'Destination', InstallDir) then
  57. begin
  58. Result := ExtractFilePath(InstallDir) + 'Draw\GMS';
  59. end
  60. else if RegQueryStringValue(HKLM64, 'SOFTWARE\Corel\Setup\CorelDRAW Graphics Suite 2021', 'Destination', InstallDir) then
  61. begin
  62. Result := ExtractFilePath(InstallDir) + 'Draw\GMS';
  63. end
  64. else if RegQueryStringValue(HKLM64, 'SOFTWARE\Corel\Setup\CorelDRAW Graphics Suite 2020', 'Destination', InstallDir) then
  65. begin
  66. Result := ExtractFilePath(InstallDir) + 'Draw\GMS';
  67. end
  68. else if RegQueryStringValue(HKLM64, 'SOFTWARE\Corel\Setup\CorelDRAW Graphics Suite 2019', 'Destination', InstallDir) then
  69. begin
  70. Result := ExtractFilePath(InstallDir) + 'Draw\GMS';
  71. end
  72. else if RegQueryStringValue(HKLM64, 'SOFTWARE\Corel\Setup\CorelDRAW Graphics Suite 2018', 'Destination', InstallDir) then
  73. begin
  74. Result := ExtractFilePath(InstallDir) + 'Draw\GMS';
  75. end
  76. else if RegQueryStringValue(HKLM64, 'SOFTWARE\Corel\Setup\CorelDRAW Graphics Suite 2017', 'Destination', InstallDir) then
  77. begin
  78. Result := ExtractFilePath(InstallDir) + 'Draw\GMS';
  79. end
  80. else if RegQueryStringValue(HKLM64, 'SOFTWARE\Corel\Setup\CorelDRAW Graphics Suite 17', 'Destination', InstallDir) then
  81. begin
  82. Result := ExtractFilePath(InstallDir) + 'Draw\GMS';
  83. end
  84. else if RegQueryStringValue(HKLM64, 'SOFTWARE\Corel\Setup\CorelDRAW Graphics Suite 16', 'Destination', InstallDir) then
  85. begin
  86. Result := ExtractFilePath(InstallDir) + 'Draw\GMS';
  87. end
  88. else if RegQueryStringValue(HKLM64, 'SOFTWARE\Corel\Setup\CorelDRAW Graphics Suite 15', 'Destination', InstallDir) then
  89. begin
  90. Result := ExtractFilePath(InstallDir) + 'Draw\GMS';
  91. end
  92. else if RegQueryStringValue(HKLM64, 'SOFTWARE\Corel\Setup\CorelDRAW Graphics Suite 14', 'Destination', InstallDir) then
  93. begin
  94. Result := ExtractFilePath(InstallDir) + 'Draw\GMS';
  95. end
  96. else
  97. begin
  98. // 如果读取失败,则使用默认安装目录
  99. Result := ExpandConstant('C:\Program Files\Corel\CorelDRAW Graphics Suite 2020\Draw\GMS');
  100. end;
  101. end;
  102. [Languages]
  103. Name: en; MessagesFile: "compiler:Default.isl"
  104. Name: "chinesesimplified"; MessagesFile: "compiler:Languages\ChineseSimplified.isl"
  105. Name: nl; MessagesFile: "compiler:Languages\Dutch.isl"
  106. Name: de; MessagesFile: "compiler:Languages\German.isl"
  107. [Tasks]
  108. Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
  109. [Files]
  110. Source: "C:\app\CorelVBA\GMS\LYVBA.gms"; DestDir: "{app}"; Flags: ignoreversion
  111. Source: "C:\app\CorelVBA\GMS\Lanya_LinesTool.gms"; DestDir: "{app}"; Flags: ignoreversion
  112. ; Source: "C:\app\CorelVBA\GMS\Adobe_Illustrator.gms"; DestDir: "{app}"; Flags: ignoreversion
  113. Source: "C:\app\CorelVBA\GMS\ZeroBase.gms"; DestDir: "{app}"; Flags: ignoreversion
  114. Source: "C:\app\CorelVBA\GMS\ColorMark.cdr"; DestDir: "{app}"; Flags: ignoreversion
  115. Source: "C:\app\CorelVBA\GMS\README-LYVBA.md"; DestDir: "{app}"; Flags: ignoreversion
  116. Source: "C:\app\CorelVBA\GMS\lycpg64.cpg"; DestDir: "{app}\..\Plugins64\"; Flags: ignoreversion
  117. ; NOTE: Don't use "Flags: ignoreversion" on any shared system files
  118. Source: "C:\app\CorelVBA\GMS\LYVBA\*"; DestDir: "{app}\LYVBA\"; Flags: ignoreversion
  119. Source: "C:\app\CorelVBA\GMS\LYVBA\100\*"; DestDir: "{app}\LYVBA\100\"; Flags: ignoreversion
  120. Source: "C:\app\CorelVBA\GMS\LYVBA\125\*"; DestDir: "{app}\LYVBA\125\"; Flags: ignoreversion
  121. Source: "C:\app\CorelVBA\GMS\LYVBA\150\*"; DestDir: "{app}\LYVBA\150\"; Flags: ignoreversion
  122. Source: "C:\app\CorelVBA\GMS\LYVBA\175\*"; DestDir: "{app}\LYVBA\175\"; Flags: ignoreversion
  123. Source: "C:\app\CorelVBA\GMS\LYVBA\200\*"; DestDir: "{app}\LYVBA\200\"; Flags: ignoreversion
  124. Source: "C:\app\CorelVBA\TSP\*"; DestDir: "C:\TSP\"; Flags: ignoreversion
  125. [Icons]
  126. Name: "{autoprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
  127. ;Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
  128. [Run]
  129. ;Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: shellexec postinstall skipifsilent