From 3686d7d1167f9786e005e467c4389254090347a3 Mon Sep 17 00:00:00 2001 From: Rainer Kottenhoff Date: Sun, 7 Jul 2019 11:15:23 +0200 Subject: [PATCH 1/2] + fix: Notepad3 DLL version --- scintilla/ScintillaDLL.vcxproj | 6 +++++- scintilla/ScintillaDLL.vcxproj.filters | 14 +++++++++++--- scintilla/win32/ScintRes.rc | 8 ++++---- src/Notepad3DLL.vcxproj | 5 ++++- src/Notepad3DLL.vcxproj.filters | 18 +++++++++++++++--- 5 files changed, 39 insertions(+), 12 deletions(-) diff --git a/scintilla/ScintillaDLL.vcxproj b/scintilla/ScintillaDLL.vcxproj index 613baf62f..00e6937bc 100644 --- a/scintilla/ScintillaDLL.vcxproj +++ b/scintilla/ScintillaDLL.vcxproj @@ -245,8 +245,8 @@ - + @@ -339,6 +339,7 @@ + @@ -403,6 +404,9 @@ + + + diff --git a/scintilla/ScintillaDLL.vcxproj.filters b/scintilla/ScintillaDLL.vcxproj.filters index 70bc0838b..c2043fe0d 100644 --- a/scintilla/ScintillaDLL.vcxproj.filters +++ b/scintilla/ScintillaDLL.vcxproj.filters @@ -267,9 +267,6 @@ lexers - - sciXlexers - sciXlexers @@ -345,6 +342,9 @@ oniguruma + + sciXlexers + @@ -557,5 +557,13 @@ oniguruma + + sciXlexers + + + + + win32 + \ No newline at end of file diff --git a/scintilla/win32/ScintRes.rc b/scintilla/win32/ScintRes.rc index 62e38a5f4..5fa2c705a 100644 --- a/scintilla/win32/ScintRes.rc +++ b/scintilla/win32/ScintRes.rc @@ -25,12 +25,12 @@ BEGIN BLOCK "040904b0" BEGIN VALUE "CompanyName", "Neil Hodgson neilh@scintilla.org\0" - VALUE "FileDescription", "Scintilla.DLL - a Source Editing Component\0" + VALUE "FileDescription", "Scintilla.DLL - a Source Editing Component vNP3\0" VALUE "FileVersion", VERSION_SCINTILLA "\0" - VALUE "InternalName", "Scintilla\0" - VALUE "LegalCopyright", "Copyright 1998-2012 by Neil Hodgson\0" + VALUE "InternalName", "Scintilla vNP3\0" + VALUE "LegalCopyright", "Copyright 1998-2019 by Neil Hodgson\0" VALUE "OriginalFilename", "Scintilla.DLL\0" - VALUE "ProductName", "Scintilla\0" + VALUE "ProductName", "Scintilla vNP3\0" VALUE "ProductVersion", VERSION_SCINTILLA "\0" END END diff --git a/src/Notepad3DLL.vcxproj b/src/Notepad3DLL.vcxproj index d24ee2fe7..3adafd13d 100644 --- a/src/Notepad3DLL.vcxproj +++ b/src/Notepad3DLL.vcxproj @@ -431,6 +431,7 @@ + @@ -440,7 +441,6 @@ - @@ -481,6 +481,7 @@ + @@ -533,6 +534,8 @@ + + diff --git a/src/Notepad3DLL.vcxproj.filters b/src/Notepad3DLL.vcxproj.filters index b0f5a9d8b..c5651db77 100644 --- a/src/Notepad3DLL.vcxproj.filters +++ b/src/Notepad3DLL.vcxproj.filters @@ -40,6 +40,9 @@ {80bb23ba-0110-42e2-b201-04e2f8cedbbf} + + {be247306-f241-4f33-8cbc-818664e43d26} + @@ -90,9 +93,6 @@ Source Files\ChooseFont - - Source Files\StyleLexers - Source Files\StyleLexers @@ -396,6 +396,12 @@ Source Files\uchardet + + Source Files\StyleLexers + + + Source Files\Config + @@ -560,6 +566,12 @@ Source Files\uchardet + + Source Files\Config + + + Source Files\Config + From 8d8cb2d88fe9a12b17ee1c293d22ed5047058bf7 Mon Sep 17 00:00:00 2001 From: Rainer Kottenhoff Date: Sun, 7 Jul 2019 12:01:34 +0200 Subject: [PATCH 2/2] + add: PortableApps support for DLL version --- np3portableapp/build_np3portableapp.cmd | 119 ++++++++++++++---------- 1 file changed, 69 insertions(+), 50 deletions(-) diff --git a/np3portableapp/build_np3portableapp.cmd b/np3portableapp/build_np3portableapp.cmd index 76d369133..c4241382c 100644 --- a/np3portableapp/build_np3portableapp.cmd +++ b/np3portableapp/build_np3portableapp.cmd @@ -40,21 +40,21 @@ set PORTAPP_APP_COMPACTOR=%PORTAPP_ROOT_DIR%\PortableApps.comAppCompactor\Portab set PORTAPP_LAUNCHER_CREATOR=%PORTAPP_ROOT_DIR%\PortableApps.comLauncher\PortableApps.comLauncherGenerator.exe set PORTAPP_INSTALLER_CREATOR=%PORTAPP_ROOT_DIR%\PortableApps.comInstaller\PortableApps.comInstaller.exe -set NP3_DISTRIB_DIR=%SCRIPT_DIR%..\Build -set NP3_DOC_DIR=%SCRIPT_DIR%..\doc -::set NP3_THEMES_DIR=%SCRIPT_DIR%..\themes -set NP3_BUILD_SCHEMES_DIR=%SCRIPT_DIR%..\Build\themes -::set NP3_WIN32_DIR=%SCRIPT_DIR%..\Bin\Release_x86_v141 -::set NP3_X64_DIR=%SCRIPT_DIR%..\Bin\Release_x64_v141 -set NP3_WIN32_DIR=%SCRIPT_DIR%..\Bin\Release_x86_v142 -set NP3_X64_DIR=%SCRIPT_DIR%..\Bin\Release_x64_v142 +call :RESOLVEPATH NP3_DISTRIB_DIR %SCRIPT_DIR%..\Build +call :RESOLVEPATH NP3_DOC_DIR %SCRIPT_DIR%..\doc +::call :RESOLVEPATH NP3_THEMES_DIR %SCRIPT_DIR%..\themes +call :RESOLVEPATH NP3_BUILD_SCHEMES_DIR %SCRIPT_DIR%..\Build\themes +::call :RESOLVEPATH NP3_WIN32_DIR %SCRIPT_DIR%..\Bin\Release_x86_v141 +::call :RESOLVEPATH NP3_X64_DIR %SCRIPT_DIR%..\Bin\Release_x64_v141 +call :RESOLVEPATH NP3_WIN32_DIR %SCRIPT_DIR%..\Bin\Release_x86_v142 +call :RESOLVEPATH NP3_X64_DIR %SCRIPT_DIR%..\Bin\Release_x64_v142 -set NP3_PORTAPP_DIR=%SCRIPT_DIR%Notepad3Portable -set NP3_PORTAPP_INFO=%NP3_PORTAPP_DIR%\App\AppInfo\appinfo -set NP3_PORTAPP_INSTALL=%NP3_PORTAPP_DIR%\App\AppInfo\installer +call :RESOLVEPATH NP3_PORTAPP_DIR %SCRIPT_DIR%Notepad3Portable +call :RESOLVEPATH NP3_PORTAPP_INFO %NP3_PORTAPP_DIR%\App\AppInfo\appinfo +call :RESOLVEPATH NP3_PORTAPP_INSTALL %NP3_PORTAPP_DIR%\App\AppInfo\installer -set NP3_BUILD_VER=%SCRIPT_DIR%..\Versions\build.txt -set NP3_BUILD_NAME=%SCRIPT_DIR%_buildname.txt +call :RESOLVEPATH NP3_BUILD_VER %SCRIPT_DIR%..\Versions\build.txt +call :RESOLVEPATH NP3_BUILD_NAME %SCRIPT_DIR%_buildname.txt :: -------------------------------------------------------------------------------------------------------------------- @@ -103,6 +103,11 @@ copy /B "%NP3_WIN32_DIR%\lng\np3lng.dll" /B "%NP3_PORTAPP_DIR%\App\Notepad3\x86\ copy /B "%NP3_WIN32_DIR%\lng\mplng.dll" /B "%NP3_PORTAPP_DIR%\App\Notepad3\x86\lng\" /Y /V copy /B "%NP3_WIN32_DIR%\Notepad3.exe" /B "%NP3_PORTAPP_DIR%\App\Notepad3\x86\" /Y /V +if exist %NP3_WIN32_DIR%\Scintilla.dll ( + copy /B "%NP3_WIN32_DIR%\Scintilla.dll" /B "%NP3_PORTAPP_DIR%\App\Notepad3\x86\" /Y /V +) else ( + echo. Scintilla.dll does not exist +) copy /B "%NP3_WIN32_DIR%\minipath.exe" /B "%NP3_PORTAPP_DIR%\App\Notepad3\x86\" /Y /V ::copy /B "%NP3_WIN32_DIR%\np3encrypt.exe" /B "%NP3_PORTAPP_DIR%\App\Notepad3\x86\" /Y /V ::copy /B "%NP3_WIN32_DIR%\ced.exe" /B "%NP3_PORTAPP_DIR%\App\Notepad3\x86\" /Y /V @@ -125,6 +130,11 @@ copy /B "%NP3_X64_DIR%\lng\np3lng.dll" /B "%NP3_PORTAPP_DIR%\App\Notepad3\x64\ln copy /B "%NP3_X64_DIR%\lng\mplng.dll" /B "%NP3_PORTAPP_DIR%\App\Notepad3\x64\lng\" /Y /V copy /B "%NP3_X64_DIR%\Notepad3.exe" /B "%NP3_PORTAPP_DIR%\App\Notepad3\x64\" /Y /V +if exist %NP3_X64_DIR%\Scintilla.dll ( + copy /B "%NP3_X64_DIR%\Scintilla.dll" /B "%NP3_PORTAPP_DIR%\App\Notepad3\x64\" /Y /V +) else ( + echo. Scintilla.dll does not exist +) copy /B "%NP3_X64_DIR%\minipath.exe" /B "%NP3_PORTAPP_DIR%\App\Notepad3\x64\" /Y /V ::copy /B "%NP3_X64_DIR%\np3encrypt.exe" /B "%NP3_PORTAPP_DIR%\App\Notepad3\x64\" /Y /V ::copy /B "%NP3_X64_DIR%\ced.exe" /B "%NP3_PORTAPP_DIR%\App\Notepad3\x64\" /Y /V @@ -164,55 +174,64 @@ del /F "%NP3_PORTAPP_INFO%_tmp.ini" goto :END :: REPLACE strg(%1) srcfile(%2) replstrg(%3) dstfile(%4) :REPLACE -if exist "%~4" del /F /Q "%~4" -type NUL > "%~4" -for /f "tokens=1,* delims=¶" %%A in (%~2) do ( - set string=%%A - setlocal EnableDelayedExpansion - set modified=!string:%~1=%~3! - >> "%~4" echo(!modified! - endlocal -) -goto:EOF + if exist "%~4" del /F /Q "%~4" + type NUL > "%~4" + for /f "tokens=1,* delims=¶" %%A in (%~2) do ( + set string=%%A + setlocal EnableDelayedExpansion + set modified=!string:%~1=%~3! + >> "%~4" echo(!modified! + endlocal + ) + goto:EOF :: -------------------------------------------------------------------------------------------------------------------- :GETDATE -for /f "tokens=2 delims==" %%a in (' - wmic OS Get localdatetime /value -') do set "dt=%%a" -set "YY=%dt:~2,2%" & set "YYYY=%dt:~0,4%" & set "MM=%dt:~4,2%" & set "DD=%dt:~6,2%" -set "HH=%dt:~8,2%" & set "Min=%dt:~10,2%" & set "Sec=%dt:~12,2%" -::set "datestamp=%YYYY%%MM%%DD%" & set "timestamp=%HH%%Min%%Sec%" -::set "fullstamp=%YYYY%-%MM%-%DD%_%HH%-%Min%-%Sec%" -::echo datestamp: "%datestamp%" -::echo timestamp: "%timestamp%" -::echo fullstamp: "%fullstamp%" -goto:EOF + for /f "tokens=2 delims==" %%a in (' + wmic OS Get localdatetime /value + ') do set "dt=%%a" + set "YY=%dt:~2,2%" & set "YYYY=%dt:~0,4%" & set "MM=%dt:~4,2%" & set "DD=%dt:~6,2%" + set "HH=%dt:~8,2%" & set "Min=%dt:~10,2%" & set "Sec=%dt:~12,2%" + ::set "datestamp=%YYYY%%MM%%DD%" & set "timestamp=%HH%%Min%%Sec%" + ::set "fullstamp=%YYYY%-%MM%-%DD%_%HH%-%Min%-%Sec%" + ::echo datestamp: "%datestamp%" + ::echo timestamp: "%timestamp%" + ::echo fullstamp: "%fullstamp%" + goto:EOF :: -------------------------------------------------------------------------------------------------------------------- :GETFILEVER -set "file=%~1" -if not defined file goto:EOF -if not exist "%file%" goto:EOF -set "FILEVER=" -for /F "tokens=2 delims==" %%a in (' - wmic datafile where name^="%file:\=\\%" Get Version /value -') do set "FILEVER=%%a" -::echo %file% = %FILEVER% -goto:EOF + set "file=%~1" + if not defined file goto:EOF + if not exist "%file%" goto:EOF + set "FILEVER=" + for /F "tokens=2 delims==" %%a in (' + wmic datafile where name^="%file:\=\\%" Get Version /value + ') do set "FILEVER=%%a" + ::echo %file% = %FILEVER% + goto:EOF :: -------------------------------------------------------------------------------------------------------------------- :GETBUILD -set /p nxbuild=<%NP3_BUILD_VER% -set /a BUILD = %nxbuild% - 1 -set /p DEVNAME=<%NP3_BUILD_NAME% -set DEVNAME=%DEVNAME:"=% -goto:EOF + set /p nxbuild=<%NP3_BUILD_VER% + set /a BUILD = %nxbuild% - 1 + set /p DEVNAME=<%NP3_BUILD_NAME% + set DEVNAME=%DEVNAME:"=% + goto:EOF :: -------------------------------------------------------------------------------------------------------------------- +rem Resolve path to absolute. +rem Param 1: Name of output variable. +rem Param 2: Path to resolve. +rem Return: Resolved absolute path. +:RESOLVEPATH + set %1=%~dpfn2 + goto:EOF +:: -------------------------------------------------------------------------------------------------------------------- + :: ==================================================================================================================== :END -::pause -endlocal +pause +::endlocal ::exit :: ====================================================================================================================