Skip to content

Commit e98f674

Browse files
committed
Moved to NSIS
Moved away from rage-inducing WiX to an NSIS installer.
1 parent a1f9815 commit e98f674

File tree

7 files changed

+322
-88
lines changed

7 files changed

+322
-88
lines changed

ColorWars.sln

+48-8
Original file line numberDiff line numberDiff line change
@@ -9,69 +9,109 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICCReader", "ICCReader\ICCR
99
EndProject
1010
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ColorManagment", "ColorManagment\ColorManagment.csproj", "{732EBACF-9743-4C22-85F7-3284BA046C0C}"
1111
EndProject
12-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Installer", "Installer\Installer.csproj", "{413DA6DF-0488-4FD1-8A37-384958A13053}"
12+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NSISInstaller", "NSISInstaller\NSISInstaller.csproj", "{92F74E5A-CF68-46DF-95BB-CFF0DDC2CAB7}"
1313
EndProject
1414
Global
1515
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1616
Debug|Any CPU = Debug|Any CPU
17+
Debug|Mixed Platforms = Debug|Mixed Platforms
18+
Debug|Win32 = Debug|Win32
1719
Debug|x64 = Debug|x64
1820
Debug|x86 = Debug|x86
1921
Release|Any CPU = Release|Any CPU
22+
Release|Mixed Platforms = Release|Mixed Platforms
23+
Release|Win32 = Release|Win32
2024
Release|x64 = Release|x64
2125
Release|x86 = Release|x86
2226
EndGlobalSection
2327
GlobalSection(ProjectConfigurationPlatforms) = postSolution
2428
{6A8152C0-82EB-4704-865F-D682E4FC5438}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
2529
{6A8152C0-82EB-4704-865F-D682E4FC5438}.Debug|Any CPU.Build.0 = Debug|Any CPU
30+
{6A8152C0-82EB-4704-865F-D682E4FC5438}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
31+
{6A8152C0-82EB-4704-865F-D682E4FC5438}.Debug|Mixed Platforms.Build.0 = Debug|x86
32+
{6A8152C0-82EB-4704-865F-D682E4FC5438}.Debug|Win32.ActiveCfg = Debug|x86
33+
{6A8152C0-82EB-4704-865F-D682E4FC5438}.Debug|Win32.Build.0 = Debug|x86
2634
{6A8152C0-82EB-4704-865F-D682E4FC5438}.Debug|x64.ActiveCfg = Debug|x64
2735
{6A8152C0-82EB-4704-865F-D682E4FC5438}.Debug|x64.Build.0 = Debug|x64
2836
{6A8152C0-82EB-4704-865F-D682E4FC5438}.Debug|x86.ActiveCfg = Debug|x86
2937
{6A8152C0-82EB-4704-865F-D682E4FC5438}.Debug|x86.Build.0 = Debug|x86
3038
{6A8152C0-82EB-4704-865F-D682E4FC5438}.Release|Any CPU.ActiveCfg = Release|Any CPU
3139
{6A8152C0-82EB-4704-865F-D682E4FC5438}.Release|Any CPU.Build.0 = Release|Any CPU
40+
{6A8152C0-82EB-4704-865F-D682E4FC5438}.Release|Mixed Platforms.ActiveCfg = Release|x86
41+
{6A8152C0-82EB-4704-865F-D682E4FC5438}.Release|Mixed Platforms.Build.0 = Release|x86
42+
{6A8152C0-82EB-4704-865F-D682E4FC5438}.Release|Win32.ActiveCfg = Release|x86
43+
{6A8152C0-82EB-4704-865F-D682E4FC5438}.Release|Win32.Build.0 = Release|x86
3244
{6A8152C0-82EB-4704-865F-D682E4FC5438}.Release|x64.ActiveCfg = Release|x64
3345
{6A8152C0-82EB-4704-865F-D682E4FC5438}.Release|x64.Build.0 = Release|x64
3446
{6A8152C0-82EB-4704-865F-D682E4FC5438}.Release|x86.ActiveCfg = Release|x86
3547
{6A8152C0-82EB-4704-865F-D682E4FC5438}.Release|x86.Build.0 = Release|x86
3648
{EDB5E8A6-830C-4EA0-B309-C35019ABA183}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
3749
{EDB5E8A6-830C-4EA0-B309-C35019ABA183}.Debug|Any CPU.Build.0 = Debug|Any CPU
50+
{EDB5E8A6-830C-4EA0-B309-C35019ABA183}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
51+
{EDB5E8A6-830C-4EA0-B309-C35019ABA183}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
52+
{EDB5E8A6-830C-4EA0-B309-C35019ABA183}.Debug|Win32.ActiveCfg = Debug|Any CPU
3853
{EDB5E8A6-830C-4EA0-B309-C35019ABA183}.Debug|x64.ActiveCfg = Debug|Any CPU
3954
{EDB5E8A6-830C-4EA0-B309-C35019ABA183}.Debug|x86.ActiveCfg = Debug|Any CPU
4055
{EDB5E8A6-830C-4EA0-B309-C35019ABA183}.Release|Any CPU.ActiveCfg = Release|Any CPU
4156
{EDB5E8A6-830C-4EA0-B309-C35019ABA183}.Release|Any CPU.Build.0 = Release|Any CPU
57+
{EDB5E8A6-830C-4EA0-B309-C35019ABA183}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
58+
{EDB5E8A6-830C-4EA0-B309-C35019ABA183}.Release|Mixed Platforms.Build.0 = Release|Any CPU
59+
{EDB5E8A6-830C-4EA0-B309-C35019ABA183}.Release|Win32.ActiveCfg = Release|Any CPU
4260
{EDB5E8A6-830C-4EA0-B309-C35019ABA183}.Release|x64.ActiveCfg = Release|Any CPU
4361
{EDB5E8A6-830C-4EA0-B309-C35019ABA183}.Release|x86.ActiveCfg = Release|Any CPU
4462
{509FD9FF-7AF6-4554-8442-FE802A3B03CA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
4563
{509FD9FF-7AF6-4554-8442-FE802A3B03CA}.Debug|Any CPU.Build.0 = Debug|Any CPU
64+
{509FD9FF-7AF6-4554-8442-FE802A3B03CA}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
65+
{509FD9FF-7AF6-4554-8442-FE802A3B03CA}.Debug|Mixed Platforms.Build.0 = Debug|x86
66+
{509FD9FF-7AF6-4554-8442-FE802A3B03CA}.Debug|Win32.ActiveCfg = Debug|x86
67+
{509FD9FF-7AF6-4554-8442-FE802A3B03CA}.Debug|Win32.Build.0 = Debug|x86
4668
{509FD9FF-7AF6-4554-8442-FE802A3B03CA}.Debug|x64.ActiveCfg = Debug|x64
4769
{509FD9FF-7AF6-4554-8442-FE802A3B03CA}.Debug|x64.Build.0 = Debug|x64
4870
{509FD9FF-7AF6-4554-8442-FE802A3B03CA}.Debug|x86.ActiveCfg = Debug|x86
4971
{509FD9FF-7AF6-4554-8442-FE802A3B03CA}.Debug|x86.Build.0 = Debug|x86
5072
{509FD9FF-7AF6-4554-8442-FE802A3B03CA}.Release|Any CPU.ActiveCfg = Release|Any CPU
5173
{509FD9FF-7AF6-4554-8442-FE802A3B03CA}.Release|Any CPU.Build.0 = Release|Any CPU
74+
{509FD9FF-7AF6-4554-8442-FE802A3B03CA}.Release|Mixed Platforms.ActiveCfg = Release|x86
75+
{509FD9FF-7AF6-4554-8442-FE802A3B03CA}.Release|Mixed Platforms.Build.0 = Release|x86
76+
{509FD9FF-7AF6-4554-8442-FE802A3B03CA}.Release|Win32.ActiveCfg = Release|x86
77+
{509FD9FF-7AF6-4554-8442-FE802A3B03CA}.Release|Win32.Build.0 = Release|x86
5278
{509FD9FF-7AF6-4554-8442-FE802A3B03CA}.Release|x64.ActiveCfg = Release|x64
5379
{509FD9FF-7AF6-4554-8442-FE802A3B03CA}.Release|x64.Build.0 = Release|x64
5480
{509FD9FF-7AF6-4554-8442-FE802A3B03CA}.Release|x86.ActiveCfg = Release|x86
5581
{509FD9FF-7AF6-4554-8442-FE802A3B03CA}.Release|x86.Build.0 = Release|x86
5682
{732EBACF-9743-4C22-85F7-3284BA046C0C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
5783
{732EBACF-9743-4C22-85F7-3284BA046C0C}.Debug|Any CPU.Build.0 = Debug|Any CPU
84+
{732EBACF-9743-4C22-85F7-3284BA046C0C}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
85+
{732EBACF-9743-4C22-85F7-3284BA046C0C}.Debug|Mixed Platforms.Build.0 = Debug|x86
86+
{732EBACF-9743-4C22-85F7-3284BA046C0C}.Debug|Win32.ActiveCfg = Debug|x86
87+
{732EBACF-9743-4C22-85F7-3284BA046C0C}.Debug|Win32.Build.0 = Debug|x86
5888
{732EBACF-9743-4C22-85F7-3284BA046C0C}.Debug|x64.ActiveCfg = Debug|x64
5989
{732EBACF-9743-4C22-85F7-3284BA046C0C}.Debug|x64.Build.0 = Debug|x64
6090
{732EBACF-9743-4C22-85F7-3284BA046C0C}.Debug|x86.ActiveCfg = Debug|x86
6191
{732EBACF-9743-4C22-85F7-3284BA046C0C}.Debug|x86.Build.0 = Debug|x86
6292
{732EBACF-9743-4C22-85F7-3284BA046C0C}.Release|Any CPU.ActiveCfg = Release|Any CPU
6393
{732EBACF-9743-4C22-85F7-3284BA046C0C}.Release|Any CPU.Build.0 = Release|Any CPU
94+
{732EBACF-9743-4C22-85F7-3284BA046C0C}.Release|Mixed Platforms.ActiveCfg = Release|x86
95+
{732EBACF-9743-4C22-85F7-3284BA046C0C}.Release|Mixed Platforms.Build.0 = Release|x86
96+
{732EBACF-9743-4C22-85F7-3284BA046C0C}.Release|Win32.ActiveCfg = Release|x86
97+
{732EBACF-9743-4C22-85F7-3284BA046C0C}.Release|Win32.Build.0 = Release|x86
6498
{732EBACF-9743-4C22-85F7-3284BA046C0C}.Release|x64.ActiveCfg = Release|x64
6599
{732EBACF-9743-4C22-85F7-3284BA046C0C}.Release|x64.Build.0 = Release|x64
66100
{732EBACF-9743-4C22-85F7-3284BA046C0C}.Release|x86.ActiveCfg = Release|x86
67101
{732EBACF-9743-4C22-85F7-3284BA046C0C}.Release|x86.Build.0 = Release|x86
68-
{413DA6DF-0488-4FD1-8A37-384958A13053}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
69-
{413DA6DF-0488-4FD1-8A37-384958A13053}.Debug|x64.ActiveCfg = Debug|Any CPU
70-
{413DA6DF-0488-4FD1-8A37-384958A13053}.Debug|x86.ActiveCfg = Debug|Any CPU
71-
{413DA6DF-0488-4FD1-8A37-384958A13053}.Release|Any CPU.ActiveCfg = Release|Any CPU
72-
{413DA6DF-0488-4FD1-8A37-384958A13053}.Release|Any CPU.Build.0 = Release|Any CPU
73-
{413DA6DF-0488-4FD1-8A37-384958A13053}.Release|x64.ActiveCfg = Release|Any CPU
74-
{413DA6DF-0488-4FD1-8A37-384958A13053}.Release|x86.ActiveCfg = Release|Any CPU
102+
{92F74E5A-CF68-46DF-95BB-CFF0DDC2CAB7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
103+
{92F74E5A-CF68-46DF-95BB-CFF0DDC2CAB7}.Debug|Any CPU.Build.0 = Debug|Any CPU
104+
{92F74E5A-CF68-46DF-95BB-CFF0DDC2CAB7}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
105+
{92F74E5A-CF68-46DF-95BB-CFF0DDC2CAB7}.Debug|Win32.ActiveCfg = Debug|Any CPU
106+
{92F74E5A-CF68-46DF-95BB-CFF0DDC2CAB7}.Debug|x64.ActiveCfg = Debug|Any CPU
107+
{92F74E5A-CF68-46DF-95BB-CFF0DDC2CAB7}.Debug|x86.ActiveCfg = Debug|Any CPU
108+
{92F74E5A-CF68-46DF-95BB-CFF0DDC2CAB7}.Release|Any CPU.ActiveCfg = Release|Any CPU
109+
{92F74E5A-CF68-46DF-95BB-CFF0DDC2CAB7}.Release|Any CPU.Build.0 = Release|Any CPU
110+
{92F74E5A-CF68-46DF-95BB-CFF0DDC2CAB7}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
111+
{92F74E5A-CF68-46DF-95BB-CFF0DDC2CAB7}.Release|Mixed Platforms.Build.0 = Release|Any CPU
112+
{92F74E5A-CF68-46DF-95BB-CFF0DDC2CAB7}.Release|Win32.ActiveCfg = Release|Any CPU
113+
{92F74E5A-CF68-46DF-95BB-CFF0DDC2CAB7}.Release|x64.ActiveCfg = Release|Any CPU
114+
{92F74E5A-CF68-46DF-95BB-CFF0DDC2CAB7}.Release|x86.ActiveCfg = Release|Any CPU
75115
EndGlobalSection
76116
GlobalSection(SolutionProperties) = preSolution
77117
HideSolutionNode = FALSE

Installer/Installer.wxs

-67
This file was deleted.
File renamed without changes.

NSISInstaller/DotNetChecker.nsh

+106
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
!macro CheckNetFramework FrameworkVersion
2+
Var /GLOBAL dotNetUrl
3+
Var /GLOBAL dotNetReadableVersion
4+
5+
!define DOTNET45_URL "http://go.microsoft.com/fwlink/?LinkId=225702"
6+
!define DOTNET40Full_URL "http://www.microsoft.com/downloads/info.aspx?na=41&srcfamilyid=0a391abd-25c1-4fc0-919f-b21f31ab88b7&srcdisplaylang=en&u=http%3a%2f%2fdownload.microsoft.com%2fdownload%2f9%2f5%2fA%2f95A9616B-7A37-4AF6-BC36-D6EA96C8DAAE%2fdotNetFx40_Full_x86_x64.exe"
7+
!define DOTNET40Client_URL "http://www.microsoft.com/downloads/info.aspx?na=41&srcfamilyid=e5ad0459-cbcc-4b4f-97b6-fb17111cf544&srcdisplaylang=en&u=http%3a%2f%2fdownload.microsoft.com%2fdownload%2f5%2f6%2f2%2f562A10F9-C9F4-4313-A044-9C94E0A8FAC8%2fdotNetFx40_Client_x86_x64.exe"
8+
!define DOTNET35_URL "http://download.microsoft.com/download/2/0/e/20e90413-712f-438c-988e-fdaa79a8ac3d/dotnetfx35.exe"
9+
!define DOTNET30_URL "http://download.microsoft.com/download/2/0/e/20e90413-712f-438c-988e-fdaa79a8ac3d/dotnetfx35.exe"
10+
!define DOTNET20_URL "http://www.microsoft.com/downloads/info.aspx?na=41&srcfamilyid=0856eacb-4362-4b0d-8edd-aab15c5e04f5&srcdisplaylang=en&u=http%3a%2f%2fdownload.microsoft.com%2fdownload%2f5%2f6%2f7%2f567758a3-759e-473e-bf8f-52154438565a%2fdotnetfx.exe"
11+
!define DOTNET11_URL "http://www.microsoft.com/downloads/info.aspx?na=41&srcfamilyid=262d25e3-f589-4842-8157-034d1e7cf3a3&srcdisplaylang=en&u=http%3a%2f%2fdownload.microsoft.com%2fdownload%2fa%2fa%2fc%2faac39226-8825-44ce-90e3-bf8203e74006%2fdotnetfx.exe"
12+
!define DOTNET10_URL "http://www.microsoft.com/downloads/info.aspx?na=41&srcfamilyid=262d25e3-f589-4842-8157-034d1e7cf3a3&srcdisplaylang=en&u=http%3a%2f%2fdownload.microsoft.com%2fdownload%2fa%2fa%2fc%2faac39226-8825-44ce-90e3-bf8203e74006%2fdotnetfx.exe"
13+
14+
${If} ${FrameworkVersion} == "45"
15+
StrCpy $dotNetUrl ${DOTNET45_URL}
16+
StrCpy $dotNetReadableVersion "4.5"
17+
${ElseIf} ${FrameworkVersion} == "40Full"
18+
StrCpy $dotNetUrl ${DOTNET40Full_URL}
19+
StrCpy $dotNetReadableVersion "4.0 Full"
20+
${ElseIf} ${FrameworkVersion} == "40Client"
21+
StrCpy $dotNetUrl ${DOTNET40Client_URL}
22+
StrCpy $dotNetReadableVersion "4.0 Client"
23+
${ElseIf} ${FrameworkVersion} == "35"
24+
StrCpy $dotNetUrl ${DOTNET35_URL}
25+
StrCpy $dotNetReadableVersion "3.5"
26+
${ElseIf} ${FrameworkVersion} == "30"
27+
StrCpy $dotNetUrl ${DOTNET30_URL}
28+
StrCpy $dotNetReadableVersion "3.0"
29+
${ElseIf} ${FrameworkVersion} == "20"
30+
StrCpy $dotNetUrl ${DOTNET20_URL}
31+
StrCpy $dotNetReadableVersion "2.0"
32+
${ElseIf} ${FrameworkVersion} == "11"
33+
StrCpy $dotNetUrl ${DOTNET11_URL}
34+
StrCpy $dotNetReadableVersion "1.1"
35+
${ElseIf} ${FrameworkVersion} == "10"
36+
StrCpy $dotNetUrl ${DOTNET10_URL}
37+
StrCpy $dotNetReadableVersion "1.0"
38+
${EndIf}
39+
40+
DetailPrint "Checking .NET Framework version..."
41+
42+
Push $0
43+
Push $1
44+
Push $2
45+
Push $3
46+
Push $4
47+
Push $5
48+
Push $6
49+
Push $7
50+
51+
DotNetChecker::IsDotNet${FrameworkVersion}Installed
52+
Pop $0
53+
54+
${If} $0 == "false"
55+
DetailPrint ".NET Framework $dotNetReadableVersion not found, download is required for program to run."
56+
Goto NoDotNET
57+
${Else}
58+
DetailPrint ".NET Framework $dotNetReadableVersion found, no need to install."
59+
Goto NewDotNET
60+
${EndIf}
61+
62+
NoDotNET:
63+
MessageBox MB_YESNOCANCEL|MB_ICONEXCLAMATION \
64+
".NET Framework not installed. Required version: $dotNetReadableVersion.$\nDownload .NET Framework $dotNetReadableVersion from www.microsoft.com?" \
65+
/SD IDYES IDYES DownloadDotNET IDNO NewDotNET
66+
goto GiveUpDotNET ;IDCANCEL
67+
68+
DownloadDotNET:
69+
DetailPrint "Beginning download of .NET Framework $dotNetReadableVersion."
70+
NSISDL::download $dotNetUrl "$TEMP\dotnetfx.exe"
71+
DetailPrint "Completed download."
72+
73+
Pop $0
74+
${If} $0 == "cancel"
75+
MessageBox MB_YESNO|MB_ICONEXCLAMATION \
76+
"Download cancelled. Continue Installation?" \
77+
IDYES NewDotNET IDNO GiveUpDotNET
78+
${ElseIf} $0 != "success"
79+
MessageBox MB_YESNO|MB_ICONEXCLAMATION \
80+
"Download failed:$\n$0$\n$\nContinue Installation?" \
81+
IDYES NewDotNET IDNO GiveUpDotNET
82+
${EndIf}
83+
84+
DetailPrint "Pausing installation while downloaded .NET Framework installer runs."
85+
ExecWait '$TEMP\dotnetfx.exe /q /c:"install /q"'
86+
87+
DetailPrint "Completed .NET Framework install/update. Removing .NET Framework installer."
88+
Delete "$TEMP\dotnetfx.exe"
89+
DetailPrint ".NET Framework installer removed."
90+
goto NewDotNet
91+
92+
GiveUpDotNET:
93+
Abort "Installation cancelled by user."
94+
95+
NewDotNET:
96+
DetailPrint "Proceeding with remainder of installation."
97+
Pop $0
98+
Pop $1
99+
Pop $2
100+
Pop $3
101+
Pop $4
102+
Pop $5
103+
Pop $6
104+
Pop $7
105+
106+
!macroend

NSISInstaller/Installer.exe

758 KB
Binary file not shown.

0 commit comments

Comments
 (0)