Anonymous avatar Anonymous committed 6fbc2a5

Mark 64-bit NSIS as such.

Comments (0)

Files changed (4)

Examples/makensis.nsi

 
 ;Names
 Name "NSIS"
+!ifdef NSIS_X64_MAKENSIS
+Caption "NSIS ${VERSION} (64-bit) Setup"
+!else
 Caption "NSIS ${VERSION} Setup"
+!endif
 
 ;Memento Settings
 !define MEMENTO_REGISTRY_ROOT HKLM
 !define MUI_COMPONENTSPAGE_SMALLDESC
 
 ;Pages
+!ifdef NSIS_X64_MAKENSIS
+!define MUI_WELCOMEPAGE_TITLE "Welcome to the NSIS ${VERSION} (64-bit) Setup Wizard"
+!else
 !define MUI_WELCOMEPAGE_TITLE "Welcome to the NSIS ${VERSION} Setup Wizard"
+!endif
 !define MUI_WELCOMEPAGE_TEXT "This wizard will guide you through the installation of NSIS (Nullsoft Scriptable Install System) ${VERSION}, the next generation of the Windows installer and uninstaller system that doesn't suck and isn't huge.$\r$\n$\r$\nNSIS 2 includes a new Modern User Interface, LZMA compression, support for multiple languages and an easy plug-in system.$\r$\n$\r$\n$_CLICK"
 
 !insertmacro MUI_PAGE_WELCOME
     WriteRegStr HKCR "NSIS.Script\shell" "" "open"
     WriteRegStr HKCR "NSIS.Script\shell\open\command" "" 'notepad.exe "%1"'
   no_nsiopen:
+!ifdef NSIS_X64_MAKENSIS
+  WriteRegStr HKCR "NSIS.Script\shell\compile64" "" "Compile NSIS Script (64-bit)"
+  WriteRegStr HKCR "NSIS.Script\shell\compile64\command" "" '"$INSTDIR\makensisw.exe" "%1"'
+  WriteRegStr HKCR "NSIS.Script\shell\compile-compressor64" "" "Compile NSIS Script (Choose Compressor) (64-bit)"
+  WriteRegStr HKCR "NSIS.Script\shell\compile-compressor64\command" "" '"$INSTDIR\makensisw.exe" /ChooseCompressor "%1"'
+!else
   WriteRegStr HKCR "NSIS.Script\shell\compile" "" "Compile NSIS Script"
   WriteRegStr HKCR "NSIS.Script\shell\compile\command" "" '"$INSTDIR\makensisw.exe" "%1"'
   WriteRegStr HKCR "NSIS.Script\shell\compile-compressor" "" "Compile NSIS Script (Choose Compressor)"
   WriteRegStr HKCR "NSIS.Script\shell\compile-compressor\command" "" '"$INSTDIR\makensisw.exe" /ChooseCompressor "%1"'
+!endif
 
   ReadRegStr $R0 HKCR ".nsh" ""
   StrCmp $R0 "NSHFile" 0 +2
   SectionIn 1 2
   SetOutPath $INSTDIR
 !ifndef NO_STARTMENUSHORTCUTS
+!ifdef NSIS_X64_MAKENSIS
+  CreateShortCut "$SMPROGRAMS\NSIS (64-bit).lnk" "$INSTDIR\NSIS.exe"
+!else
   CreateShortCut "$SMPROGRAMS\NSIS.lnk" "$INSTDIR\NSIS.exe"
 !endif
+!endif
 
+!ifdef NSIS_X64_MAKENSIS
+  CreateShortCut "$DESKTOP\NSIS (64-bit).lnk" "$INSTDIR\NSIS.exe"
+!else
   CreateShortCut "$DESKTOP\NSIS.lnk" "$INSTDIR\NSIS.exe"
+!endif
 
 ${MementoSectionEnd}
 
 
   WriteRegExpandStr HKLM "${MEMENTO_REGISTRY_KEY}" "UninstallString" '"$INSTDIR\uninst-nsis.exe"'
   WriteRegExpandStr HKLM "${MEMENTO_REGISTRY_KEY}" "InstallLocation" "$INSTDIR"
+!ifdef NSIS_X64_MAKENSIS
+  WriteRegStr HKLM "${MEMENTO_REGISTRY_KEY}" "DisplayName" "Nullsoft Install System (64-bit)"
+!else
   WriteRegStr HKLM "${MEMENTO_REGISTRY_KEY}" "DisplayName" "Nullsoft Install System"
+!endif
   WriteRegStr HKLM "${MEMENTO_REGISTRY_KEY}" "DisplayIcon" "$INSTDIR\NSIS.exe,0"
   WriteRegStr HKLM "${MEMENTO_REGISTRY_KEY}" "DisplayVersion" "${VERSION}"
 !ifdef VER_MAJOR & VER_MINOR & VER_REVISION & VER_BUILD
 #ifdef _UNICODE
   definedlist.add(_T("NSIS_UNICODE_MAKENSIS")); // This define might go away once makensis.exe is always unicode
 #endif
+#ifdef _WIN64
+  definedlist.add(_T("NSIS_X64_MAKENSIS"));
+#endif
 
   db_opt_save=db_comp_save=db_full_size=db_opt_save_u=db_comp_save_u=db_full_size_u=0;
 

Source/makenssi.cpp

 {
   _ftprintf(g_output,_T("MakeNSIS %s - Copyright 1995-2009 Contributors\n")
          _T("See the file COPYING for license details.\n")
-         _T("Credits can be found in the Users Manual.\n\n"), NSIS_VERSION);
+         _T("Credits can be found in the Users Manual.\n\n"),
+#ifdef _WIN64
+         NSIS_VERSION " (64-bit)");
+#else
+         NSIS_VERSION);
+#endif
   fflush(g_output);
 }
 
 
   if (argc > 1 && IS_OPT(argv[tmpargpos]) && !_tcsicmp(&argv[tmpargpos][1],_T("VERSION")))
   {
-    _ftprintf(g_output,NSIS_VERSION);
+#ifdef _WIN64
+    _ftprintf(g_output, NSIS_VERSION " (64-bit)");
+#else
+    _ftprintf(g_output, NSIS_VERSION);
+#endif
     fflush(g_output);
     return 0;
   }
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.