mirror of
https://github.com/rizonesoft/Notepad3.git
synced 2026-06-14 21:09:05 +08:00
commit
b254b2d310
4
.gitignore
vendored
4
.gitignore
vendored
@ -53,6 +53,8 @@ Thumbs.db
|
||||
/test/test.log
|
||||
/Notepad3.VC.VC.opendb
|
||||
|
||||
/grepWin/portables/*.zip
|
||||
|
||||
/np3portableapp/Signing*.cmd
|
||||
/np3portableapp/Signing*.txt
|
||||
/np3portableapp/Notepad3Portable*.7z
|
||||
@ -63,6 +65,8 @@ Thumbs.db
|
||||
/np3portableapp/Notepad3Portable/App/Notepad3/x64/lng
|
||||
/np3portableapp/Notepad3Portable/App/Notepad3/x86/*.exe
|
||||
/np3portableapp/Notepad3Portable/App/Notepad3/x86/lng
|
||||
/np3portableapp/Notepad3Portable/App/AppInfo/appinfo.ini
|
||||
/np3portableapp/Notepad3Portable/App/AppInfo/installer.ini
|
||||
#
|
||||
|
||||
# Upgrade staging directory
|
||||
|
||||
@ -17,7 +17,9 @@ rem * https://rizonesoft.com
|
||||
rem * *
|
||||
rem ******************************************************************************
|
||||
|
||||
CD /D %~dp0
|
||||
PUSHD %~dp0
|
||||
|
||||
rem SET SEVENZIP=%~dp07za.exe
|
||||
|
||||
rem Check for the help switches
|
||||
IF /I "%~1" == "help" GOTO SHOWHELP
|
||||
@ -33,12 +35,12 @@ SET TEMP_NAME="make_portable_temp"
|
||||
|
||||
IF NOT EXIST "..\%INPUTDIRx86%\Notepad3.exe" CALL :SUBMSG "ERROR" "Compile Notepad3 x86 first!"
|
||||
IF NOT EXIST "..\%INPUTDIRx86%\minipath.exe" CALL :SUBMSG "ERROR" "Compile MiniPath x86 first!"
|
||||
IF NOT EXIST "..\%INPUTDIRx86%\grepWinNP3.exe" CALL :SUBMSG "ERROR" "Compile grepWinNP3 x86 first!"
|
||||
IF NOT EXIST "..\%INPUTDIRx86%\np3encrypt.exe" CALL :SUBMSG "ERROR" "Compile np3encrypt x86 first!"
|
||||
IF NOT EXIST "..\%INPUTDIRx64%\Notepad3.exe" CALL :SUBMSG "ERROR" "Compile Notepad3 x64 first!"
|
||||
IF NOT EXIST "..\%INPUTDIRx64%\minipath.exe" CALL :SUBMSG "ERROR" "Compile MiniPath x64 first!"
|
||||
IF NOT EXIST "..\%INPUTDIRx64%\grepWinNP3.exe" CALL :SUBMSG "ERROR" "Compile grepWinNP3 x64 first!"
|
||||
IF NOT EXIST "..\%INPUTDIRx64%\np3encrypt.exe" CALL :SUBMSG "ERROR" "Compile np3encrypt x64 first!"
|
||||
IF NOT EXIST "..\grepWin\portables\grepWin-x86_portable.exe" CALL :SUBMSG "ERROR" "grepWin x86 portable not found in grepWin\portables\!"
|
||||
IF NOT EXIST "..\grepWin\portables\grepWin-x64_portable.exe" CALL :SUBMSG "ERROR" "grepWin x64 portable not found in grepWin\portables\!"
|
||||
|
||||
CALL :SubGetVersion
|
||||
CALL :SubDetectSevenzipPath
|
||||
@ -79,7 +81,9 @@ ECHO.
|
||||
:: ===========================================================================================
|
||||
ping -n 9 127.0.0.1>nul
|
||||
|
||||
POPD
|
||||
ENDLOCAL
|
||||
::PAUSE
|
||||
EXIT /B
|
||||
|
||||
|
||||
@ -91,18 +95,21 @@ IF EXIST "%TEMP_NAME%" RD /S /Q "%TEMP_NAME%"
|
||||
IF NOT EXIST "%TEMP_NAME%" MD "%TEMP_NAME%"
|
||||
IF NOT EXIST "Packages" MD "Packages"
|
||||
|
||||
FOR %%A IN ("..\License.txt" "..\Readme.txt" "..\grepWinNP3\grepWinLicense.txt" "Notepad3.ini" "minipath.ini"^
|
||||
"..\%1\Notepad3.exe" "..\%1\minipath.exe" "..\%1\grepWinNP3.exe" "..\%1\np3encrypt.exe") DO COPY /Y /V "%%A" "%TEMP_NAME%\"
|
||||
FOR %%A IN ("..\License.txt" "..\Readme.txt" "Notepad3.ini" "minipath.ini"^
|
||||
"..\%1\Notepad3.exe" "..\%1\minipath.exe" "..\%1\np3encrypt.exe") DO COPY /Y /V "%%A" "%TEMP_NAME%\"
|
||||
|
||||
SET "LNG=%TEMP_NAME%\lng"
|
||||
SET "GRP=%TEMP_NAME%\lng\gwLng\"
|
||||
SET "GREPWIN=%TEMP_NAME%\grepWin"
|
||||
SET "THEMES=%TEMP_NAME%\Themes"
|
||||
SET "DOCS=%TEMP_NAME%\Docs"
|
||||
IF NOT EXIST %LNG% MD %LNG%
|
||||
IF NOT EXIST %GREPWIN% MD %GREPWIN%
|
||||
IF NOT EXIST %THEMES% MD %THEMES%
|
||||
IF NOT EXIST %DOCS% MD %DOCS%
|
||||
XCOPY /E /Y /V "..\%1\lng" "%LNG%" /EXCLUDE:Ignore.txt
|
||||
XCOPY /E /Y /V "..\%1\lng\gwLng\" "%GRP%"
|
||||
COPY /Y /V "..\grepWin\portables\grepWin-%2_portable.exe" "%GREPWIN%\"
|
||||
COPY /Y /V "..\grepWin\portables\LICENSE.txt" "%GREPWIN%\"
|
||||
XCOPY /Y /V "..\grepWin\translations\*.lang" "%GREPWIN%\"
|
||||
XCOPY /E /Y /V "Themes" "%THEMES%"
|
||||
XCOPY /E /Y /V "Docs" "%DOCS%"
|
||||
COPY /Y /V "Changes.txt" "%DOCS%"
|
||||
@ -111,9 +118,9 @@ SET "FAVORITES=%TEMP_NAME%\Favorites"
|
||||
IF NOT EXIST "%FAVORITES%" MD "%FAVORITES%"
|
||||
|
||||
PUSHD "%TEMP_NAME%"
|
||||
"%SEVENZIP%" a -t7z -ms=on -mx=7^
|
||||
"%ZIP_NAME%.7z" "License.txt" "Notepad3.exe" "Notepad3.ini" "grepWinLicense.txt" "Readme.txt"^
|
||||
"Favorites" "minipath.exe" "minipath.ini" "grepWinNP3.exe" "np3encrypt.exe" "lng" "Themes" "Docs">NUL
|
||||
"%SEVENZIP%" a -t7z -m0=lzma2 -ms=on -mx=9^
|
||||
"%ZIP_NAME%.7z" "License.txt" "Notepad3.exe" "Notepad3.ini" "Readme.txt"^
|
||||
"Favorites" "minipath.exe" "minipath.ini" "np3encrypt.exe" "grepWin" "lng" "Themes" "Docs">NUL
|
||||
IF %ERRORLEVEL% NEQ 0 CALL :SUBMSG "ERROR" "Compilation failed!"
|
||||
|
||||
CALL :SUBMSG "INFO" "%ZIP_NAME%.7z created successfully!"
|
||||
|
||||
@ -17,7 +17,9 @@ rem * https://rizonesoft.com
|
||||
rem * *
|
||||
rem ******************************************************************************
|
||||
|
||||
CD /D %~dp0
|
||||
PUSHD %~dp0
|
||||
|
||||
rem SET SEVENZIP=%~dp07za.exe
|
||||
|
||||
rem Check for the help switches
|
||||
IF /I "%~1" == "help" GOTO SHOWHELP
|
||||
@ -33,12 +35,12 @@ SET TEMP_NAME="make_portable_temp"
|
||||
|
||||
IF NOT EXIST "..\%INPUTDIRx86%\Notepad3.exe" CALL :SUBMSG "ERROR" "Compile Notepad3 x86 first!"
|
||||
IF NOT EXIST "..\%INPUTDIRx86%\minipath.exe" CALL :SUBMSG "ERROR" "Compile MiniPath x86 first!"
|
||||
IF NOT EXIST "..\%INPUTDIRx86%\grepWinNP3.exe" CALL :SUBMSG "ERROR" "Compile grepWinNP3 x86 first!"
|
||||
IF NOT EXIST "..\%INPUTDIRx86%\np3encrypt.exe" CALL :SUBMSG "ERROR" "Compile np3encrypt x86 first!"
|
||||
IF NOT EXIST "..\%INPUTDIRx64%\Notepad3.exe" CALL :SUBMSG "ERROR" "Compile Notepad3 x64 first!"
|
||||
IF NOT EXIST "..\%INPUTDIRx64%\minipath.exe" CALL :SUBMSG "ERROR" "Compile MiniPath x64 first!"
|
||||
IF NOT EXIST "..\%INPUTDIRx64%\grepWinNP3.exe" CALL :SUBMSG "ERROR" "Compile grepWinNP3 x64 first!"
|
||||
IF NOT EXIST "..\%INPUTDIRx64%\np3encrypt.exe" CALL :SUBMSG "ERROR" "Compile np3encrypt x64 first!"
|
||||
IF NOT EXIST "..\grepWin\portables\grepWin-x86_portable.exe" CALL :SUBMSG "ERROR" "grepWin x86 portable not found in grepWin\portables\!"
|
||||
IF NOT EXIST "..\grepWin\portables\grepWin-x64_portable.exe" CALL :SUBMSG "ERROR" "grepWin x64 portable not found in grepWin\portables\!"
|
||||
|
||||
CALL :SubGetVersion
|
||||
CALL :SubDetectSevenzipPath
|
||||
@ -79,7 +81,9 @@ ECHO.
|
||||
:: ===========================================================================================
|
||||
ping -n 9 127.0.0.1>nul
|
||||
|
||||
POPD
|
||||
ENDLOCAL
|
||||
::PAUSE
|
||||
EXIT /B
|
||||
|
||||
|
||||
@ -91,18 +95,21 @@ IF EXIST "%TEMP_NAME%" RD /S /Q "%TEMP_NAME%"
|
||||
IF NOT EXIST "%TEMP_NAME%" MD "%TEMP_NAME%"
|
||||
IF NOT EXIST "Packages" MD "Packages"
|
||||
|
||||
FOR %%A IN ("..\License.txt" "..\Readme.txt" "..\grepWinNP3\grepWinLicense.txt" "Notepad3.ini" "minipath.ini"^
|
||||
"..\%1\Notepad3.exe" "..\%1\minipath.exe" "..\%1\grepWinNP3.exe" "..\%1\np3encrypt.exe") DO COPY /Y /V "%%A" "%TEMP_NAME%\"
|
||||
FOR %%A IN ("..\License.txt" "..\Readme.txt" "Notepad3.ini" "minipath.ini"^
|
||||
"..\%1\Notepad3.exe" "..\%1\minipath.exe" "..\%1\np3encrypt.exe") DO COPY /Y /V "%%A" "%TEMP_NAME%\"
|
||||
|
||||
SET "LNG=%TEMP_NAME%\lng"
|
||||
SET "GRP=%TEMP_NAME%\lng\gwLng\"
|
||||
SET "GREPWIN=%TEMP_NAME%\grepWin"
|
||||
SET "THEMES=%TEMP_NAME%\Themes"
|
||||
SET "DOCS=%TEMP_NAME%\Docs"
|
||||
IF NOT EXIST %LNG% MD %LNG%
|
||||
IF NOT EXIST %GREPWIN% MD %GREPWIN%
|
||||
IF NOT EXIST %THEMES% MD %THEMES%
|
||||
IF NOT EXIST %DOCS% MD %DOCS%
|
||||
XCOPY /E /Y /V "..\%1\lng" "%LNG%" /EXCLUDE:Ignore.txt
|
||||
XCOPY /E /Y /V "..\%1\lng\gwLng\" "%GRP%"
|
||||
COPY /Y /V "..\grepWin\portables\grepWin-%2_portable.exe" "%GREPWIN%\"
|
||||
COPY /Y /V "..\grepWin\portables\LICENSE.txt" "%GREPWIN%\"
|
||||
XCOPY /Y /V "..\grepWin\translations\*.lang" "%GREPWIN%\"
|
||||
XCOPY /E /Y /V "Themes" "%THEMES%"
|
||||
XCOPY /E /Y /V "Docs" "%DOCS%"
|
||||
COPY /Y /V "Changes.txt" "%DOCS%"
|
||||
@ -111,9 +118,9 @@ SET "FAVORITES=%TEMP_NAME%\Favorites"
|
||||
IF NOT EXIST "%FAVORITES%" MD "%FAVORITES%"
|
||||
|
||||
PUSHD "%TEMP_NAME%"
|
||||
"%SEVENZIP%" a -t7z -ms=on -mx=7^
|
||||
"%ZIP_NAME%.7z" "License.txt" "Notepad3.exe" "Notepad3.ini" "grepWinLicense.txt" "Readme.txt"^
|
||||
"Favorites" "minipath.exe" "minipath.ini" "grepWinNP3.exe" "np3encrypt.exe" "lng" "Themes" "Docs">NUL
|
||||
"%SEVENZIP%" a -t7z -m0=lzma2 -ms=on -mx=9^
|
||||
"%ZIP_NAME%.7z" "License.txt" "Notepad3.exe" "Notepad3.ini" "Readme.txt"^
|
||||
"Favorites" "minipath.exe" "minipath.ini" "np3encrypt.exe" "grepWin" "lng" "Themes" "Docs">NUL
|
||||
IF %ERRORLEVEL% NEQ 0 CALL :SUBMSG "ERROR" "Compilation failed!"
|
||||
|
||||
CALL :SUBMSG "INFO" "%ZIP_NAME%.7z created successfully!"
|
||||
|
||||
@ -17,7 +17,9 @@ rem * https://rizonesoft.com
|
||||
rem * *
|
||||
rem ******************************************************************************
|
||||
|
||||
CD /D %~dp0
|
||||
PUSHD %~dp0
|
||||
|
||||
rem SET SEVENZIP=%~dp07za.exe
|
||||
|
||||
rem Check for the help switches
|
||||
IF /I "%~1" == "help" GOTO SHOWHELP
|
||||
@ -33,12 +35,12 @@ SET TEMP_NAME="make_portable_temp"
|
||||
|
||||
IF NOT EXIST "..\%INPUTDIRx86%\Notepad3.exe" CALL :SUBMSG "ERROR" "Compile Notepad3 x86 first!"
|
||||
IF NOT EXIST "..\%INPUTDIRx86%\minipath.exe" CALL :SUBMSG "ERROR" "Compile MiniPath x86 first!"
|
||||
::IF NOT EXIST "..\%INPUTDIRx86%\grepWinNP3.exe" CALL :SUBMSG "ERROR" "Compile grepWinNP3 x86 first!"
|
||||
IF NOT EXIST "..\%INPUTDIRx86%\np3encrypt.exe" CALL :SUBMSG "ERROR" "Compile np3encrypt x86 first!"
|
||||
IF NOT EXIST "..\%INPUTDIRx64%\Notepad3.exe" CALL :SUBMSG "ERROR" "Compile Notepad3 x64 first!"
|
||||
IF NOT EXIST "..\%INPUTDIRx64%\minipath.exe" CALL :SUBMSG "ERROR" "Compile MiniPath x64 first!"
|
||||
::IF NOT EXIST "..\%INPUTDIRx64%\grepWinNP3.exe" CALL :SUBMSG "ERROR" "Compile grepWinNP3 x64 first!"
|
||||
IF NOT EXIST "..\%INPUTDIRx64%\np3encrypt.exe" CALL :SUBMSG "ERROR" "Compile np3encrypt x64 first!"
|
||||
IF NOT EXIST "..\grepWin\portables\grepWin-x86_portable.exe" CALL :SUBMSG "ERROR" "grepWin x86 portable not found in grepWin\portables\!"
|
||||
IF NOT EXIST "..\grepWin\portables\grepWin-x64_portable.exe" CALL :SUBMSG "ERROR" "grepWin x64 portable not found in grepWin\portables\!"
|
||||
|
||||
CALL :SubGetVersion
|
||||
CALL :SubDetectSevenzipPath
|
||||
@ -79,7 +81,9 @@ ECHO.
|
||||
:: ===========================================================================================
|
||||
ping -n 9 127.0.0.1>nul
|
||||
|
||||
POPD
|
||||
ENDLOCAL
|
||||
::PAUSE
|
||||
EXIT /B
|
||||
|
||||
|
||||
@ -95,14 +99,17 @@ FOR %%A IN ("..\License.txt" "..\Readme.txt" "Notepad3.ini" "minipath.ini"^
|
||||
"..\%1\Notepad3.exe" "..\%1\minipath.exe" "..\%1\np3encrypt.exe") DO COPY /Y /V "%%A" "%TEMP_NAME%\"
|
||||
|
||||
SET "LNG=%TEMP_NAME%\lng"
|
||||
SET "GRP=%TEMP_NAME%\lng\gwLng\"
|
||||
SET "GREPWIN=%TEMP_NAME%\grepWin"
|
||||
SET "THEMES=%TEMP_NAME%\Themes"
|
||||
SET "DOCS=%TEMP_NAME%\Docs"
|
||||
IF NOT EXIST %LNG% MD %LNG%
|
||||
IF NOT EXIST %GREPWIN% MD %GREPWIN%
|
||||
IF NOT EXIST %THEMES% MD %THEMES%
|
||||
IF NOT EXIST %DOCS% MD %DOCS%
|
||||
XCOPY /E /Y /V "..\%1\lng" "%LNG%" /EXCLUDE:Ignore.txt
|
||||
XCOPY /E /Y /V "..\%1\lng\gwLng\" "%GRP%"
|
||||
COPY /Y /V "..\grepWin\portables\grepWin-%2_portable.exe" "%GREPWIN%\"
|
||||
COPY /Y /V "..\grepWin\portables\LICENSE.txt" "%GREPWIN%\"
|
||||
XCOPY /Y /V "..\grepWin\translations\*.lang" "%GREPWIN%\"
|
||||
XCOPY /E /Y /V "Themes" "%THEMES%"
|
||||
XCOPY /E /Y /V "Docs" "%DOCS%"
|
||||
COPY /Y /V "Changes.txt" "%DOCS%"
|
||||
@ -111,9 +118,9 @@ SET "FAVORITES=%TEMP_NAME%\Favorites"
|
||||
IF NOT EXIST "%FAVORITES%" MD "%FAVORITES%"
|
||||
|
||||
PUSHD "%TEMP_NAME%"
|
||||
"%SEVENZIP%" a -tzip -mcu=on -mx=7^
|
||||
"%ZIP_NAME%.zip" "License.txt" "Notepad3.exe" "Notepad3.ini" "grepWinLicense.txt" "Readme.txt"^
|
||||
"Favorites" "minipath.exe" "minipath.ini" "grepWinNP3.exe" "np3encrypt.exe" "lng" "Themes" "Docs">NUL
|
||||
"%SEVENZIP%" a -tzip -mcu=on -mx=9^
|
||||
"%ZIP_NAME%.zip" "License.txt" "Notepad3.exe" "Notepad3.ini" "Readme.txt"^
|
||||
"Favorites" "minipath.exe" "minipath.ini" "np3encrypt.exe" "grepWin" "lng" "Themes" "Docs">NUL
|
||||
IF %ERRORLEVEL% NEQ 0 CALL :SUBMSG "ERROR" "Compilation failed!"
|
||||
|
||||
CALL :SUBMSG "INFO" "%ZIP_NAME%.zip created successfully!"
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@ -43,7 +43,7 @@ NOTEPAD3_PORTABLE_SETTINGS=%PAL:DataDir%\settings
|
||||
|
||||
[RegistryKeys]
|
||||
;This section allows you to backup and restore a given key and the keys below it within the registry. Any existing data in the same location will be backed up before the app is run and restored on exit. The portable app's data will be stored in a .reg key with the name at the beginning of each line within the Data directory. It's best to take as little of the registry as possible. In our example, taking the whole ExamplePublisher section isn't necessary because all our app's data is stored within AppName. If we took ExamplePublisher, we might run into problems with other apps from the same publisher.
|
||||
AppName=HKCU\Software\ExamplePublisher\AppName
|
||||
;AppName=HKCU\Software\ExamplePublisher\AppName
|
||||
;If there is some data in the registry that the app creates but does not need to be saved between sessions of the portable app, it can be handled using a - instead of a name for a .reg file as follows:
|
||||
;-=HKCU\Software\ExamplePublisher\GarbageData
|
||||
|
||||
|
||||
@ -1,30 +0,0 @@
|
||||
[Format]
|
||||
Type=PortableAppsFormat
|
||||
Version=3.9
|
||||
[Details]
|
||||
Name=Notepad3Portable
|
||||
AppId=Notepad3Portable
|
||||
BaseAppName=Notepad3
|
||||
Publisher=Notepad3 Contibutors & Rizonesoft & PortableApps.com
|
||||
Homepage=PortableApps.com/Notepad3Portable
|
||||
Category=Development
|
||||
Description=A Lightweight Universal Text Editor
|
||||
Language=Multilingual
|
||||
[License]
|
||||
Shareable=true
|
||||
OpenSource=true
|
||||
Freeware=true
|
||||
CommercialUse=true
|
||||
[SpecialPaths]
|
||||
Plugins=NONE
|
||||
[Dependencies]
|
||||
UsesJava=false
|
||||
UsesDotNetVersion=false
|
||||
[Version]
|
||||
PackageVersion=7.26.404.1
|
||||
DisplayVersion=7.26.404.1
|
||||
[Control]
|
||||
Icons=1
|
||||
Start=Notepad3Portable.exe
|
||||
[Associations]
|
||||
FileTypes=txt,html,htm,xmp,php,asp,css,js,vb,vbs,c,cpp,h,rs,mak,java,pas,inc,bat,diff,ps1,ahk,au3,avs,cmake,iss,latex,lua,nsi,nsh,nfo,tcl,rb
|
||||
@ -7,7 +7,7 @@ Version=3.9
|
||||
Name=Notepad3PortablexxxDEVNAMExxx
|
||||
AppId=Notepad3Portable
|
||||
BaseAppName=Notepad3
|
||||
Publisher=Notepad3 Contibutors & Rizonesoft & PortableApps.com
|
||||
Publisher=Notepad3 Contributors & Rizonesoft & PortableApps.com
|
||||
Homepage=PortableApps.com/Notepad3Portable
|
||||
Category=Development
|
||||
Description=A Lightweight Universal Text Editor
|
||||
|
||||
@ -1,42 +0,0 @@
|
||||
[CheckRunning]
|
||||
[Source]
|
||||
IncludeInstallerSource=false
|
||||
[MainDirectories]
|
||||
RemoveAppDirectory=true
|
||||
RemoveDataDirectory=false
|
||||
RemoveOtherDirectory=true
|
||||
[OptionalComponents]
|
||||
[CopyLocalFiles]
|
||||
[DownloadFiles]
|
||||
[Languages]
|
||||
ENGLISH=true
|
||||
ENGLISHGB=true
|
||||
AFRIKAANS=true
|
||||
BELARUSIAN=true
|
||||
DUTCH=true
|
||||
FINNISH=true
|
||||
FRENCH=true
|
||||
GERMAN=true
|
||||
GREEK=true
|
||||
HINDI=true
|
||||
HUNGARIAN=true
|
||||
INDONESIAN=true
|
||||
ITALIAN=true
|
||||
JAPANESE=true
|
||||
KOREAN=true
|
||||
POLISH=true
|
||||
PORTUGUESE=true
|
||||
PORTUGUESEBR=true
|
||||
RUSSIAN=true
|
||||
SIMPCHINESE=true
|
||||
SLOVAK=true
|
||||
SPANISH=true
|
||||
SPANISHINTERNATIONAL=true
|
||||
SWEDISH=true
|
||||
TRADCHINESE=true
|
||||
TURKISH=true
|
||||
VIETNAMESE=true
|
||||
[DirectoriesToPreserve]
|
||||
[DirectoriesToRemove]
|
||||
[FilesToPreserve]
|
||||
[FilesToRemove]
|
||||
@ -1,82 +0,0 @@
|
||||
;Copyright 2004-2016 John T. Haller of PortableApps.com
|
||||
;encoding: UTF-8
|
||||
|
||||
;Website: https://PortableApps.com/Notepad3Portable
|
||||
|
||||
;This software is OSI Certified Open Source Software.
|
||||
;OSI Certified is a certification mark of the Open Source Initiative.
|
||||
|
||||
;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.
|
||||
|
||||
;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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
!define PORTABLEAPPNAME "Notepad3, Portable Edition"
|
||||
!define NamePortable "Notepad3, Portable Edition"
|
||||
!define APPNAME "Notepad3"
|
||||
!define NAME "Notepad3Portable"
|
||||
!define AppID "Notepad3Portable"
|
||||
!define VER "5.18.1108.1350"
|
||||
!define WEBSITE "PortableApps.com/Notepad3Portable"
|
||||
!define DEFAULTEXE "Notepad3.exe"
|
||||
!define DEFAULTAPPDIR "Notepad3"
|
||||
!define LAUNCHERLANGUAGE "English"
|
||||
|
||||
;=== Program Details
|
||||
Name "${PORTABLEAPPNAME}"
|
||||
OutFile "${DEFAULTEXE}"
|
||||
Caption "${PORTABLEAPPNAME} | PortableApps.com"
|
||||
VIProductVersion "${VER}"
|
||||
VIAddVersionKey ProductName "${PORTABLEAPPNAME}"
|
||||
VIAddVersionKey Comments "A notepad replacement"
|
||||
VIAddVersionKey CompanyName "Rizonesoft"
|
||||
VIAddVersionKey LegalCopyright "Derick Payne"
|
||||
VIAddVersionKey FileDescription "Based on code from Notepad2, Florian Balmer© 1996-2011"
|
||||
VIAddVersionKey FileVersion "${VER}"
|
||||
VIAddVersionKey ProductVersion "${VER}"
|
||||
VIAddVersionKey InternalName "${PORTABLEAPPNAME}"
|
||||
VIAddVersionKey LegalTrademarks "Rizonesoft © 2008-2026"
|
||||
VIAddVersionKey OriginalFilename "${DEFAULTEXE}"
|
||||
;VIAddVersionKey PrivateBuild ""
|
||||
;VIAddVersionKey SpecialBuild ""
|
||||
|
||||
;=== Runtime Switches
|
||||
CRCCheck On
|
||||
WindowIcon Off
|
||||
SilentInstall Silent
|
||||
AutoCloseWindow True
|
||||
RequestExecutionLevel user
|
||||
XPStyle on
|
||||
Unicode true
|
||||
|
||||
; Best Compression
|
||||
SetCompress Auto
|
||||
SetCompressor /SOLID lzma
|
||||
SetCompressorDictSize 32
|
||||
SetDatablockOptimize On
|
||||
|
||||
;=== Include
|
||||
;(Standard NSIS)
|
||||
|
||||
;=== Program Icon
|
||||
Icon "..\..\App\AppInfo\appicon.ico"
|
||||
|
||||
;=== Icon & Stye ===
|
||||
BrandingText "Rizonesoft©"
|
||||
|
||||
;=== Languages
|
||||
LoadLanguageFile "${NSISDIR}\Contrib\Language files\${LAUNCHERLANGUAGE}.nlf"
|
||||
!include PortableApps.comLauncherLANG_${LAUNCHERLANGUAGE}.nsh
|
||||
|
||||
Section "Main"
|
||||
MessageBox MB_OK|MB_ICONINFORMATION "Notepad3.exe is running and will close when you click OK."
|
||||
SectionEnd
|
||||
@ -131,7 +131,7 @@
|
||||
|
||||
<h2 class="tagline">A Lightweight Universal Text Editor</h2>
|
||||
|
||||
<p><img src="App\AppInfo\appicon_128.png" width="128" height="128" style="float:right;">Notepad3 Portable version is [Notepad3Portable_6.24.xxx.x_zzzz.paf.exe]. It's packaged with a PortableApps.com launcher as a <a href="https://portableapps.com/about/what_is_a_portable_app">portable app</a>, so you can use it from a cloud folder, portable drive, or local folder without needing to install it on each PC. <a href="https://rizonesoft.com/downloads/notepad3/">Learn more about Notepad3Portable...</a></p>
|
||||
<p><img src="App\AppInfo\appicon_128.png" width="128" height="128" style="float:right;">Notepad3 Portable is packaged with a PortableApps.com launcher as a <a href="https://portableapps.com/about/what_is_a_portable_app">portable app</a>, so you can use it from a cloud folder, portable drive, or local folder without needing to install it on each PC. <a href="https://rizonesoft.com/downloads/notepad3/">Learn more about Notepad3Portable...</a></p>
|
||||
|
||||
<p><a href="https://portableapps.com/donate"><img src="Other/Help/Images/Donation_Button.png" style="vertical-align:middle" alt="Make a Donation"></a> - Support PortableApps.com's Hosting and Development</p>
|
||||
|
||||
|
||||
@ -4,18 +4,22 @@ setlocal enableextensions
|
||||
chcp 65001 >nul 2>&1
|
||||
|
||||
:: ===================================================================================================
|
||||
:: PortableApps.com's (https://portableapps.com/development)
|
||||
:: PortableApps.com's (https://portableapps.com/development)
|
||||
::
|
||||
:: This "build_np3portableapp.cmd" batch file creates:
|
||||
:: This "build_np3portableapp.cmd" batch file creates:
|
||||
:: - "Notepad3Portable_x.xx.xxx.x_zzzz.paf.exe"
|
||||
:: - "Notepad3Portable_x.xx.xxx.x_zzzz.paf.exe.7z"
|
||||
::
|
||||
:: Usage: build_np3portableapp.cmd [PortableAppsDir]
|
||||
:: PortableAppsDir — optional path to the PortableApps platform root
|
||||
:: (auto-detected if omitted)
|
||||
::
|
||||
:: ---------------------------------------------------------------------------------------------------
|
||||
:: Based on PortableApps.com's Application_Template:
|
||||
:: (https://sourceforge.net/projects/portableapps/files/PortableApps.com%20Template/PortableApps.com_Application_Template_3.9.0.zip)
|
||||
:: ---------------------------------------------------------------------------------------------------
|
||||
::
|
||||
:: Prerequisites: (portable) intallation of:
|
||||
:: Prerequisites: (portable) installation of:
|
||||
:: -----------------------------------------
|
||||
:: + PortableApps.com Launcher (https://portableapps.com/apps/development/portableapps.com_launcher)
|
||||
:: (needed to create the Notepad3Portable.exe Launcher from the sources)
|
||||
@ -24,31 +28,88 @@ chcp 65001 >nul 2>&1
|
||||
::
|
||||
:: ===================================================================================================
|
||||
|
||||
set NP3_LANGUAGE_SET=af-ZA be-BY de-DE el-GR en-GB es-ES fi-FI fr-FR hi-IN hu-HU id-ID it-IT ja-JP ko-KR nl-NL pl-PL pt-BR pt-PT ru-RU sk-SK sv-SE tr-TR vi-VN zh-CN zh-TW
|
||||
|
||||
:: ===================================================================================================
|
||||
|
||||
:: --- Environment ---
|
||||
if exist %~d0\PortableApps\PortableApps.comInstaller\ (
|
||||
set PORTAPP_ROOT_DIR=%~d0\PortableApps
|
||||
) else (
|
||||
if exist %~d0\Rizonesoft\PortableApps\PortableApps\PortableApps.comInstaller\ (
|
||||
set PORTAPP_ROOT_DIR=%~d0\Rizonesoft\PortableApps\PortableApps
|
||||
) else (
|
||||
echo. "Can't find PortableApps Platform!"
|
||||
goto :END
|
||||
)
|
||||
)
|
||||
|
||||
echo.
|
||||
echo === Notepad3 PortableApps Package Builder ===
|
||||
echo.
|
||||
|
||||
set SCRIPT_DIR=%~dp0
|
||||
|
||||
:: Accept optional PortableApps dir from command line, otherwise auto-detect
|
||||
if not "%~1"=="" (
|
||||
if exist "%~1\PortableApps.comInstaller\" set "PORTAPP_ROOT_DIR=%~1" && goto :PORTAPP_FOUND
|
||||
echo [ERROR] Specified PortableApps dir not found: %~1
|
||||
exit /b 1
|
||||
)
|
||||
if exist %~d0\PortableApps\PortableApps.comInstaller\ set "PORTAPP_ROOT_DIR=%~d0\PortableApps" && goto :PORTAPP_FOUND
|
||||
if exist %~d0\Rizonesoft\PortableApps\PortableApps\PortableApps.comInstaller\ set "PORTAPP_ROOT_DIR=%~d0\Rizonesoft\PortableApps\PortableApps" && goto :PORTAPP_FOUND
|
||||
echo [ERROR] Can't find PortableApps Platform!
|
||||
echo Provide the path as argument: %~nx0 [PortableAppsDir]
|
||||
exit /b 1
|
||||
|
||||
:PORTAPP_FOUND
|
||||
|
||||
echo --- PortableApps Platform: %PORTAPP_ROOT_DIR%
|
||||
|
||||
set PORTAPP_LAUNCHER_CREATOR=%PORTAPP_ROOT_DIR%\PortableApps.comLauncher\PortableApps.comLauncherGenerator.exe
|
||||
set PORTAPP_INSTALLER_CREATOR=%PORTAPP_ROOT_DIR%\PortableApps.comInstaller\PortableApps.comInstaller.exe
|
||||
|
||||
if not exist "%PORTAPP_LAUNCHER_CREATOR%" (
|
||||
echo [ERROR] Launcher generator not found: %PORTAPP_LAUNCHER_CREATOR%
|
||||
exit /b 1
|
||||
)
|
||||
if not exist "%PORTAPP_INSTALLER_CREATOR%" (
|
||||
echo [ERROR] Installer creator not found: %PORTAPP_INSTALLER_CREATOR%
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
call :RESOLVEPATH NP3_DISTRIB_DIR %SCRIPT_DIR%..\Build
|
||||
call :RESOLVEPATH NP3_DOC_DIR %SCRIPT_DIR%..\Build\Docs
|
||||
call :RESOLVEPATH NP3_BUILD_SCHEMES_DIR %SCRIPT_DIR%..\Build\Themes
|
||||
call :RESOLVEPATH NP3_WIN32_DIR %SCRIPT_DIR%..\Bin\Release_x86_v145
|
||||
call :RESOLVEPATH NP3_X64_DIR %SCRIPT_DIR%..\Bin\Release_x64_v145
|
||||
|
||||
:: --- Auto-detect PlatformToolset from build output ---
|
||||
set NP3_TOOLSET=
|
||||
for /f "delims=" %%d in ('dir /b /ad "%SCRIPT_DIR%..\Bin\Release_x64_v*" 2^>nul') do (
|
||||
for /f "tokens=3 delims=_" %%t in ("%%d") do set NP3_TOOLSET=%%t
|
||||
)
|
||||
if not defined NP3_TOOLSET (
|
||||
echo [ERROR] No build output found in Bin\Release_x64_v*
|
||||
echo Build Notepad3 first - x64 and Win32 Release.
|
||||
exit /b 1
|
||||
)
|
||||
echo --- Detected PlatformToolset: %NP3_TOOLSET%
|
||||
|
||||
call :RESOLVEPATH NP3_WIN32_DIR %SCRIPT_DIR%..\Bin\Release_x86_%NP3_TOOLSET%
|
||||
call :RESOLVEPATH NP3_X64_DIR %SCRIPT_DIR%..\Bin\Release_x64_%NP3_TOOLSET%
|
||||
|
||||
:: Verify build outputs exist
|
||||
if not exist "%NP3_WIN32_DIR%\Notepad3.exe" (
|
||||
echo [ERROR] x86 build output not found: %NP3_WIN32_DIR%\Notepad3.exe
|
||||
exit /b 1
|
||||
)
|
||||
if not exist "%NP3_X64_DIR%\Notepad3.exe" (
|
||||
echo [ERROR] x64 build output not found: %NP3_X64_DIR%\Notepad3.exe
|
||||
exit /b 1
|
||||
)
|
||||
if not exist "%NP3_WIN32_DIR%\minipath.exe" (
|
||||
echo [ERROR] x86 minipath not found: %NP3_WIN32_DIR%\minipath.exe
|
||||
exit /b 1
|
||||
)
|
||||
if not exist "%NP3_X64_DIR%\minipath.exe" (
|
||||
echo [ERROR] x64 minipath not found: %NP3_X64_DIR%\minipath.exe
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
:: --- Auto-detect available language locales from build output ---
|
||||
set "NP3_LANGUAGE_SET="
|
||||
for /f "delims=" %%d in ('dir /b /ad "%NP3_X64_DIR%\lng" 2^>nul ^| findstr /r "^[a-z][a-z]-[A-Z][A-Z]$"') do call set "NP3_LANGUAGE_SET=%%NP3_LANGUAGE_SET%% %%d"
|
||||
if not defined NP3_LANGUAGE_SET (
|
||||
echo [ERROR] No locale directories found in %NP3_X64_DIR%\lng
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
rem - We will rely on PortableApps Platform installed grepWinPortable
|
||||
rem ~ call :RESOLVEPATH GREPWIN_DIR %SCRIPT_DIR%..\grepWin
|
||||
@ -62,6 +123,10 @@ call :RESOLVEPATH NP3_BUILD_NAME %SCRIPT_DIR%_buildname.txt
|
||||
|
||||
|
||||
:: ---------------------------------------------------------------------------------------------------
|
||||
:: Step 1: Determine version
|
||||
:: ---------------------------------------------------------------------------------------------------
|
||||
echo.
|
||||
echo --- Step 1: Determine Version ---
|
||||
|
||||
set YY=00
|
||||
set MM=00
|
||||
@ -78,14 +143,16 @@ set FILEVER=
|
||||
call :GETFILEVER "%NP3_WIN32_DIR%\Notepad3.exe"
|
||||
if defined FILEVER set VERSION=%FILEVER%
|
||||
|
||||
::echo.VERSION=%VERSION%
|
||||
::pause
|
||||
::goto :END
|
||||
echo --- Version: %VERSION%
|
||||
echo --- DevName: "%DEVNAME%"
|
||||
|
||||
:: ---------------------------------------------------------------------------------------------------
|
||||
:: Step 2: Clean previous build artifacts
|
||||
:: ---------------------------------------------------------------------------------------------------
|
||||
echo.
|
||||
echo --- Step 2: Clean Previous Build ---
|
||||
|
||||
:: --- Prepare Build ---
|
||||
del /f /q "Notepad3Portable_*.paf.exe*"
|
||||
del /f /q "Notepad3Portable_*.paf.exe*" 2>nul
|
||||
|
||||
if exist "%NP3_PORTAPP_DIR%\Data" rmdir "%NP3_PORTAPP_DIR%\Data" /S /Q
|
||||
|
||||
@ -100,30 +167,35 @@ rem ~if exist "%NP3_PORTAPP_DIR%\App\Notepad3\x64\grepWin" rmdir "%NP3_PORTAPP_D
|
||||
if not exist "%NP3_PORTAPP_DIR%\App\DefaultData\settings\" (
|
||||
mkdir "%NP3_PORTAPP_DIR%\App\DefaultData\settings\"
|
||||
) else (
|
||||
del /s /f /q "%NP3_PORTAPP_DIR%\App\DefaultData\settings\*.*"
|
||||
del /s /f /q "%NP3_PORTAPP_DIR%\App\DefaultData\settings\*.*" >nul 2>&1
|
||||
)
|
||||
|
||||
if not exist "%NP3_PORTAPP_DIR%\App\Notepad3\Docs\" (
|
||||
mkdir "%NP3_PORTAPP_DIR%\App\Notepad3\Docs\"
|
||||
) else (
|
||||
del /s /f /q "%NP3_PORTAPP_DIR%\App\Notepad3\Docs\*.*"
|
||||
del /s /f /q "%NP3_PORTAPP_DIR%\App\Notepad3\Docs\*.*" >nul 2>&1
|
||||
)
|
||||
|
||||
if not exist "%NP3_PORTAPP_DIR%\App\Notepad3\Docs\crypto\" (
|
||||
mkdir "%NP3_PORTAPP_DIR%\App\Notepad3\Docs\crypto\"
|
||||
) else (
|
||||
del /s /f /q "%NP3_PORTAPP_DIR%\App\Notepad3\Docs\crypto\*.*"
|
||||
del /s /f /q "%NP3_PORTAPP_DIR%\App\Notepad3\Docs\crypto\*.*" >nul 2>&1
|
||||
)
|
||||
|
||||
if not exist "%NP3_PORTAPP_DIR%\App\Notepad3\Docs\uthash\" (
|
||||
mkdir "%NP3_PORTAPP_DIR%\App\Notepad3\Docs\uthash\"
|
||||
) else (
|
||||
del /s /f /q "%NP3_PORTAPP_DIR%\App\Notepad3\Docs\uthash\*.*"
|
||||
del /s /f /q "%NP3_PORTAPP_DIR%\App\Notepad3\Docs\uthash\*.*" >nul 2>&1
|
||||
)
|
||||
|
||||
:: ---------------------------------------------------------------------------------------------------
|
||||
echo Done.
|
||||
|
||||
:: ---------------------------------------------------------------------------------------------------
|
||||
:: Step 3: Copy documentation files
|
||||
:: ---------------------------------------------------------------------------------------------------
|
||||
echo.
|
||||
echo --- Step 3: Copy Docs ---
|
||||
|
||||
:: Copy all current "Docs" files
|
||||
copy "%NP3_DISTRIB_DIR%\Changes.txt" "%NP3_PORTAPP_DIR%\App\Notepad3\Docs\Changes.txt" /Y /V
|
||||
copy "%SCRIPT_DIR%..\License.txt" "%NP3_PORTAPP_DIR%\App\Notepad3\Docs\License.txt" /Y /V
|
||||
copy "%SCRIPT_DIR%..\Readme.txt" "%NP3_PORTAPP_DIR%\App\Notepad3\Docs\Readme.txt" /Y /V
|
||||
@ -131,36 +203,50 @@ copy "%NP3_DOC_DIR%\*.txt" "%NP3_PORTAPP_DIR%\App\Notepad3\Docs\*.txt" /Y /V
|
||||
copy "%NP3_DOC_DIR%\crypto\*.txt" "%NP3_PORTAPP_DIR%\App\Notepad3\Docs\crypto\*.txt" /Y /V
|
||||
copy "%NP3_DOC_DIR%\uthash\*.txt" "%NP3_PORTAPP_DIR%\App\Notepad3\Docs\uthash\*.txt" /Y /V
|
||||
|
||||
:: Copy all current "Notepad3.exe" and "MiniPath.exe" files
|
||||
:: ---------------------------------------------------------------------------------------------------
|
||||
:: Step 4: Copy binaries (Notepad3.exe, minipath.exe)
|
||||
:: ---------------------------------------------------------------------------------------------------
|
||||
echo.
|
||||
echo --- Step 4: Copy Binaries ---
|
||||
|
||||
copy /B "%NP3_WIN32_DIR%\Notepad3.exe" /B "%NP3_PORTAPP_DIR%\App\Notepad3\x86\" /Y /V
|
||||
copy /B "%NP3_X64_DIR%\Notepad3.exe" /B "%NP3_PORTAPP_DIR%\App\Notepad3\x64\" /Y /V
|
||||
copy /B "%NP3_WIN32_DIR%\minipath.exe" /B "%NP3_PORTAPP_DIR%\App\Notepad3\x86\" /Y /V
|
||||
copy /B "%NP3_X64_DIR%\minipath.exe" /B "%NP3_PORTAPP_DIR%\App\Notepad3\x64\" /Y /V
|
||||
|
||||
:: Copy all current ".ini" files
|
||||
:: ---------------------------------------------------------------------------------------------------
|
||||
:: Step 5: Copy INI and Themes
|
||||
:: ---------------------------------------------------------------------------------------------------
|
||||
echo.
|
||||
echo --- Step 5: Copy INI and Themes ---
|
||||
|
||||
copy "%NP3_DISTRIB_DIR%\Notepad3_pap.ini" "%NP3_PORTAPP_DIR%\App\DefaultData\settings\Notepad3.ini" /Y /V
|
||||
copy "%NP3_DISTRIB_DIR%\minipath.ini" "%NP3_PORTAPP_DIR%\App\DefaultData\settings\minipath.ini" /Y /V
|
||||
|
||||
:: Copy all current "Themes" files
|
||||
del /s /f /q "%NP3_PORTAPP_DIR%\App\DefaultData\settings\Themes\*.*"
|
||||
del /s /f /q "%NP3_PORTAPP_DIR%\App\DefaultData\settings\Themes\*.*" 2>nul
|
||||
xcopy "%NP3_BUILD_SCHEMES_DIR%" "%NP3_PORTAPP_DIR%\App\DefaultData\settings\Themes" /C /V /I /S /Y
|
||||
|
||||
:: Copy all current "lng" files
|
||||
:: ---------------------------------------------------------------------------------------------------
|
||||
:: Step 6: Copy language files
|
||||
:: ---------------------------------------------------------------------------------------------------
|
||||
echo.
|
||||
echo --- Step 6: Copy Language Files ---
|
||||
|
||||
for /d %%d in (%NP3_LANGUAGE_SET%) do (
|
||||
mkdir "%NP3_PORTAPP_DIR%\App\Notepad3\x86\lng\%%d"
|
||||
mkdir "%NP3_PORTAPP_DIR%\App\Notepad3\x86\lng\%%d" 2>nul
|
||||
copy /B "%NP3_WIN32_DIR%\lng\%%d\*" /B "%NP3_PORTAPP_DIR%\App\Notepad3\x86\lng\%%d\" /Y /V
|
||||
)
|
||||
copy /B "%NP3_WIN32_DIR%\lng\np3lng.dll" /B "%NP3_PORTAPP_DIR%\App\Notepad3\x86\lng\" /Y /V
|
||||
copy /B "%NP3_WIN32_DIR%\lng\mplng.dll" /B "%NP3_PORTAPP_DIR%\App\Notepad3\x86\lng\" /Y /V
|
||||
|
||||
for /d %%d in (%NP3_LANGUAGE_SET%) do (
|
||||
mkdir "%NP3_PORTAPP_DIR%\App\Notepad3\x64\lng\%%d"
|
||||
mkdir "%NP3_PORTAPP_DIR%\App\Notepad3\x64\lng\%%d" 2>nul
|
||||
copy /B "%NP3_X64_DIR%\lng\%%d\*" /B "%NP3_PORTAPP_DIR%\App\Notepad3\x64\lng\%%d\" /Y /V
|
||||
)
|
||||
)
|
||||
copy /B "%NP3_X64_DIR%\lng\np3lng.dll" /B "%NP3_PORTAPP_DIR%\App\Notepad3\x64\lng\" /Y /V
|
||||
copy /B "%NP3_X64_DIR%\lng\mplng.dll" /B "%NP3_PORTAPP_DIR%\App\Notepad3\x64\lng\" /Y /V
|
||||
|
||||
:: Don't copy np3encrypt or grepWin
|
||||
:: Don't copy np3encrypt or grepWin
|
||||
rem ~if not exist "%NP3_PORTAPP_DIR%\App\Notepad3\x86\grepWin\" mkdir "%NP3_PORTAPP_DIR%\App\Notepad3\x86\grepWin"
|
||||
rem ~copy "%GREPWIN_DIR%\portables\grepWin-x86_portable.exe" "%NP3_PORTAPP_DIR%\App\Notepad3\x86\grepWin\grepWin-x86_portable.exe" /Y /V
|
||||
rem ~copy "%GREPWIN_DIR%\portables\LICENSE.txt" "%NP3_PORTAPP_DIR%\App\Notepad3\x86\grepWin\LICENSE.txt" /Y /V
|
||||
@ -176,41 +262,95 @@ rem ~copy "%GREPWIN_DIR%\translations\*.lang" "%NP3_PORTAPP_DIR%\App\Notepad3\x6
|
||||
rem ~copy /B "%NP3_X64_DIR%\np3encrypt.exe" /B "%NP3_PORTAPP_DIR%\App\Notepad3\x64\" /Y /V
|
||||
|
||||
:: ---------------------------------------------------------------------------------------------------
|
||||
:: Step 7: Process INI templates (appinfo.ini, installer.ini)
|
||||
:: ---------------------------------------------------------------------------------------------------
|
||||
echo.
|
||||
echo --- Step 7: Generate appinfo.ini and installer.ini from Templates ---
|
||||
|
||||
call :REPLACE "xxxVERSIONxxx" "%NP3_PORTAPP_INFO%_template.ini" "%VERSION%" "%NP3_PORTAPP_INFO%_tmp.ini"
|
||||
|
||||
call :REPLACE "xxxDEVNAMExxx" "%NP3_PORTAPP_INFO%_tmp.ini" "%DEVNAME%" "%NP3_PORTAPP_INFO%.ini"
|
||||
|
||||
:: installer_template.ini has no xxxDEVNAMExxx placeholder — this call strips
|
||||
:: comment lines (;...) and blank lines via for /f defaults, producing a clean INI.
|
||||
call :REPLACE "xxxDEVNAMExxx" "%NP3_PORTAPP_INSTALL%_template.ini" "" "%NP3_PORTAPP_INSTALL%.ini"
|
||||
|
||||
del /f /q "%NP3_PORTAPP_INFO%_tmp.ini"
|
||||
|
||||
:: ---------------------------------------------------------------------------------------------------
|
||||
echo PackageVersion = %VERSION%
|
||||
echo DisplayVersion = %VERSION%%DEVNAME%
|
||||
|
||||
:: --- build Launcher and Installer Package ---
|
||||
:: ---------------------------------------------------------------------------------------------------
|
||||
:: Step 8: Select splash image for dev vs release builds
|
||||
:: ---------------------------------------------------------------------------------------------------
|
||||
if defined DEVNAME (
|
||||
if not "%DEVNAME%"=="" (
|
||||
echo.
|
||||
echo --- Step 8: Selecting Dev Splash Image ---
|
||||
if exist "%NP3_PORTAPP_DIR%\App\AppInfo\Launcher\Dev_Splash.jpg" (
|
||||
copy /Y "%NP3_PORTAPP_DIR%\App\AppInfo\Launcher\Dev_Splash.jpg" "%NP3_PORTAPP_DIR%\App\AppInfo\Launcher\Splash.jpg" >nul
|
||||
echo Using Dev_Splash.jpg for development build.
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
:: ---------------------------------------------------------------------------------------------------
|
||||
:: Step 9: Build Launcher and Installer Package
|
||||
:: ---------------------------------------------------------------------------------------------------
|
||||
echo.
|
||||
echo --- Step 9: Build Launcher ---
|
||||
|
||||
:: - build Launcher -
|
||||
"%PORTAPP_LAUNCHER_CREATOR%" "%NP3_PORTAPP_DIR%"
|
||||
if errorlevel 1 (
|
||||
echo [ERROR] PortableApps.com Launcher Generator failed!
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
:: Signing "Notepad3Portable.exe" (".exe" file is created by "Launcher")
|
||||
:: call %SCRIPT_DIR%Signing_for_NP3P_1st_EXE.cmd
|
||||
|
||||
echo.
|
||||
echo --- Step 10: Build Installer Package ---
|
||||
|
||||
:: - build Installer -
|
||||
"%PORTAPP_INSTALLER_CREATOR%" "%NP3_PORTAPP_DIR%"
|
||||
if errorlevel 1 (
|
||||
echo [ERROR] PortableApps.com Installer failed!
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
:: Signing "Notepad3Portable_x.xx.xxx.x_zzzz.paf.exe" (".paf.exe" file is created by "Installer")
|
||||
:: call %SCRIPT_DIR%Signing_for_NP3P_2nd_EXE.cmd
|
||||
|
||||
:: Creation of a "7-Zip" file by appending the extension ".7z"
|
||||
:: ---------------------------------------------------------------------------------------------------
|
||||
:: Step 11: Create .7z copy and report result
|
||||
:: ---------------------------------------------------------------------------------------------------
|
||||
echo.
|
||||
echo --- Step 11: Finalize ---
|
||||
|
||||
set Notepad3Portable.paf.exe=%SCRIPT_DIR%Notepad3Portable_%VERSION%%DEVNAME%.paf.exe
|
||||
if exist %Notepad3Portable.paf.exe% (
|
||||
copy /B %Notepad3Portable.paf.exe% %Notepad3Portable.paf.exe%.7z /Y /V
|
||||
echo.
|
||||
echo === PortableApps Package Built Successfully! ===
|
||||
echo Output: %Notepad3Portable.paf.exe%
|
||||
) else (
|
||||
echo. "Notepad3Portable_x.xx.xxx.x_yyyy.paf.exe" does not exist!
|
||||
echo [ERROR] Expected output not found: Notepad3Portable_%VERSION%%DEVNAME%.paf.exe
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
:: ===================================================================================================
|
||||
goto :END
|
||||
:: REPLACE strg(%1) srcfile(%2) replstrg(%3) dstfile(%4)
|
||||
|
||||
:: ---------------------------------------------------------------------------------------------------
|
||||
:: REPLACE strg(%1) srcfile(%2) replstrg(%3) dstfile(%4)
|
||||
::
|
||||
:: Performs string replacement AND strips comment lines (lines starting with ;)
|
||||
:: and blank lines from the source file. This is an intentional side-effect of
|
||||
:: for /f's default eol=; and empty-line-skipping behavior, used to produce
|
||||
:: clean INI output from commented template files.
|
||||
:: ---------------------------------------------------------------------------------------------------
|
||||
:REPLACE
|
||||
if exist "%~4" del /F /Q "%~4"
|
||||
type NUL > "%~4"
|
||||
@ -224,29 +364,23 @@ goto :END
|
||||
goto :EOF
|
||||
:: ---------------------------------------------------------------------------------------------------
|
||||
|
||||
:: Uses PowerShell to get the current date (avoids deprecated wmic)
|
||||
: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%"
|
||||
for /f %%a in ('powershell -NoProfile -Command "Get-Date -Format yy"') do set "YY=%%a"
|
||||
for /f %%a in ('powershell -NoProfile -Command "Get-Date -Format MM"') do set "MM=%%a"
|
||||
for /f %%a in ('powershell -NoProfile -Command "Get-Date -Format dd"') do set "DD=%%a"
|
||||
goto :EOF
|
||||
:: ---------------------------------------------------------------------------------------------------
|
||||
|
||||
:: Uses PowerShell to get file version (avoids deprecated wmic datafile)
|
||||
:: Note: usebackq lets us use backticks for command delimiters, avoiding
|
||||
:: conflict between for /f's single-quote delimiters and PowerShell quotes.
|
||||
: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%
|
||||
for /f "usebackq delims=" %%a in (`powershell -NoProfile -Command "(Get-Item '%file%').VersionInfo.FileVersion.Trim()"`) do set "FILEVER=%%a"
|
||||
goto :EOF
|
||||
:: ---------------------------------------------------------------------------------------------------
|
||||
|
||||
@ -266,7 +400,7 @@ rem Return: Resolved absolute path.
|
||||
set %1=%~dpfn2
|
||||
goto :EOF
|
||||
:: ---------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
:: ===================================================================================================
|
||||
:END
|
||||
endlocal
|
||||
|
||||
Loading…
Reference in New Issue
Block a user