kopia lustrzana https://github.com/evil-mad/EggBot
Update installscript.nsi
rodzic
d58e18af89
commit
588e57b00f
|
@ -3,7 +3,7 @@
|
|||
; An NSIS document for creating a windows installer.
|
||||
; Place this document in a directory with all of the
|
||||
; items that should be installed into the end user's
|
||||
; extensions directory, including the 'serial' folder.
|
||||
; extensions directory.
|
||||
;
|
||||
;--------------------------------
|
||||
|
||||
|
@ -18,10 +18,10 @@
|
|||
; --------------------------------
|
||||
|
||||
; The name of the installer
|
||||
Name "EggBot v2.5.0"
|
||||
Name "EggBot v2.8.1"
|
||||
|
||||
; The file to write
|
||||
OutFile "EggBot_250A.exe"
|
||||
OutFile "EggBot_281.exe"
|
||||
|
||||
; The default installation directory
|
||||
InstallDir $PROGRAMFILES64\Inkscape
|
||||
|
@ -29,31 +29,29 @@ InstallDir $PROGRAMFILES64\Inkscape
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
; Request application privileges for Windows Vista
|
||||
; Request application privileges for Windows
|
||||
RequestExecutionLevel admin
|
||||
|
||||
BrandingText "The Original EggBot, by Evil Mad Scientist Laboratories"
|
||||
BrandingText "EggBot, by Evil Mad Scientist"
|
||||
|
||||
; Directory dialog text header::
|
||||
DirText "The Eggbot software needs to be installed within \
|
||||
Inkscape 0.91 (or newer), in the extensions folder. \
|
||||
DirText "The EggBot software needs to be installed within Inkscape 0.92. \
|
||||
$\r$\r \
|
||||
If you have installed Inkscape normally (in 'Program files'), simply \
|
||||
click 'Install' below. \
|
||||
If your copy of Inkscape is elsewhere, please select the Inkscape directory below. \
|
||||
If you have not yet installed Inkscape, please download it from http://inkscape.org before \
|
||||
proceeding. "
|
||||
If you have not yet installed Inkscape, please download it from http://inkscape.org\
|
||||
and install before proceeding."
|
||||
|
||||
|
||||
ComponentText "Check the components you want to install and uncheck \
|
||||
the components that you don't want to install. Click Install to \
|
||||
begin. This installer requires Inkscape 0.91 (or newer)."
|
||||
begin. This installer requires Inkscape 0.92."
|
||||
|
||||
|
||||
CompletedText "Software installation completed successfully."
|
||||
|
||||
Var /GLOBAL InkscapeDir
|
||||
|
||||
|
||||
!define MUI_ICON "icon\eggbotlogo_2014_256px.ico"
|
||||
|
@ -88,23 +86,22 @@ begin. This installer requires Inkscape 0.91 (or newer)."
|
|||
|
||||
Section "Inkscape Extensions" SecMain
|
||||
|
||||
Var /GLOBAL InkscapeDir
|
||||
|
||||
${If} ${FileExists} `$PROGRAMFILES64\Inkscape\AUTHORS`
|
||||
${If} ${FileExists} `$PROGRAMFILES64\Inkscape\lib\python2.7\site-packages\serial\__init__.py`
|
||||
|
||||
; Inkscape found in 64-bit program files directory
|
||||
;InstallDir $PROGRAMFILES64\Inkscape
|
||||
StrCpy $InkscapeDir "$PROGRAMFILES64\Inkscape"
|
||||
|
||||
${ElseIf} ${FileExists} `$PROGRAMFILES\Inkscape\AUTHORS`
|
||||
${ElseIf} ${FileExists} `$PROGRAMFILES\Inkscape\lib\python2.7\site-packages\serial\__init__.py`
|
||||
|
||||
; file is a file
|
||||
; Inkscape found in legacy program files directory
|
||||
; InstallDir $PROGRAMFILES\Inkscape
|
||||
StrCpy $InkscapeDir "$PROGRAMFILES\Inkscape"
|
||||
${Else}
|
||||
|
||||
; file is neither a file or a directory (i.e. it doesn't exist)
|
||||
Abort "Inkscape not found. Please install Inkscape 0.91 (or newer) and try again."
|
||||
Abort "Inkscape not found in Program Files. Please install Inkscape 0.92 and try again."
|
||||
|
||||
${EndIf}
|
||||
|
||||
|
@ -113,16 +110,48 @@ ${EndIf}
|
|||
SetOutPath "$InkscapeDir\share\extensions"
|
||||
|
||||
; Put file there
|
||||
File /r extensions\serial*
|
||||
File /r extensions\svg_fonts*
|
||||
File extensions\*
|
||||
|
||||
SetOutPath "$InkscapeDir\share\templates"
|
||||
File templates\*
|
||||
|
||||
|
||||
; If upgrading a prior installation, which would have included
|
||||
; the serial directory in the extensions directory, we must
|
||||
; remove or otherwise disable that serial library. Rather than
|
||||
; deleting the file, we will rename __init__.py, so that the
|
||||
; library is disabled. Since we are not deleting a directory,
|
||||
; there is no risk of deleting the wrong directory.
|
||||
|
||||
Var /GLOBAL serialpath
|
||||
StrCpy $serialpath "$InkscapeDir\share\extensions\serial"
|
||||
|
||||
${If} ${FileExists} `$serialpath\__init__.py`
|
||||
Rename $serialpath\__init__.py $serialpath\disabled__init__.py
|
||||
${EndIf}
|
||||
|
||||
SectionEnd ; end the section
|
||||
|
||||
|
||||
Section "USB Driver" SecDriver
|
||||
|
||||
|
||||
${If} ${FileExists} `$PROGRAMFILES64\Inkscape\lib\python2.7\site-packages\serial\__init__.py`
|
||||
|
||||
; Inkscape found in 64-bit program files directory
|
||||
;InstallDir $PROGRAMFILES64\Inkscape
|
||||
StrCpy $InkscapeDir "$PROGRAMFILES64\Inkscape"
|
||||
|
||||
${ElseIf} ${FileExists} `$PROGRAMFILES\Inkscape\lib\python2.7\site-packages\serial\__init__.py`
|
||||
|
||||
; Inkscape found in legacy program files directory
|
||||
; InstallDir $PROGRAMFILES\Inkscape
|
||||
StrCpy $InkscapeDir "$PROGRAMFILES\Inkscape"
|
||||
${Else}
|
||||
|
||||
; file is neither a file or a directory (i.e. it doesn't exist)
|
||||
Abort "Inkscape not found in Program Files. Please install Inkscape 0.92 and try again."
|
||||
|
||||
${EndIf}
|
||||
|
||||
|
||||
SetOutPath "$InkscapeDir\Driver"
|
||||
|
||||
File "EBB_inf\mchpcdc.cat"
|
||||
|
@ -135,31 +164,16 @@ Section "USB Driver" SecDriver
|
|||
ExecWait '"$InkscapeDir\Driver\USBDriverInstaller.exe" -auto'
|
||||
SectionEnd
|
||||
|
||||
Section "EggBot Examples" SecExamples
|
||||
|
||||
; Set output path to the installation directory.
|
||||
SetOutPath "$InkscapeDir"
|
||||
|
||||
; Put directory there
|
||||
File /r "EggBot Examples"
|
||||
|
||||
; Desktop Shortcut!
|
||||
createShortCut "$DESKTOP\EggBot Examples.lnk" "$InkscapeDir\EggBot Examples"
|
||||
|
||||
SectionEnd ; end the section
|
||||
|
||||
|
||||
; --------------------------------
|
||||
; Descriptions
|
||||
|
||||
; Language strings
|
||||
LangString DESC_SecMain ${LANG_ENGLISH} "Installs the EggBot control software within Inkscape."
|
||||
LangString DESC_SecMain ${LANG_ENGLISH} "Installs the EggBot software within Inkscape."
|
||||
LangString DESC_SecDriver ${LANG_ENGLISH} "The USB driver for the EggBot."
|
||||
LangString DESC_SecExamples ${LANG_ENGLISH} "Over 100 example files for EggBot, with a desktop shortcut."
|
||||
|
||||
; Assign language strings to sections
|
||||
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${SecMain} $(DESC_SecMain)
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${SecDriver} $(DESC_SecDriver)
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${SecExamples} $(DESC_SecExamples)
|
||||
!insertmacro MUI_FUNCTION_DESCRIPTION_END
|
||||
|
|
Ładowanie…
Reference in New Issue