Skip to content

Commit 68b1b01

Browse files
authored
Merge pull request #2352 from lixun910/v1.20
Add windows installer for Windows7+
2 parents 881c33f + f7a0a6a commit 68b1b01

File tree

8 files changed

+567
-21
lines changed

8 files changed

+567
-21
lines changed

.github/workflows/windows_build.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,10 +227,12 @@ jobs:
227227
if($env:platform -eq "x86")
228228
{
229229
ISCC.exe /q installer\32bit\GeoDa.iss
230+
ISCC.exe /q installer\32bit\GeoDa-win7+.iss
230231
}
231232
else
232233
{
233234
ISCC.exe /q installer\64bit\GeoDa.iss
235+
ISCC.exe /q installer\64bit\GeoDa-win7+.iss
234236
}
235237
dir
236238
@@ -239,6 +241,11 @@ jobs:
239241
name: GeoDa-Windows-${{ env.platform }}-installer
240242
path: ${{ github.workspace }}\BuildTools\windows\GeoDa_1.20_${{ env.platform }}_Setup.exe
241243

244+
- uses: actions/upload-artifact@v2
245+
with:
246+
name: GeoDa-Windows7+-${{ env.platform }}-installer
247+
path: ${{ github.workspace }}\BuildTools\windows\GeoDa_1.20_win7+${{ env.platform }}_Setup.exe
248+
242249

243250

244251

Lines changed: 235 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,235 @@
1+
[Setup]
2+
AppName=GeoDa
3+
AppPublisher=GeoDa Center
4+
AppPublisherURL=https://spatial.uchiago.edu/
5+
AppSupportURL=https://spatial.uchiago.edu/
6+
AppUpdatesURL=https://spatial.uchiago.edu/
7+
AppSupportPhone=(480)965-7533
8+
AppVersion=1.20
9+
DefaultDirName={pf}\GeoDa
10+
DefaultGroupName=GeoDa Software
11+
; Since no icons will be created in "{group}", we don't need the wizard
12+
; to ask for a Start Menu folder name:
13+
;DisableProgramGroupPage=yes
14+
UninstallDisplayIcon={app}\GeoDa.exe
15+
Compression=lzma2
16+
SolidCompression=yes
17+
OutputDir=..\..
18+
OutputBaseFilename=GeoDa_1.20_win7+x86_Setup
19+
;OutputDir=userdocs:Inno Setup Examples Output
20+
21+
ChangesAssociations=yes
22+
23+
ShowLanguageDialog=yes
24+
25+
[Languages]
26+
Name: "en"; MessagesFile: "compiler:Default.isl"
27+
28+
[dirs]
29+
Name: "{app}"; Check: InitializeSetup
30+
Name: "{userappdata}\GeoDa\basemap_cache"; Permissions: users-modify
31+
Name: "{userappdata}\GeoDa\lang"; Permissions: users-modify
32+
33+
[Files]
34+
Source: "..\..\Release\GeoDa.exe"; DestDir: "{app}"; DestName: "GeoDa.exe"
35+
Source: "..\..\..\CommonDistFiles\GeoDa.ico"; DestDir: "{app}"
36+
Source: "..\..\..\CommonDistFiles\copyright.txt"; DestDir: "{app}"
37+
Source: "..\..\..\CommonDistFiles\GPLv3.txt"; DestDir: "{app}"
38+
Source: "..\..\..\CommonDistFiles\cache.sqlite"; DestDir: "{userappdata}\GeoDa"
39+
Source: "..\..\..\CommonDistFiles\cache.sqlite"; DestDir: "{app}"
40+
Source: "..\..\..\CommonDistFiles\geoda_prefs.sqlite"; DestDir: "{app}"
41+
Source: "..\..\..\CommonDistFiles\geoda_prefs.json"; DestDir: "{app}"
42+
Source: "..\..\..\CommonDistFiles\web_plugins\*"; DestDir: "{app}\web_plugins"; Flags: recursesubdirs
43+
Source: "..\..\..\CommonDistFiles\proj\*"; DestDir: "{app}\proj"; Flags: recursesubdirs
44+
45+
46+
Source: "VC_redist.x86.exe"; DestDir: "{app}"
47+
Source: "..\..\temp\OpenCL\sdk\bin\x86\OpenCL.dll"; DestDir: "{app}"
48+
Source: "..\..\temp\wxWidgets\lib\vc_dll\wxmsw314u_vc_custom.dll"; DestDir: "{app}"
49+
Source: "..\..\temp\wxWidgets\lib\vc_dll\wxmsw314u_gl_vc_custom.dll"; DestDir: "{app}"
50+
Source: "..\..\libraries\bin\expat.dll"; DestDir: "{app}"
51+
Source: "..\..\libraries\bin\freexl.dll"; DestDir: "{app}"
52+
Source: "..\..\libraries\bin\gdal302.dll"; DestDir: "{app}"
53+
Source: "..\..\libraries\bin\geos.dll"; DestDir: "{app}"
54+
Source: "..\..\libraries\bin\geos_c.dll"; DestDir: "{app}"
55+
Source: "..\..\libraries\bin\iconv.dll"; DestDir: "{app}"
56+
Source: "..\..\libraries\bin\libcrypto-1_1.dll"; DestDir: "{app}"
57+
Source: "..\..\libraries\bin\libcurl.dll"; DestDir: "{app}"
58+
Source: "..\..\libraries\bin\libmysql.dll"; DestDir: "{app}"
59+
Source: "..\..\libraries\bin\libpq.dll"; DestDir: "{app}"
60+
Source: "..\..\libraries\bin\libssl-1_1.dll"; DestDir: "{app}"
61+
Source: "..\..\libraries\bin\libxml2.dll"; DestDir: "{app}"
62+
Source: "..\..\libraries\bin\openjp2.dll"; DestDir: "{app}"
63+
Source: "..\..\libraries\bin\proj.dll"; DestDir: "{app}"
64+
Source: "..\..\libraries\bin\proj_6_1.dll"; DestDir: "{app}"
65+
Source: "..\..\libraries\bin\spatialite.dll"; DestDir: "{app}"
66+
Source: "..\..\libraries\bin\sqlite3.dll"; DestDir: "{app}"
67+
Source: "..\..\libraries\bin\xerces-c_3_2.dll"; DestDir: "{app}"
68+
Source: "..\..\libraries\bin\zlib1.dll"; DestDir: "{app}"
69+
Source: "..\..\libraries\bin\gdal\plugins\ogr_OCI.dll"; DestDir: "{app}"
70+
Source: "..\..\libraries\bin\gdal\plugins-optional\ogr_PG.dll"; DestDir: "{app}"
71+
Source: "..\..\libraries\bin\gdal\plugins-optional\ogr_MSSQLSpatial.dll"; DestDir: "{app}"
72+
Source: "..\..\libraries\bin\gdal\plugins-external\ogr_FileGDB.dll"; DestDir: "{app}"
73+
Source: "..\..\..\..\Algorithms\lisa_kernel.cl"; DestDir: "{app}"
74+
Source: "..\..\..\..\internationalization\lang\*"; DestDir: "{app}\lang"; Flags: recursesubdirs
75+
Source: "..\..\..\..\internationalization\lang\config.ini"; DestDir: "{userappdata}\GeoDa\lang"
76+
Source: "..\..\libraries\bin\gdal-data\*"; DestDir: "{app}\data"; Flags: recursesubdirs
77+
78+
;Source: "Readme.txt"; DestDir: "{app}"; Flags: isreadme
79+
80+
[Icons]
81+
Name: "{group}\GeoDa"; Filename: "{app}\GeoDa.exe"
82+
;Name: "{group}\GeoDa"; Filename: "{app}\run_geoda.bat"; IconFilename: "{app}\GeoDa.ico"
83+
Name: "{group}\Uninstall"; Filename: "{uninstallexe}"
84+
Name: "{commondesktop}\GeoDa"; Filename: "{app}\GeoDa.exe"
85+
;Name: "{commondesktop}\GeoDa"; Filename: "{app}\run_geoda.bat"; IconFilename: "{app}\GeoDa.ico"
86+
87+
[Registry]
88+
; set PATH
89+
; set GEODA_GDAL_DATA
90+
Root: HKCU; Subkey: "Environment"; ValueType:string; ValueName:"GDAL_DATA"; ValueData:"{app}\data"; Flags: preservestringtype uninsdeletevalue
91+
; set GEODA_OGR_DRIVER_PATH
92+
Root: HKCU; Subkey: "Environment"; ValueType:string; ValueName:"OGR_DRIVER_PATH"; ValueData:"{app}"; Flags: preservestringtype uninsdeletevalue
93+
Root: HKCU; Subkey: "Environment"; ValueType:string; ValueName:"PROJ_LIB"; ValueData:"{app}\proj"; Flags: preservestringtype uninsdeletevalue
94+
95+
Root: HKCR; Subkey: ".gda"; ValueType: string; ValueName: ""; ValueData: "GeoDaProjectFile"; Flags: uninsdeletevalue
96+
Root: HKCR; Subkey: "GeoDaProjectFile"; ValueType: string; ValueName: ""; ValueData: "GeoDa Project File"; Flags: uninsdeletekey
97+
Root: HKCR; Subkey: "GeoDaProjectFile\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\GeoDa.exe,0"
98+
Root: HKCR; Subkey: "GeoDaProjectFile\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\GeoDa.exe"" ""%1"""
99+
100+
; set Browser Emulation for wxWebView to IE 11. IE 10 or earlier does not work with current D3
101+
Root: "HKCU"; Subkey: "Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION"; ValueType: dword; ValueName:"GeoDa.exe"; ValueData:"$2AF9"
102+
103+
;Local Machine
104+
Root: "HKLM"; Subkey: "SOFTWARE\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_BROWSER_EMULATION"; ValueType: dword; ValueName: "GeoDa.exe"; ValueData: "$2AF9"
105+
106+
;run as admin
107+
;Root: "HKLM"; Subkey: "SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers\"; ValueType: String; ValueName: "{app}\GeoDa.exe"; ValueData: "RUNASADMIN"; Flags: uninsdeletekeyifempty uninsdeletevalue; MinVersion: 0,6.1
108+
109+
[Code]
110+
function IsX64: Boolean;
111+
begin
112+
Result := Is64BitInstallMode and (ProcessorArchitecture = paX64);
113+
end;
114+
115+
function IsIA64: Boolean;
116+
begin
117+
Result := Is64BitInstallMode and (ProcessorArchitecture = paIA64);
118+
end;
119+
120+
function IsOtherArch: Boolean;
121+
begin
122+
Result := not IsX64 and not IsIA64;
123+
end;
124+
125+
function VCRedistNeedsInstall: Boolean;
126+
begin
127+
Result := not RegKeyExists(HKLM,'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{03d1453c-7d5c-479c-afea-8482f406e036}');
128+
end;
129+
130+
function GetUninstallString: string;
131+
var
132+
sUnInstPath: string;
133+
sUnInstallString: String;
134+
begin
135+
Result := '';
136+
sUnInstPath := ExpandConstant('Software\Microsoft\Windows\CurrentVersion\Uninstall\GeoDa_is1'); //Your App GUID/ID
137+
sUnInstallString := '';
138+
if not RegQueryStringValue(HKLM, sUnInstPath, 'UninstallString', sUnInstallString) then
139+
RegQueryStringValue(HKCU, sUnInstPath, 'UninstallString', sUnInstallString);
140+
Result := sUnInstallString;
141+
end;
142+
143+
function IsUpgrade: Boolean;
144+
begin
145+
Result := (GetUninstallString() <> '');
146+
end;
147+
148+
function InitializeSetup: Boolean;
149+
var
150+
V: Integer;
151+
iResultCode: Integer;
152+
sUnInstallString: string;
153+
begin
154+
Result := True; // in case when no previous version is found
155+
if RegValueExists(HKEY_LOCAL_MACHINE,'Software\Microsoft\Windows\CurrentVersion\Uninstall\GeoDa_is1', 'UninstallString') then //Your App GUID/ID
156+
begin
157+
V := MsgBox(ExpandConstant('An old version of GeoDa was detected. Please uninstall it before continuing.'), mbInformation, MB_YESNO); //Custom Message if App installed
158+
if V = IDYES then
159+
begin
160+
sUnInstallString := GetUninstallString();
161+
sUnInstallString := RemoveQuotes(sUnInstallString);
162+
Exec(ExpandConstant(sUnInstallString), '', '', SW_SHOW, ewWaitUntilTerminated, iResultCode);
163+
Result := True; //if you want to proceed after uninstall
164+
//Exit; //if you want to quit after uninstall
165+
end
166+
else
167+
Result := False; //when older version present and not uninstalled
168+
end;
169+
end;
170+
171+
var
172+
Button: TNewButton;
173+
ComboBox: TNewComboBox;
174+
CustomPage: TWizardPage;
175+
langCode: string;
176+
177+
procedure ComboBoxChange(Sender: TObject);
178+
begin
179+
case ComboBox.ItemIndex of
180+
0:
181+
begin
182+
langCode := '58';
183+
end;
184+
1:
185+
begin
186+
langCode := '45'; // chinese
187+
end;
188+
2:
189+
begin
190+
langCode := '179'; // spanish
191+
end;
192+
3:
193+
begin
194+
langCode := '159'; // russian
195+
end;
196+
end;
197+
end;
198+
199+
procedure InitializeWizard;
200+
var
201+
DescLabel: TLabel;
202+
begin
203+
CustomPage := CreateCustomPage(wpSelectDir, 'Language Selection', 'Please select a language for GeoDa');
204+
205+
DescLabel := TLabel.Create(WizardForm);
206+
DescLabel.Parent := CustomPage.Surface;
207+
DescLabel.Left := 0;
208+
DescLabel.Top := 0;
209+
DescLabel.Caption := '';
210+
211+
ComboBox := TNewComboBox.Create(WizardForm);
212+
ComboBox.Parent := CustomPage.Surface;
213+
ComboBox.Left := 0;
214+
ComboBox.Top := DescLabel.Top + DescLabel.Height + 6;
215+
ComboBox.Width := 220;
216+
ComboBox.Style := csDropDownList;
217+
ComboBox.Items.Add('English');
218+
ComboBox.Items.Add('Chinese (Simplified)');
219+
ComboBox.Items.Add('Spanish');
220+
ComboBox.Items.Add('Russian');
221+
ComboBox.ItemIndex := 0;
222+
ComboBox.OnChange := @ComboBoxChange;
223+
langCode := '58';
224+
end;
225+
226+
function getLangCode(Param: String): String;
227+
begin
228+
Result := langCode;
229+
end;
230+
231+
[INI]
232+
Filename: "{userappdata}\GeoDa\lang\config.ini"; Section: "Translation"; Key: "Language"; String: {code:getLangCode|{userappdata}\GeoDa}
233+
234+
[Run]
235+
Filename: {app}\VC_redist.x86.exe; StatusMsg: Installing Visual C++ Redistributable for Visual Studio 2019 (14.28.29913.0)...; Check: VCRedistNeedsInstall

0 commit comments

Comments
 (0)