diff --git a/PowerEditor/installer/nppSetup.nsi b/PowerEditor/installer/nppSetup.nsi index f2a76265e..831b51eb4 100644 --- a/PowerEditor/installer/nppSetup.nsi +++ b/PowerEditor/installer/nppSetup.nsi @@ -43,7 +43,7 @@ SetCompressor /SOLID lzma ; This reduces installer size by approx 30~35% !ifdef ARCH64 OutFile ".\build\npp.${APPVERSION}.Installer.x64.exe" !else -OutFile ".\build\npp.${APPVERSION}.Installer.x32.exe" +OutFile ".\build\npp.${APPVERSION}.Installer.exe" !endif ; Insert CheckIfRunning function as an installer and uninstaller function. diff --git a/PowerEditor/installer/nsisInclude/autoCompletion.nsh b/PowerEditor/installer/nsisInclude/autoCompletion.nsh index c4df9908c..cf901f333 100644 --- a/PowerEditor/installer/nsisInclude/autoCompletion.nsh +++ b/PowerEditor/installer/nsisInclude/autoCompletion.nsh @@ -1,3 +1,31 @@ +; this file is part of installer for Notepad++ +; Copyright (C)2016 Don HO +; +; This program is free software; you can redistribute it and/or +; modify it under the terms of the GNU General Public License +; as published by the Free Software Foundation; either +; version 2 of the License, or (at your option) any later version. +; +; Note that the GPL places important restrictions on "derived works", yet +; it does not provide a detailed definition of that term. To avoid +; misunderstandings, we consider an application to constitute a +; "derivative work" for the purpose of this license if it does any of the +; following: +; 1. Integrates source code from Notepad++. +; 2. Integrates/includes/aggregates Notepad++ into a proprietary executable +; installer, such as those produced by InstallShield. +; 3. Links to a library or executes a program that does any of the above. +; +; This program is distributed in the hope that it will be useful, +; but WITHOUT ANY WARRANTY; without even the implied warranty of +; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +; GNU General Public License for more details. +; +; You should have received a copy of the GNU General Public License +; along with this program; if not, write to the Free Software +; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + SectionGroup "Auto-completion Files" autoCompletionComponent SetOverwrite off diff --git a/PowerEditor/installer/nsisInclude/binariesComponents.nsh b/PowerEditor/installer/nsisInclude/binariesComponents.nsh index c48e9f4a7..1fe027000 100644 --- a/PowerEditor/installer/nsisInclude/binariesComponents.nsh +++ b/PowerEditor/installer/nsisInclude/binariesComponents.nsh @@ -1,3 +1,31 @@ +; this file is part of installer for Notepad++ +; Copyright (C)2016 Don HO +; +; This program is free software; you can redistribute it and/or +; modify it under the terms of the GNU General Public License +; as published by the Free Software Foundation; either +; version 2 of the License, or (at your option) any later version. +; +; Note that the GPL places important restrictions on "derived works", yet +; it does not provide a detailed definition of that term. To avoid +; misunderstandings, we consider an application to constitute a +; "derivative work" for the purpose of this license if it does any of the +; following: +; 1. Integrates source code from Notepad++. +; 2. Integrates/includes/aggregates Notepad++ into a proprietary executable +; installer, such as those produced by InstallShield. +; 3. Links to a library or executes a program that does any of the above. +; +; This program is distributed in the hope that it will be useful, +; but WITHOUT ANY WARRANTY; without even the implied warranty of +; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +; GNU General Public License for more details. +; +; You should have received a copy of the GNU General Public License +; along with this program; if not, write to the Free Software +; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + ${MementoSection} "Context Menu Entry" explorerContextMenu SetOverwrite try SetOutPath "$INSTDIR\" diff --git a/PowerEditor/installer/nsisInclude/gobalDef.nsh b/PowerEditor/installer/nsisInclude/gobalDef.nsh index 64fe3b85e..6510946c7 100644 --- a/PowerEditor/installer/nsisInclude/gobalDef.nsh +++ b/PowerEditor/installer/nsisInclude/gobalDef.nsh @@ -1,3 +1,30 @@ +; this file is part of installer for Notepad++ +; Copyright (C)2016 Don HO +; +; This program is free software; you can redistribute it and/or +; modify it under the terms of the GNU General Public License +; as published by the Free Software Foundation; either +; version 2 of the License, or (at your option) any later version. +; +; Note that the GPL places important restrictions on "derived works", yet +; it does not provide a detailed definition of that term. To avoid +; misunderstandings, we consider an application to constitute a +; "derivative work" for the purpose of this license if it does any of the +; following: +; 1. Integrates source code from Notepad++. +; 2. Integrates/includes/aggregates Notepad++ into a proprietary executable +; installer, such as those produced by InstallShield. +; 3. Links to a library or executes a program that does any of the above. +; +; This program is distributed in the hope that it will be useful, +; but WITHOUT ANY WARRANTY; without even the implied warranty of +; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +; GNU General Public License for more details. +; +; You should have received a copy of the GNU General Public License +; along with this program; if not, write to the Free Software +; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + ; Define the application name !define APPNAME "Notepad++" diff --git a/PowerEditor/installer/nsisInclude/langs.nsh b/PowerEditor/installer/nsisInclude/langs.nsh index 95a12b74f..f9698c9f6 100644 --- a/PowerEditor/installer/nsisInclude/langs.nsh +++ b/PowerEditor/installer/nsisInclude/langs.nsh @@ -1,3 +1,31 @@ +; this file is part of installer for Notepad++ +; Copyright (C)2016 Don HO +; +; This program is free software; you can redistribute it and/or +; modify it under the terms of the GNU General Public License +; as published by the Free Software Foundation; either +; version 2 of the License, or (at your option) any later version. +; +; Note that the GPL places important restrictions on "derived works", yet +; it does not provide a detailed definition of that term. To avoid +; misunderstandings, we consider an application to constitute a +; "derivative work" for the purpose of this license if it does any of the +; following: +; 1. Integrates source code from Notepad++. +; 2. Integrates/includes/aggregates Notepad++ into a proprietary executable +; installer, such as those produced by InstallShield. +; 3. Links to a library or executes a program that does any of the above. +; +; This program is distributed in the hope that it will be useful, +; but WITHOUT ANY WARRANTY; without even the implied warranty of +; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +; GNU General Public License for more details. +; +; You should have received a copy of the GNU General Public License +; along with this program; if not, write to the Free Software +; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + ; Set languages (first is default language) ;!insertmacro MUI_LANGUAGE "English" !define MUI_LANGDLL_ALLLANGUAGES diff --git a/PowerEditor/installer/nsisInclude/mainSectionFuncs.nsh b/PowerEditor/installer/nsisInclude/mainSectionFuncs.nsh index dcda72b81..7797b60c0 100644 --- a/PowerEditor/installer/nsisInclude/mainSectionFuncs.nsh +++ b/PowerEditor/installer/nsisInclude/mainSectionFuncs.nsh @@ -1,3 +1,30 @@ +; this file is part of installer for Notepad++ +; Copyright (C)2016 Don HO +; +; This program is free software; you can redistribute it and/or +; modify it under the terms of the GNU General Public License +; as published by the Free Software Foundation; either +; version 2 of the License, or (at your option) any later version. +; +; Note that the GPL places important restrictions on "derived works", yet +; it does not provide a detailed definition of that term. To avoid +; misunderstandings, we consider an application to constitute a +; "derivative work" for the purpose of this license if it does any of the +; following: +; 1. Integrates source code from Notepad++. +; 2. Integrates/includes/aggregates Notepad++ into a proprietary executable +; installer, such as those produced by InstallShield. +; 3. Links to a library or executes a program that does any of the above. +; +; This program is distributed in the hope that it will be useful, +; but WITHOUT ANY WARRANTY; without even the implied warranty of +; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +; GNU General Public License for more details. +; +; You should have received a copy of the GNU General Public License +; along with this program; if not, write to the Free Software +; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + Function setPathAndOptions ; Set Section properties SetOverwrite on diff --git a/PowerEditor/installer/nsisInclude/themes.nsh b/PowerEditor/installer/nsisInclude/themes.nsh index 51d88f72c..4f6be1c92 100644 --- a/PowerEditor/installer/nsisInclude/themes.nsh +++ b/PowerEditor/installer/nsisInclude/themes.nsh @@ -1,3 +1,30 @@ +; this file is part of installer for Notepad++ +; Copyright (C)2016 Don HO +; +; This program is free software; you can redistribute it and/or +; modify it under the terms of the GNU General Public License +; as published by the Free Software Foundation; either +; version 2 of the License, or (at your option) any later version. +; +; Note that the GPL places important restrictions on "derived works", yet +; it does not provide a detailed definition of that term. To avoid +; misunderstandings, we consider an application to constitute a +; "derivative work" for the purpose of this license if it does any of the +; following: +; 1. Integrates source code from Notepad++. +; 2. Integrates/includes/aggregates Notepad++ into a proprietary executable +; installer, such as those produced by InstallShield. +; 3. Links to a library or executes a program that does any of the above. +; +; This program is distributed in the hope that it will be useful, +; but WITHOUT ANY WARRANTY; without even the implied warranty of +; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +; GNU General Public License for more details. +; +; You should have received a copy of the GNU General Public License +; along with this program; if not, write to the Free Software +; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + SectionGroup "Themes" Themes SetOverwrite off ${MementoSection} "Black Board" BlackBoard diff --git a/PowerEditor/installer/nsisInclude/tools.nsh b/PowerEditor/installer/nsisInclude/tools.nsh index 5678e88ae..1b4adf316 100644 --- a/PowerEditor/installer/nsisInclude/tools.nsh +++ b/PowerEditor/installer/nsisInclude/tools.nsh @@ -1,5 +1,29 @@ - - +; this file is part of installer for Notepad++ +; Copyright (C)2016 Don HO +; +; This program is free software; you can redistribute it and/or +; modify it under the terms of the GNU General Public License +; as published by the Free Software Foundation; either +; version 2 of the License, or (at your option) any later version. +; +; Note that the GPL places important restrictions on "derived works", yet +; it does not provide a detailed definition of that term. To avoid +; misunderstandings, we consider an application to constitute a +; "derivative work" for the purpose of this license if it does any of the +; following: +; 1. Integrates source code from Notepad++. +; 2. Integrates/includes/aggregates Notepad++ into a proprietary executable +; installer, such as those produced by InstallShield. +; 3. Links to a library or executes a program that does any of the above. +; +; This program is distributed in the hope that it will be useful, +; but WITHOUT ANY WARRANTY; without even the implied warranty of +; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +; GNU General Public License for more details. +; +; You should have received a copy of the GNU General Public License +; along with this program; if not, write to the Free Software +; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Function LaunchNpp Exec '"$INSTDIR\notepad++.exe" "$INSTDIR\change.log" ' @@ -85,11 +109,6 @@ FunctionEnd Var noUserDataChecked Var allowPluginLoadFromUserDataChecked Var createShortcutChecked -Var isOldIconChecked - - -; TODO for optional arg -;Var params ; The definition of "OnChange" event for checkbox Function OnChange_NoUserDataCheckBox diff --git a/PowerEditor/installer/nsisInclude/uninstall.nsh b/PowerEditor/installer/nsisInclude/uninstall.nsh index 06158015d..8749f0c83 100644 --- a/PowerEditor/installer/nsisInclude/uninstall.nsh +++ b/PowerEditor/installer/nsisInclude/uninstall.nsh @@ -1,3 +1,29 @@ +; this file is part of installer for Notepad++ +; Copyright (C)2016 Don HO +; +; This program is free software; you can redistribute it and/or +; modify it under the terms of the GNU General Public License +; as published by the Free Software Foundation; either +; version 2 of the License, or (at your option) any later version. +; +; Note that the GPL places important restrictions on "derived works", yet +; it does not provide a detailed definition of that term. To avoid +; misunderstandings, we consider an application to constitute a +; "derivative work" for the purpose of this license if it does any of the +; following: +; 1. Integrates source code from Notepad++. +; 2. Integrates/includes/aggregates Notepad++ into a proprietary executable +; installer, such as those produced by InstallShield. +; 3. Links to a library or executes a program that does any of the above. +; +; This program is distributed in the hope that it will be useful, +; but WITHOUT ANY WARRANTY; without even the implied warranty of +; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +; GNU General Public License for more details. +; +; You should have received a copy of the GNU General Public License +; along with this program; if not, write to the Free Software +; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Section un.explorerContextMenu Exec 'regsvr32 /u /s "$INSTDIR\NppShell_01.dll"' diff --git a/PowerEditor/installer/nsisInclude/winVer.nsh b/PowerEditor/installer/nsisInclude/winVer.nsh index 87b99ed51..4075b39f0 100644 --- a/PowerEditor/installer/nsisInclude/winVer.nsh +++ b/PowerEditor/installer/nsisInclude/winVer.nsh @@ -1,3 +1,30 @@ +; this file is part of installer for Notepad++ +; Copyright (C)2016 Don HO +; +; This program is free software; you can redistribute it and/or +; modify it under the terms of the GNU General Public License +; as published by the Free Software Foundation; either +; version 2 of the License, or (at your option) any later version. +; +; Note that the GPL places important restrictions on "derived works", yet +; it does not provide a detailed definition of that term. To avoid +; misunderstandings, we consider an application to constitute a +; "derivative work" for the purpose of this license if it does any of the +; following: +; 1. Integrates source code from Notepad++. +; 2. Integrates/includes/aggregates Notepad++ into a proprietary executable +; installer, such as those produced by InstallShield. +; 3. Links to a library or executes a program that does any of the above. +; +; This program is distributed in the hope that it will be useful, +; but WITHOUT ANY WARRANTY; without even the implied warranty of +; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +; GNU General Public License for more details. +; +; You should have received a copy of the GNU General Public License +; along with this program; if not, write to the Free Software +; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + ; http://nsis.sourceforge.net/Get_Windows_version diff --git a/PowerEditor/installer/packageAll.bat b/PowerEditor/installer/packageAll.bat index 84a4dba22..f2bff18fe 100644 --- a/PowerEditor/installer/packageAll.bat +++ b/PowerEditor/installer/packageAll.bat @@ -20,25 +20,31 @@ echo on if %SIGN% == 0 goto NoSign signtool.exe sign /f %NPP_CERT% /p %NPP_CERT_PWD% /d "Notepad++" /du https://notepad-plus-plus.org/ /t http://timestamp.digicert.com/ ..\bin\notepad++.exe +If ErrorLevel 1 goto End signtool.exe sign /f %NPP_CERT% /p %NPP_CERT_PWD% /d "Notepad++" /du https://notepad-plus-plus.org/ /t http://timestamp.digicert.com/ ..\bin64\notepad++.exe If ErrorLevel 1 goto End signtool.exe sign /f %NPP_CERT% /p %NPP_CERT_PWD% /d "Notepad++" /du https://notepad-plus-plus.org/ /t http://timestamp.digicert.com/ ..\bin\SciLexer.dll +If ErrorLevel 1 goto End signtool.exe sign /f %NPP_CERT% /p %NPP_CERT_PWD% /d "Notepad++" /du https://notepad-plus-plus.org/ /t http://timestamp.digicert.com/ ..\bin64\SciLexer.dll If ErrorLevel 1 goto End signtool.exe sign /f %NPP_CERT% /p %NPP_CERT_PWD% /d "Notepad++" /du https://notepad-plus-plus.org/ /t http://timestamp.digicert.com/ ..\bin\NppShell_06.dll If ErrorLevel 1 goto End signtool.exe sign /f %NPP_CERT% /p %NPP_CERT_PWD% /d "Notepad++" /du https://notepad-plus-plus.org/ /t http://timestamp.digicert.com/ ..\bin\NppShell64_06.dll -rem signtool.exe sign /f %NPP_CERT% /p %NPP_CERT_PWD% /d "Notepad++" /du https://notepad-plus-plus.org/ /t http://timestamp.digicert.com/ ..\bin64\NppShell64_06.dll If ErrorLevel 1 goto End -sign them manuelly as they are updated signtool.exe sign /f %NPP_CERT% /p %NPP_CERT_PWD% /d "Notepad++" /du https://notepad-plus-plus.org/ /t http://timestamp.digicert.com/ ..\bin\updater\GUP.exe If ErrorLevel 1 goto End -signtool.exe sign /f %NPP_CERT% /p %NPP_CERT_PWD% /d "Notepad++" /du https://notepad-plus-plus.org/ /t http://timestamp.digicert.com/ ..\bin\updater\gpup.exe +signtool.exe sign /f %NPP_CERT% /p %NPP_CERT_PWD% /d "Notepad++" /du https://notepad-plus-plus.org/ /t http://timestamp.digicert.com/ ..\bin64\updater\GUP.exe If ErrorLevel 1 goto End + signtool.exe sign /f %NPP_CERT% /p %NPP_CERT_PWD% /d "Notepad++" /du https://notepad-plus-plus.org/ /t http://timestamp.digicert.com/ ..\bin\updater\libcurl.dll If ErrorLevel 1 goto End +signtool.exe sign /f %NPP_CERT% /p %NPP_CERT_PWD% /d "Notepad++" /du https://notepad-plus-plus.org/ /t http://timestamp.digicert.com/ ..\bin64\updater\libcurl.dll +If ErrorLevel 1 goto End + +signtool.exe sign /f %NPP_CERT% /p %NPP_CERT_PWD% /d "Notepad++" /du https://notepad-plus-plus.org/ /t http://timestamp.digicert.com/ ..\bin\updater\gpup.exe +If ErrorLevel 1 goto End signtool.exe sign /f %NPP_CERT% /p %NPP_CERT_PWD% /d "Notepad++" /du https://notepad-plus-plus.org/ /t http://timestamp.digicert.com/ ..\bin\plugins\NppExport.dll If ErrorLevel 1 goto End @@ -260,28 +266,33 @@ If ErrorLevel 1 goto End If ErrorLevel 1 goto End - -@echo off - +rem set var locally in this batch file setlocal enableDelayedExpansion cd .\build\ -for %%a in (npp.*.Installer.x32.exe) do ( + +for %%a in (npp.*.Installer.exe) do ( rem echo a = %%a set nppInstallerVar=%%a - set zipvar=!nppInstallerVar:Installer.x32.exe=bin.x32.zip! - set zipvar64=!nppInstallerVar:Installer.x32.exe=bin.x64.zip! - set 7zvar=!nppInstallerVar:Installer.x32.exe=bin.x32.7z! - set 7zvar64=!nppInstallerVar:Installer.x32.exe=bin.x64.7z! - set 7zvarMin=!nppInstallerVar:Installer.x32.exe=bin.minimalist.x32.7z! - set 7zvarMin64=!nppInstallerVar:Installer.x32.exe=bin.minimalist.x64.7z! + set nppInstallerVar64=!nppInstallerVar:Installer.exe=Installer.x64.exe! + + rem nppInstallerVar should be the version for exemple: 6.9 + rem we put npp.6.9. + (bin.zip instead of Installer.exe) into var zipvar + set zipvar=!nppInstallerVar:Installer.exe=bin.zip! + set zipvar64=!nppInstallerVar:Installer.exe=bin.x64.zip! + set 7zvar=!nppInstallerVar:Installer.exe=bin.7z! + set 7zvar64=!nppInstallerVar:Installer.exe=bin.x64.7z! + set 7zvarMin=!nppInstallerVar:Installer.exe=bin.minimalist.7z! + set 7zvarMin64=!nppInstallerVar:Installer.exe=bin.minimalist.x64.7z! ) rem echo zipvar=!zipvar! -rem echo 64zipvar=!64zipvar! +rem echo zipvar64=!zipvar64! rem echo 7zvar=!7zvar! +rem echo 7zvar64=!7zvar64! rem echo 7zvarMin=!7zvarMin! +rem echo 7zvarMin64=!7zvarMin64! ren npp.bin.zip !zipvar! ren npp.bin64.zip !zipvar64! ren npp.bin.7z !7zvar! @@ -291,6 +302,9 @@ ren npp.bin.minimalist64.7z !7zvarMin64! if %SIGN% == 0 goto NoSignInstaller signtool.exe sign /f %NPP_CERT% /p %NPP_CERT_PWD% /d "Notepad++ Installer" /du https://notepad-plus-plus.org/ /t http://timestamp.digicert.com/ !nppInstallerVar! +If ErrorLevel 1 goto End +signtool.exe sign /f %NPP_CERT% /p %NPP_CERT_PWD% /d "Notepad++ Installer" /du https://notepad-plus-plus.org/ /t http://timestamp.digicert.com/ !nppInstallerVar64! +If ErrorLevel 1 goto End :NoSignInstaller cd ..