X-Git-Url: https://sigrok.org/gitweb/?p=sigrok-cli.git;a=blobdiff_plain;f=contrib%2Fsigrok-cli.nsi.in;h=55868a2c6298791932a79cb794bad6415ef16cf9;hp=083db4a3ab4e897421a9d4fcae8953688e49fa9f;hb=f84f2fe0f99a5dfe3043589252d1069c7cdf5e5d;hpb=2c45d10255617167e34674cd9e7536b8f0b3dc5b diff --git a/contrib/sigrok-cli.nsi.in b/contrib/sigrok-cli.nsi.in index 083db4a..55868a2 100644 --- a/contrib/sigrok-cli.nsi.in +++ b/contrib/sigrok-cli.nsi.in @@ -41,8 +41,9 @@ OutFile "@PACKAGE_NAME@-installer-@PACKAGE_VERSION@.exe" # Where to install the application. InstallDir "$PROGRAMFILES\sigrok\@PACKAGE_NAME@" -# Request application privileges for Windows Vista. -RequestExecutionLevel user +# Request admin privileges for Windows Vista and Windows 7. +# http://nsis.sourceforge.net/Docs/Chapter4.html +RequestExecutionLevel admin # --- MUI interface configuration --------------------------------------------- @@ -131,6 +132,10 @@ Section "@PACKAGE_NAME@ (required)" Section1 File "c:\MinGW\bin\libiconv-2.dll" File "c:\MinGW\bin\libstdc++-6.dll" + # MSYS libs. + File "c:\MinGW\msys\1.0\bin\msys-1.0.dll" + File "c:\MinGW\msys\1.0\bin\msys-z.dll" + # External libs File "c:\MinGW\msys\1.0\local\bin\libglib-2.0-0.dll" File "c:\MinGW\msys\1.0\local\bin\libgthread-2.0-0.dll" @@ -154,13 +159,23 @@ Section "@PACKAGE_NAME@ (required)" Section1 CreateDirectory "$SMPROGRAMS\sigrok" CreateDirectory "$SMPROGRAMS\sigrok\@PACKAGE_NAME@" - # TODO: Create a shortcut for sigrok-cli (DOS box? README only?). + # Create a shortcut for sigrok-cli (this merely opens a "DOS box"). + # Set the working directory (where the user will be placed into when + # the DOS box starts) to the user's Desktop directory. + SetOutPath "$DESKTOP" + CreateShortCut "$SMPROGRAMS\sigrok\@PACKAGE_NAME@\sigrok command-line tool.lnk" \ + "$SYSDIR\cmd.exe" \ + "/K echo For instructions run sigrok-cli --help." \ + "$SYSDIR\cmd.exe" 0 \ + SW_SHOWNORMAL "" "Run @PACKAGE_NAME@" # Create a shortcut for the uninstaller. CreateShortCut "$SMPROGRAMS\sigrok\@PACKAGE_NAME@\Uninstall.lnk" \ "$INSTDIR\Uninstall.exe" "" "$INSTDIR\Uninstall.exe" 0 \ SW_SHOWNORMAL "" "Uninstall @PACKAGE_NAME@" + # TODO: Add sigrok-cli directory to the PATH env. variable. + SectionEnd @@ -198,6 +213,8 @@ Section "Uninstall" Delete "$INSTDIR\intl.dll" Delete "$INSTDIR\libiconv-2.dll" Delete "$INSTDIR\libstdc++-6.dll" + Delete "$INSTDIR\msys-1.0.dll" + Delete "$INSTDIR\msys-z.dll" Delete "$INSTDIR\libglib-2.0-0.dll" Delete "$INSTDIR\libgthread-2.0-0.dll" Delete "$INSTDIR\libusb-1.0.dll" @@ -215,6 +232,7 @@ Section "Uninstall" RMDir "$INSTDIR" # Delete the links from the start menu. + Delete "$SMPROGRAMS\sigrok\@PACKAGE_NAME@\sigrok command-line tool.lnk" Delete "$SMPROGRAMS\sigrok\@PACKAGE_NAME@\Uninstall.lnk" # Delete the sub-directory in the start menu.