git.iko.soy/typeable/pandoc
on master help sign in
Removed Inno setup config files.
bbfba90John MacFarlane
windows/modpath.issdeleted−178
@@ -1,178 +0,0 @@
1−// ----------------------------------------------------------------------------
2−//
3−// Inno Setup Ver: 5.2.1
4−// Script Version: 1.3.1
5−// Author: Jared Breland <jbreland@legroom.net>
6−// Homepage: http://www.legroom.net/software
7−//
8−// Modified 10/18/2008 by John MacFarlane to set path in HKCU instead of HKLM if
9−// user does not have admin privileges. Also correctly handle the case where
10−// oldpath is empty.
11−//
12−// Script Function:
13−// Enable modification of system path directly from Inno Setup installers
14−//
15−// Instructions:
16−// Copy modpath.iss to the same directory as your setup script
17−//
18−// Add this statement to your [Setup] section
19−// ChangesEnvironment=yes
20−//
21−// Add this statement to your [Tasks] section
22−// You can change the Description or Flags, but the Name must be modifypath
23−// Name: modifypath; Description: &Add application directory to your system path; Flags: unchecked
24−//
25−// Add the following to the end of your [Code] section
26−// setArrayLength must specify the total number of dirs to be added
27−// Dir[0] contains first directory, Dir[1] contains second, etc.
28−// function ModPathDir(): TArrayOfString;
29−// var
30−// Dir: TArrayOfString;
31−// begin
32−// setArrayLength(Dir, 1)
33−// Dir[0] := ExpandConstant('{app}');
34−// Result := Dir;
35−// end;
36−// #include "modpath.iss"
37−// ----------------------------------------------------------------------------
38−
39−procedure ModPath();
40−var
41− oldpath: String;
42− newpath: String;
43− pathArr: TArrayOfString;
44− aExecFile: String;
45− aExecArr: TArrayOfString;
46− i, d: Integer;
47− pathdir: TArrayOfString;
48− reg: Integer;
49− regkey: String;
50−begin
51−
52− // Get array of new directories and act on each individually
53− pathdir := ModPathDir();
54− for d := 0 to GetArrayLength(pathdir)-1 do begin
55−
56− // Modify WinNT path
57− if UsingWinNT() = true then begin
58−
59− // Select HKLM or HKCU depending on whether user has admin privileges
60− if (IsAdminLoggedOn or IsPowerUserLoggedOn) then begin
61− reg := HKEY_LOCAL_MACHINE;
62− regkey := 'SYSTEM\CurrentControlSet\Control\Session Manager\Environment';
63− end else begin
64− reg := HKEY_CURRENT_USER;
65− regkey := 'Environment';
66− end;
67−
68− // Get current path, split into an array
69− RegQueryStringValue(reg, regkey, 'Path', oldpath);
70− oldpath := oldpath + ';';
71− i := 0;
72− while (Pos(';', oldpath) > 0) do begin
73− SetArrayLength(pathArr, i+1);
74− pathArr[i] := Copy(oldpath, 0, Pos(';', oldpath)-1);
75− oldpath := Copy(oldpath, Pos(';', oldpath)+1, Length(oldpath));
76− i := i + 1;
77−
78− // Check if current directory matches app dir
79− if pathdir[d] = pathArr[i-1] then begin
80− // if uninstalling, remove dir from path
81− if IsUninstaller() = true then begin
82− continue;
83− // if installing, abort because dir was already in path
84− end else begin
85− abort;
86− end;
87− end;
88−
89− // Add current directory to new path
90− if i = 1 then begin
91− newpath := pathArr[i-1];
92− end else begin
93− newpath := newpath + ';' + pathArr[i-1];
94− end;
95− end;
96−
97− // Append app dir to path if not already included
98− if IsUninstaller() = false then begin
99− if newpath = '' then begin
100− newpath := pathdir[d];
101− end else begin
102− newpath := newpath + ';' + pathdir[d];
103− end;
104− end;
105−
106− // Write new path
107− RegWriteStringValue(reg, regkey, 'Path', newpath);
108−
109− // Modify Win9x path
110− end else begin
111−
112− // Convert to shortened dirname
113− pathdir[d] := GetShortName(pathdir[d]);
114−
115− // If autoexec.bat exists, check if app dir already exists in path
116− aExecFile := 'C:\AUTOEXEC.BAT';
117− if FileExists(aExecFile) then begin
118− LoadStringsFromFile(aExecFile, aExecArr);
119− for i := 0 to GetArrayLength(aExecArr)-1 do begin
120− if IsUninstaller() = false then begin
121− // If app dir already exists while installing, abort add
122− if (Pos(pathdir[d], aExecArr[i]) > 0) then
123− abort;
124− end else begin
125− // If app dir exists and = what we originally set, then delete at uninstall
126− if aExecArr[i] = 'SET PATH=%PATH%;' + pathdir[d] then
127− aExecArr[i] := '';
128− end;
129− end;
130− end;
131−
132− // If app dir not found, or autoexec.bat didn't exist, then (create and) append to current path
133− if IsUninstaller() = false then begin
134− SaveStringToFile(aExecFile, #13#10 + 'SET PATH=%PATH%;' + pathdir[d], True);
135−
136− // If uninstalling, write the full autoexec out
137− end else begin
138− SaveStringsToFile(aExecFile, aExecArr, False);
139− end;
140− end;
141−
142− // Write file to flag modifypath was selected
143− // Workaround since IsTaskSelected() cannot be called at uninstall and AppName and AppId cannot be "read" in Code section
144− if IsUninstaller() = false then
145− SaveStringToFile(ExpandConstant('{app}') + '\uninsTasks.txt', WizardSelectedTasks(False), False);
146− end;
147−end;
148−
149−procedure CurStepChanged(CurStep: TSetupStep);
150−begin
151− if CurStep = ssPostInstall then
152− if IsTaskSelected('modifypath') then
153− ModPath();
154−end;
155−
156−procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep);
157−var
158− appdir: String;
159− selectedTasks: String;
160−begin
161− appdir := ExpandConstant('{app}')
162− if CurUninstallStep = usUninstall then begin
163− if LoadStringFromFile(appdir + '\uninsTasks.txt', selectedTasks) then
164− if Pos('modifypath', selectedTasks) > 0 then
165− ModPath();
166− DeleteFile(appdir + '\uninsTasks.txt')
167− end;
168−end;
169−
170−function NeedRestart(): Boolean;
171−begin
172− if IsTaskSelected('modifypath') and not UsingWinNT() then begin
173− Result := True;
174− end else begin
175− Result := False;
176− end;
177−end;
178−
windows/pandoc-setup.issdeleted−67
@@ -1,67 +0,0 @@
1−; Script generated by the Inno Setup Script Wizard.
2−; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
3−
4−[Setup]
5−; NOTE: The value of AppId uniquely identifies this application.
6−; Do not use the same AppId value in installers for other applications.
7−; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
8−AppId={{3CEE7B38-B19D-4980-9CAD-DF53600BD4CA}
9−; Version 5.1 is XP
10−MinVersion=5.1,5.1
11−AppName=Pandoc
12−AppVerName=Pandoc 1.10.1
13−AppPublisher=John MacFarlane
14−AppPublisherURL=http://johnmacfarlane.net/pandoc/
15−AppSupportURL=http://johnmacfarlane.net/pandoc/
16−AppUpdatesURL=http://johnmacfarlane.net/pandoc/
17−DefaultDirName={code:DefDirRoot}\Pandoc
18−DefaultGroupName=Pandoc
19−AllowNoIcons=yes
20−LicenseFile="..\COPYING.txt"
21−OutputBaseFilename=pandoc-setup
22−Compression=lzma
23−SolidCompression=yes
24−ChangesEnvironment=yes
25−PrivilegesRequired=none
26−
27−[Tasks]
28−Name: modifypath; Description: Add application directory to your path
29−
30−[Code]
31−function ModPathDir(): TArrayOfString;
32−var
33− Dir: TArrayOfString;
34−begin
35− setArrayLength(Dir, 1)
36− Dir[0] := ExpandConstant('{app}\bin');
37− Result := Dir;
38−end;
39−#include "modpath.iss"
40−
41−function IsRegularUser(): Boolean;
42−begin
43− Result := not (IsAdminLoggedOn or IsPowerUserLoggedOn);
44−end;
45−
46−function DefDirRoot(Param: String): String;
47−begin
48−if IsRegularUser then
49− Result := ExpandConstant('{localappdata}')
50−else
51− Result := ExpandConstant('{pf}')
52−end;
53−
54−[Languages]
55−Name: "english"; MessagesFile: "compiler:Default.isl"
56−
57−[Files]
58−Source: "..\cabal-dev\bin\pandoc.exe"; DestDir: "{app}\bin"; Flags: ignoreversion
59−Source: "..\README.html"; DestDir: "{app}"; Flags: ignoreversion
60−Source: "..\COPYRIGHT.txt"; DestDir: "{app}"; Flags: ignoreversion
61−Source: "..\COPYING.txt"; DestDir: "{app}"; Flags: ignoreversion
62−; NOTE: Don't use "Flags: ignoreversion" on any shared system files
63−
64−[Icons]
65−Name: "{group}\{cm:UninstallProgram,Pandoc}"; Filename: "{uninstallexe}"
66−Name: "{group}\Pandoc User's Guide"; Filename: "{app}\README.html"
67−