mirror of
https://github.com/PhoenixPE/PhoenixPE.git
synced 2025-09-16 18:18:04 +02:00
Remove IniReadEx API command in favor of new IniRead Default= argument
This commit is contained in:
@@ -84,10 +84,10 @@ IniRead,"%ProgramsCache%\%ProgramFolder%\PENetwork.ini","PENetwork","UseProfiles
|
|||||||
If,%PENMini_UseProfiles%,Equal,"Yes",RegWrite,HKLM,0x1,"Tmp_Software\PENetwork","UseProfiles",1
|
If,%PENMini_UseProfiles%,Equal,"Yes",RegWrite,HKLM,0x1,"Tmp_Software\PENetwork","UseProfiles",1
|
||||||
Else,RegWrite,HKLM,0x1,"Tmp_Software\PENetwork","UseProfiles",0
|
Else,RegWrite,HKLM,0x1,"Tmp_Software\PENetwork","UseProfiles",0
|
||||||
|
|
||||||
IniReadEx,"%ProgramsCache%\%ProgramFolder%\PENetwork.ini","PENetwork","StartMode",1,PENMini_StartMode
|
IniRead,"%ProgramsCache%\%ProgramFolder%\PENetwork.ini","PENetwork","StartMode",%PENMini_StartMode%,Default=1
|
||||||
RegWrite,HKLM,0x1,"Tmp_Default\Software\PENetwork","StartMode",%PENMini_StartMode%
|
RegWrite,HKLM,0x1,"Tmp_Default\Software\PENetwork","StartMode",%PENMini_StartMode%
|
||||||
|
|
||||||
IniReadEx,"%ProgramsCache%\%ProgramFolder%\PENetwork.ini","PENetwork","StartToTray",1,PENMini_StartToTray
|
IniRead,"%ProgramsCache%\%ProgramFolder%\PENetwork.ini","PENetwork","StartToTray",%PENMini_StartToTray%,Default=1
|
||||||
RegWrite,HKCU,0x1,"Tmp_Default\Software\PENetwork","StartToTray",%PENMini_StartToTray%
|
RegWrite,HKCU,0x1,"Tmp_Default\Software\PENetwork","StartToTray",%PENMini_StartToTray%
|
||||||
|
|
||||||
// Custom Wireless Config
|
// Custom Wireless Config
|
||||||
|
@@ -79,23 +79,23 @@ If,%PEBakeryVersion%,<,%MinEngineVersion%,Begin
|
|||||||
End
|
End
|
||||||
|
|
||||||
// Pebakery.ini - [Log]
|
// Pebakery.ini - [Log]
|
||||||
IniReadEx,%BaseDir%\PEBakery.ini,Log,DeferredLogging,True,DeferredLogging
|
IniRead,"%BaseDir%\PEBakery.ini","Log","DeferredLogging",%DeferredLogging%,Default=True
|
||||||
|
|
||||||
// PEBakeryCompat.ini - [PEBakeryCompat]
|
// PEBakeryCompat.ini - [PEBakeryCompat]
|
||||||
IniReadEx,%ProjectDir%\PEBakeryCompat.ini,PEBakeryCompat,AsteriskBugDirCopy,False,AsteriskBugDirCopy
|
IniRead,"%ProjectDir%\PEBakeryCompat.ini","PEBakeryCompat","AsteriskBugDirCopy",%AsteriskBugDirCopy%,Default=False
|
||||||
IniReadEx,%ProjectDir%\PEBakeryCompat.ini,PEBakeryCompat,AsteriskBugDirLink,False,AsteriskBugDirLink
|
IniRead,"%ProjectDir%\PEBakeryCompat.ini","PEBakeryCompat","AsteriskBugDirLink",%AsteriskBugDirLink%,Default=False
|
||||||
IniReadEx,%ProjectDir%\PEBakeryCompat.ini,PEBakeryCompat,FileRenameCanMoveDir,False,FileRenameCanMoveDir
|
IniRead,"%ProjectDir%\PEBakeryCompat.ini","PEBakeryCompat","FileRenameCanMoveDir",%FileRenameCanMoveDir%,Default=False
|
||||||
IniReadEx,%ProjectDir%\PEBakeryCompat.ini,PEBakeryCompat,LegacyBranchCondition,False,LegacyBranchCondition
|
IniRead,"%ProjectDir%\PEBakeryCompat.ini","PEBakeryCompat","LegacyBranchCondition",%LegacyBranchCondition%,Default=False
|
||||||
IniReadEx,%ProjectDir%\PEBakeryCompat.ini,PEBakeryCompat,AllowLetterInLoop,False,AllowLetterInLoop
|
IniRead,"%ProjectDir%\PEBakeryCompat.ini","PEBakeryCompat","AllowLetterInLoop",%AllowLetterInLoop%,Default=False
|
||||||
IniReadEx,%ProjectDir%\PEBakeryCompat.ini,PEBakeryCompat,LegacyRegWrite,False,LegacyRegWrite
|
IniRead,"%ProjectDir%\PEBakeryCompat.ini","PEBakeryCompat","LegacyRegWrite",%LegacyRegWrite%,Default=False
|
||||||
IniReadEx,%ProjectDir%\PEBakeryCompat.ini,PEBakeryCompat,AllowSetModifyInterface,False,AllowSetModifyInterface
|
IniRead,"%ProjectDir%\PEBakeryCompat.ini","PEBakeryCompat","AllowSetModifyInterface",%AllowSetModifyInterface%,Default=False
|
||||||
IniReadEx,%ProjectDir%\PEBakeryCompat.ini,PEBakeryCompat,LegacyInterfaceCommand,False,LegacyInterfaceCommand
|
IniRead,"%ProjectDir%\PEBakeryCompat.ini","PEBakeryCompat","LegacyInterfaceCommand",%LegacyInterfaceCommand%,Default=False
|
||||||
IniReadEx,%ProjectDir%\PEBakeryCompat.ini,PEBakeryCompat,LegacySectionParamCommand,False,LegacySectionParamCommand
|
IniRead,"%ProjectDir%\PEBakeryCompat.ini","PEBakeryCompat","LegacySectionParamCommand",%LegacySectionParamCommand%,Default=False
|
||||||
IniReadEx,%ProjectDir%\PEBakeryCompat.ini,PEBakeryCompat,IgnoreWidthOfWebLabel,False,IgnoreWidthOfWebLabel
|
IniRead,"%ProjectDir%\PEBakeryCompat.ini","PEBakeryCompat","IgnoreWidthOfWebLabel",%IgnoreWidthOfWebLabel%,Default=False
|
||||||
IniReadEx,%ProjectDir%\PEBakeryCompat.ini,PEBakeryCompat,OverridableFixedVariables,False,OverridableFixedVariables
|
IniRead,"%ProjectDir%\PEBakeryCompat.ini","PEBakeryCompat","OverridableFixedVariables",%OverridableFixedVariables%,Default=False
|
||||||
IniReadEx,%ProjectDir%\PEBakeryCompat.ini,PEBakeryCompat,EnableEnvironmentVariables,False,EnableEnvironmentVariables
|
IniRead,"%ProjectDir%\PEBakeryCompat.ini","PEBakeryCompat","EnableEnvironmentVariables",%EnableEnvironmentVariables%,Default=False
|
||||||
IniReadEx,%ProjectDir%\PEBakeryCompat.ini,PEBakeryCompat,DisableExtendedSectionParams,False,DisableExtendedSectionParams
|
IniRead,"%ProjectDir%\PEBakeryCompat.ini","PEBakeryCompat","DisableExtendedSectionParams",%DisableExtendedSectionParams%,Default=False
|
||||||
IniReadEx,%ProjectDir%\PEBakeryCompat.ini,PEBakeryCompat,AutoCompactIniWriteCommand,False,AutoCompactIniWriteCommand
|
IniRead,"%ProjectDir%\PEBakeryCompat.ini","PEBakeryCompat","AutoCompactIniWriteCommand",%AutoCompactIniWriteCommand%,Default=False
|
||||||
|
|
||||||
If,%DeferredLogging%,Equal,False,Set,%Message%,"WARNING: Logging --> Delayed Logging is disabled. This can significantly increase build time.#$x#$x"
|
If,%DeferredLogging%,Equal,False,Set,%Message%,"WARNING: Logging --> Delayed Logging is disabled. This can significantly increase build time.#$x#$x"
|
||||||
If,%AsteriskBugDirCopy%,Equal,True,Begin
|
If,%AsteriskBugDirCopy%,Equal,True,Begin
|
||||||
|
@@ -57,7 +57,7 @@ IniRead,%ScriptFile%,"Main","Version",%ScriptVer%
|
|||||||
If,Not,ExistFile,"%RegistryCache%\.Cache",Run,%ScriptFile%,BuildRegistryCache
|
If,Not,ExistFile,"%RegistryCache%\.Cache",Run,%ScriptFile%,BuildRegistryCache
|
||||||
|
|
||||||
// Check for stale cache and rebuild if needed
|
// Check for stale cache and rebuild if needed
|
||||||
IniReadEx,"%RegistryCache%\.Cache","Registry Cache","Version","0.0.0.0",RegCacheVer
|
IniRead,"%RegistryCache%\.Cache","Registry Cache","Version",%RegCacheVer%,"Default=0.0.0.0"
|
||||||
|
|
||||||
If,%RegCacheVer%,Equal,%ScriptVer%,Echo,"Registry Cache: ENABLED (v%RegCacheVer%)"
|
If,%RegCacheVer%,Equal,%ScriptVer%,Echo,"Registry Cache: ENABLED (v%RegCacheVer%)"
|
||||||
Else,Begin
|
Else,Begin
|
||||||
|
@@ -26,7 +26,7 @@ IniRead,%ScriptFile%,"Main","Version",%ScriptVer%
|
|||||||
If,Not,ExistFile,"%ProjectCache%\NetworkDrivers\.Cache",Run,%ScriptFile%,BuildRegistryCache
|
If,Not,ExistFile,"%ProjectCache%\NetworkDrivers\.Cache",Run,%ScriptFile%,BuildRegistryCache
|
||||||
|
|
||||||
// Check for stale cache and rebuild if needed
|
// Check for stale cache and rebuild if needed
|
||||||
IniReadEx,"%ProjectCache%\NetworkDrivers\.Cache","Network Drivers Cache","Version","0.0.0.0",RegCacheVer
|
IniRead,"%ProjectCache%\NetworkDrivers\.Cache","Network Drivers Cache","Version",%RegCacheVer%,"Default=0.0.0.0"
|
||||||
|
|
||||||
If,%RegCacheVer%,Equal,%ScriptVer%,Echo,"Registry Cache: ENABLED (v%RegCacheVer%)"
|
If,%RegCacheVer%,Equal,%ScriptVer%,Echo,"Registry Cache: ENABLED (v%RegCacheVer%)"
|
||||||
Else,Begin
|
Else,Begin
|
||||||
|
@@ -2,14 +2,12 @@
|
|||||||
Title=PhoenixPE API
|
Title=PhoenixPE API
|
||||||
Author=Homes32
|
Author=Homes32
|
||||||
Description=Scripting interface.
|
Description=Scripting interface.
|
||||||
Version=1.2.1.0
|
Version=1.3.0.0
|
||||||
Level=0
|
Level=0
|
||||||
Selected=None
|
Selected=None
|
||||||
|
|
||||||
[Variables]
|
[Variables]
|
||||||
%_PhoenixAPI_ConfigMode%=PECMD
|
%_PhoenixAPI_ConfigMode%=PECMD
|
||||||
%_PhoenixAPI_RequireFileEx_BulkFileList%=
|
|
||||||
%_PhoenixAPI_RequireFileEx_SingleFileList%=
|
|
||||||
|
|
||||||
[Macros]
|
[Macros]
|
||||||
RegLoadHives=Run,%API%,_PhoenixAPI_RegLoadHives
|
RegLoadHives=Run,%API%,_PhoenixAPI_RegLoadHives
|
||||||
@@ -24,8 +22,6 @@ DirDeleteEx=Run,%API%,_PhoenixAPI_DirDeleteEx
|
|||||||
FileCopyEx=Run,%API%,_PhoenixAPI_FileCopyEx
|
FileCopyEx=Run,%API%,_PhoenixAPI_FileCopyEx
|
||||||
FileDeleteEx=Run,%API%,_PhoenixAPI_FileDeleteEx
|
FileDeleteEx=Run,%API%,_PhoenixAPI_FileDeleteEx
|
||||||
|
|
||||||
IniReadEx=Run,%API%,_PhoenixAPI_IniReadEx
|
|
||||||
|
|
||||||
// Experimental - May be changed or removed without notice
|
// Experimental - May be changed or removed without notice
|
||||||
7zExtract=Run,%API%,_PhoenixAPI_7zExtract
|
7zExtract=Run,%API%,_PhoenixAPI_7zExtract
|
||||||
InnoExtract=Run,%API%,_PhoenixAPI_InnoExtract
|
InnoExtract=Run,%API%,_PhoenixAPI_InnoExtract
|
||||||
@@ -36,8 +32,6 @@ XMLDelete=Run,%API%,_PhoenixAPI_XMLDelete
|
|||||||
XMLRename=Run,%API%,_PhoenixAPI_XMLRename
|
XMLRename=Run,%API%,_PhoenixAPI_XMLRename
|
||||||
XMLUpdate=Run,%API%,_PhoenixAPI_XMLUpdate
|
XMLUpdate=Run,%API%,_PhoenixAPI_XMLUpdate
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
SetFileACL=Run,%API%,_PhoenixAPI_SetFileACL
|
SetFileACL=Run,%API%,_PhoenixAPI_SetFileACL
|
||||||
SetRegACL=Run,%API%,_PhoenixAPI_SetRegACL
|
SetRegACL=Run,%API%,_PhoenixAPI_SetRegACL
|
||||||
|
|
||||||
@@ -51,6 +45,7 @@ BitClear=Run,%API%,_PhoenixAPI_BitClear
|
|||||||
BitSet=Run,%API%,_PhoenixAPI_BitSet
|
BitSet=Run,%API%,_PhoenixAPI_BitSet
|
||||||
BitToggle=Run,%API%,_PhoenixAPI_BitToggle
|
BitToggle=Run,%API%,_PhoenixAPI_BitToggle
|
||||||
|
|
||||||
|
// Experimental - May be changed or removed without notice
|
||||||
[_PhoenixAPI_7zExtract]
|
[_PhoenixAPI_7zExtract]
|
||||||
System,SetLocal
|
System,SetLocal
|
||||||
If,#1,Equal,"",Halt,"7zip Error: You must specify the file to decompress."
|
If,#1,Equal,"",Halt,"7zip Error: You must specify the file to decompress."
|
||||||
@@ -63,6 +58,7 @@ ShellExecute,Hide,%Tools%\7z.exe,"x -r -y #$q%SrcArchive%#$q -o#$q%DestDir%#$q"
|
|||||||
|
|
||||||
System,EndLocal
|
System,EndLocal
|
||||||
|
|
||||||
|
// Experimental - May be changed or removed without notice
|
||||||
[_PhoenixAPI_InnoExtract]
|
[_PhoenixAPI_InnoExtract]
|
||||||
System,SetLocal
|
System,SetLocal
|
||||||
If,#1,Equal,"",Halt,"InnoExtract Syntax Error: You must specify the file to decompress."
|
If,#1,Equal,"",Halt,"InnoExtract Syntax Error: You must specify the file to decompress."
|
||||||
@@ -121,46 +117,6 @@ End
|
|||||||
|
|
||||||
System,EndLocal
|
System,EndLocal
|
||||||
|
|
||||||
[#_PhoenixAPI_IniReadEx#]
|
|
||||||
// ===============================================================================================================================
|
|
||||||
// Name...........: IniReadEx
|
|
||||||
// Description....: Reads a value from a standard .ini file.
|
|
||||||
// If the file or key doesn't exist the specified default value will be returned.
|
|
||||||
// Syntax.........: IniReadEx,<FileName>,<Section>,<Key>,<DefaultValue>,<DestVar>
|
|
||||||
// Parameters.....: #1 FileName - The full path of the file to read.
|
|
||||||
// #2 Section - The section containing the value to be read.
|
|
||||||
// #3 Key - The name of the key to be read.
|
|
||||||
// #4 DefaultValue - The default value to return if the key cannot be found.
|
|
||||||
// #5 DestVar - The value will be saved to a variable with this name.
|
|
||||||
// Note that <DestVar> should NOT be enclosed in percent (%) signs
|
|
||||||
//
|
|
||||||
// Example: IniReadEx,C:\windows\win.ini,mySection,myKey,Default,myVariable
|
|
||||||
//
|
|
||||||
// Return values..: Sets <DestVar> to the value returned.
|
|
||||||
// Author.........: Homes32
|
|
||||||
// Remarks........: The Winbuilder/PEBakery IniRead implementation always returns an empty string if the Key is not found.
|
|
||||||
// If you don't need to specify a default key value IniRead will execute slightly faster then this macro.
|
|
||||||
//
|
|
||||||
// We need to run this macro in the local scope of the calling script in order to set the return var
|
|
||||||
// so we must not use System,SetLocal isolation here.
|
|
||||||
// Related........:
|
|
||||||
// ===============================================================================================================================
|
|
||||||
[_PhoenixAPI_IniReadEx]
|
|
||||||
If,#1,Equal,"",Halt,"IniWriteEx Syntax Error: You must specify the full path of the file to read."
|
|
||||||
If,#2,Equal,"",Halt,"IniWriteEx Syntax Error: You must specify the section containing the value to be read."
|
|
||||||
If,#3,Equal,"",Halt,"IniWriteEx Syntax Error: You must specify the key to be read."
|
|
||||||
If,#4,Equal,"",Halt,"IniWriteEx Syntax Error: You must specify the default value to return if the key cannot be found."
|
|
||||||
If,#5,Equal,"",Halt,"IniWriteEx Syntax Error: You must specify the name of the variable where the value will be saved."
|
|
||||||
|
|
||||||
If,ExistFile,#1,Begin
|
|
||||||
IniRead,#1,#2,#3,%IniReadEx_Return%
|
|
||||||
If,%IniReadEx_Return%,Equal,"",Set,%#5%,#4
|
|
||||||
Else,Set,%#5%,%IniReadEx_Return%
|
|
||||||
End
|
|
||||||
Else,Set,%#5%,#4
|
|
||||||
|
|
||||||
Set,%IniReadEx_Return%,Nil
|
|
||||||
|
|
||||||
[#_PhoenixAPI_SetFileACL#]
|
[#_PhoenixAPI_SetFileACL#]
|
||||||
// ===============================================================================================================================
|
// ===============================================================================================================================
|
||||||
// Name...........: SetFileACL
|
// Name...........: SetFileACL
|
||||||
|
Reference in New Issue
Block a user