I have made several scripts for inDesign. Now I want to distribute them all in a setup file. Since inDesign scripts reside in different locations on XP and Vista (or above), I'm having some problems. My compiled setup works fine under Windows XP but doesn't copy anything to Windows 7 AppData
folder. When I change folder from AppData
to an absolute path, it works.
[Files]
Source: "Akruti Converter.jsx"; DestDir: "{userappdata}\Roaming\Adobe\InDesign\Version 8.0\en_US\Scripts\Scripts Panel\Unicode Converters\Plain"; Check: IsWindowsVista_or_7
Source: "Akruti Converter.jsx"; DestDir: "C:\Unicode Converters\Plain"
Source: "ShreeLipi v4,5,6 Converter.jsx"; DestDir: "{userappdata}\Roaming\Adobe\InDesign\Version 8.0\en_US\Scripts\Scripts Panel\Unicode Converters\Plain"; Check: IsWindowsVista_or_7
Source: "Smart Akruti Converter.jsx"; DestDir: "{userappdata}\Roaming\Adobe\InDesign\Version 8.0\en_US\Scripts\Scripts Panel\Unicode Converters\Smart"; Check: IsWindowsVista_or_7
Source: "Akruti Converter.jsx"; DestDir: "{userappdata}\Adobe\InDesign\Version 8.0\en_US\Scripts\Scripts Panel\Unicode Converters\Plain"; Check: IsWindowsXP
Source: "ShreeLipi v4,5,6 Converter.jsx"; DestDir: "{userappdata}\Adobe\InDesign\Version 8.0\en_US\Scripts\Scripts Panel\Unicode Converters\Plain"; Check: IsWindowsXP
Source: "Smart Akruti Converter.jsx"; DestDir: "{userappdata}\Adobe\InDesign\Version 8.0\en_US\Scripts\Scripts Panel\Unicode Converters\Smart"; Check: IsWindowsXP
[Code]
function IsWindowsXP: Boolean;
var
Version: TWindowsVersion;
begin
GetWindowsVersionEx(Version);
Result := Version.NTPlatform and (Version.Major = 5) and (Version.Minor = 1);
end;
function IsWindowsVista_or_7: Boolean;
var
Version: TWindowsVersion;
begin
GetWindowsVersionEx(Version);
Result := Version.NTPlatform and (Version.Major = 6) and ((Version.Minor = 1));
end;