1818; --------------------------------
1919
2020; The name of the installer
21- Name " EggBot v2.4 .0"
21+ Name " EggBot v2.5 .0"
2222
2323; The file to write
24- OutFile " EggBot_240A .exe"
24+ OutFile " EggBot_250A .exe"
2525
2626; The default installation directory
27- InstallDir $PROGRAMFILES \Inkscape
27+ InstallDir $PROGRAMFILES64 \Inkscape
28+ ; InstallDir $PROGRAMFILES\Inkscape
29+
30+
31+
32+
33+
34+
35+
36+
2837
2938; Request application privileges for Windows Vista
3039RequestExecutionLevel admin
@@ -33,14 +42,18 @@ BrandingText "The Original EggBot, by Evil Mad Scientist Laboratories"
3342
3443; Directory dialog text header::
3544DirText " The Eggbot software needs to be installed within \
36- Inkscape, in the extensions folder. \
45+ Inkscape 0.91 (or newer) , in the extensions folder. \
3746$\r$\r \
3847If you have installed Inkscape normally (in 'Program files'), simply \
3948click 'Install' below. \
4049If your copy of Inkscape is elsewhere, please select the Inkscape directory below. \
41- $\r$\r \
4250If you have not yet installed Inkscape, please download it from http://inkscape.org before \
43- proceeding."
51+ proceeding. "
52+
53+
54+ ComponentText " Check the components you want to install and uncheck \
55+ the components that you don't want to install. Click Install to \
56+ begin. This installer requires Inkscape 0.91 (or newer)."
4457
4558
4659!define MUI_ICON " icon\eggbotlogo_2014_256px.ico"
@@ -56,7 +69,7 @@ proceeding."
5669; Page instfiles
5770
5871!insertmacro MUI_PAGE_COMPONENTS
59- !insertmacro MUI_PAGE_DIRECTORY
72+ ; !insertmacro MUI_PAGE_DIRECTORY
6073!insertmacro MUI_PAGE_INSTFILES
6174
6275; !insertmacro MUI_UNPAGE_CONFIRM
@@ -75,21 +88,42 @@ proceeding."
7588
7689Section " Inkscape Extensions" SecMain
7790
91+ Var /GLOBAL InkscapeDir
92+
93+ ${If} ${FileExists} ` $PROGRAMFILES64\Inkscape\AUTHORS`
94+
95+ ; Inkscape found in 64-bit program files directory
96+ ; InstallDir $PROGRAMFILES64\Inkscape
97+ StrCpy $InkscapeDir " $PROGRAMFILES64\Inkscape"
98+
99+ ${ElseIf} ${FileExists} ` $PROGRAMFILES\Inkscape\AUTHORS`
100+
101+ ; file is a file
102+ ; InstallDir $PROGRAMFILES\Inkscape
103+ StrCpy $InkscapeDir " $PROGRAMFILES\Inkscape"
104+ ${Else}
105+
106+ ; file is neither a file or a directory (i.e. it doesn't exist)
107+ Abort " Inkscape not found. Please install Inkscape 0.91 (or newer) and try again."
108+
109+ ${EndIf}
110+
111+
78112 ; Set output path to the installation directory.
79- SetOutPath " $INSTDIR \share\extensions"
113+ SetOutPath " $InkscapeDir \share\extensions"
80114
81115 ; Put file there
82116 File /r extensions\serial*
83117 File extensions\*
84118
85- SetOutPath " $INSTDIR \share\templates"
119+ SetOutPath " $InkscapeDir \share\templates"
86120 File templates\*
87121
88122SectionEnd ; end the section
89123
90124
91125Section " USB Driver" SecDriver
92- SetOutPath " $INSTDIR \Driver"
126+ SetOutPath " $InkscapeDir \Driver"
93127
94128 File " EBB_inf\mchpcdc.cat"
95129 File " EBB_inf\mchpcdc.inf"
@@ -98,19 +132,19 @@ Section "USB Driver" SecDriver
98132 File " EBB_inf\ReadMe.txt"
99133 File " EBB_inf\USBDriverInstaller.exe"
100134
101- ExecWait ' "$INSTDIR \Driver\USBDriverInstaller.exe" -auto'
135+ ExecWait ' "$InkscapeDir \Driver\USBDriverInstaller.exe" -auto'
102136SectionEnd
103137
104138Section " EggBot Examples" SecExamples
105139
106140 ; Set output path to the installation directory.
107- SetOutPath " $INSTDIR "
141+ SetOutPath " $InkscapeDir "
108142
109143 ; Put directory there
110144 File /r " EggBot Examples"
111145
112146 ; Desktop Shortcut!
113- createShortCut " $DESKTOP\EggBot Examples.lnk" " $INSTDIR \EggBot Examples"
147+ createShortCut " $DESKTOP\EggBot Examples.lnk" " $InkscapeDir \EggBot Examples"
114148
115149SectionEnd ; end the section
116150
0 commit comments