Merge pull request #4813 from hpwamr/Mui_Beta

MUI Copy an "Additional Notepad3Portable.cmd Launcher" in PAF file [Root]
This commit is contained in:
Pairi Daiza 2023-05-19 06:56:07 +02:00 committed by GitHub
commit 69f4d5f597
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 42 additions and 16 deletions

View File

@ -6,6 +6,10 @@ RemoveAppDirectory=true
RemoveDataDirectory=false
RemoveOtherDirectory=true
[OptionalComponents]
OptionalComponents=true
OptionalSectionTitle=Additional Notepad3Portable.cmd Launcher
OptionalSectionDescription=Extracts additional launcher for Notepad3
OptionalFile1=Notepad3Portable.cmd
[CopyLocalFiles]
[DownloadFiles]
[Languages]

View File

@ -31,6 +31,10 @@ RemoveOtherDirectory=true
;OptionalSectionInstalledWhenSilent=true
;OptionalDirectory1=
;OptionalFile1=
OptionalComponents=true
OptionalSectionTitle=Additional Notepad3Portable.cmd Launcher
OptionalSectionDescription=Extracts additional launcher for Notepad3
OptionalFile1=Notepad3Portable.cmd
[CopyLocalFiles]
;CopyLocalFiles=true

View File

@ -0,0 +1,24 @@
@echo off
:: Thanks to "Wilenty" for this "Additional Notepad3Portable.cmd Launcher".
If not exist "%~dp0\Data\settings\" (
If exist "%~dp0\App\DefaultData\settings\" (
mkdir "%~dp0\Data\settings"
copy /y "%~dp0\App\DefaultData\settings" "%~dp0\Data\settings" >nul 2>&1
For /f "delims=" %%W in (' dir /b /a:d "%~dp0\App\DefaultData\settings" ') do mkdir "%~dp0\Data\settings\%%~nW"&&copy /y "%~dp0\App\DefaultData\settings\%%~W" "%~dp0\Data\settings\%%~nW" >nul 2>&1
)
)
set ErrorLevel=-1
If exist "%~dp0\Data\settings\" (
set "NOTEPAD3_PORTABLE_SETTINGS=%~dp0\Data\settings"
If exist "%WinDir%\SysNative" (
start "Notepad3 Portable" /b "%~dp0\App\Notepad3\x64\Notepad3.exe" %*
) else (
start "Notepad3 Portable" /b "%~dp0\App\Notepad3\x86\Notepad3.exe" %*
)
)
exit /b %ErrorLevel%

View File

@ -1,6 +1,6 @@
@echo off
:: Thanks to "Wilenty" for this "Alternative Notepad3Portable Launcher".
:: Thanks to "Wilenty" for this "Additional Notepad3Portable.cmd Launcher".
If not exist "%~dp0\Data\settings\" (
If exist "%~dp0\App\DefaultData\settings\" (

View File

@ -1,9 +0,0 @@
#
# Thanks to "jooseng" for this little macro "Custom_Code_Post_Install".
#
!macro CustomCodePostInstall
${If} ${FileExists} "$INSTDIR\Other\Source\Notepad3Portable.cmd"
CopyFiles /SILENT "$INSTDIR\Other\Source\Notepad3Portable.cmd" "$INSTDIR\Notepad3Portable.cmd"
${EndIf}
!macroend

View File

@ -17,8 +17,6 @@ chcp 65001 >nul 2>&1
::
:: Prerequisites: (portable) intallation of:
:: -----------------------------------------
:: + PortableApps.com App Compactor (https://portableapps.com/apps/utilities/appcompactor)
::
:: + PortableApps.com Launcher (https://portableapps.com/apps/development/portableapps.com_launcher)
:: (needed to create the Notepad3Portable.exe Launcher from the sources)
::
@ -31,11 +29,11 @@ set NP3_LANGUAGE_SET=af-ZA be-BY de-DE el-GR en-GB es-ES es-MX fr-FR hi-IN hu-HU
:: ===================================================================================================
:: --- Environment ---
if exist D:\PortableApps\PortableApps.comInstaller\ (
set PORTAPP_ROOT_DIR=D:\PortableApps
if exist %~d0\PortableApps\PortableApps.comInstaller\ (
set PORTAPP_ROOT_DIR=%~d0\PortableApps
) else (
if exist D:\Rizonesoft\PortableApps\PortableApps\PortableApps.comInstaller\ (
set PORTAPP_ROOT_DIR=D:\Rizonesoft\PortableApps\PortableApps
if exist %~d0\Rizonesoft\PortableApps\PortableApps\PortableApps.comInstaller\ (
set PORTAPP_ROOT_DIR=%~d0\Rizonesoft\PortableApps\PortableApps
) else (
goto :END
)
@ -179,6 +177,11 @@ del /f /q "%NP3_PORTAPP_INFO%_tmp.ini"
:: ---------------------------------------------------------------------------------------------------
:: - Copy "Additional Notepad3Portable.cmd Launcher" to "Notepad3Portable PAF [ROOT]" -
if exist "%NP3_PORTAPP_DIR%\Other\Source\Notepad3Portable.cmd" (
copy /B "%NP3_PORTAPP_DIR%\Other\Source\Notepad3Portable.cmd" "%NP3_PORTAPP_DIR%\Notepad3Portable.cmd" /Y /V
)
:: --- build Launcher and Installer Package ---
:: - build Launcher -