Hi Lancelot
The Mouse cursor plugins in Win10PESE are not working on PEBakery,
because they depend on WinBuilder-specific IniWrite behavior. WinBuilder reformats the .ini file when IniWrite is used,
while PEBakery avoids that for performance reasons. This fix uses the %PEBakery% variable to detect which builder it is running on.
would it be acceptable for you to add this check/fix to your plugin ?
[Macro_Cursor_Process]
// ......
IniWrite,%MacroCursor_w%,DUMMY_DUMMY_DUMMY_DUMMY_DUMMY_DUMMY_DUMMY_DUMMY_DUMMY_DUMMY_DUMMY_DUMMY_DUMMY_DUMMY_DUMMY,DUMMY_Key,DUMMY_Value
TxtReplace,%MacroCursor_w%,"#$q#$x","#$x"
TxtReplace,%MacroCursor_w%,"=#$q","="
-->
[Macro_Cursor_Process]
// ......
If,%PEBakery%,Equal,True,Begin
// Unlike Winbuilder, PEBakery does not reformat the entire file on IniWrite...
TxtReplace,%MacroCursor_w%,"#$q#$x","#$x"
TxtReplace,%MacroCursor_w%,"#$q #$x","#$x"
TxtReplace,%MacroCursor_w%,"= #$q","="
End
Else,Begin
IniWrite,%MacroCursor_w%,DUMMY_DUMMY_DUMMY_DUMMY_DUMMY_DUMMY_DUMMY_DUMMY_DUMMY_DUMMY_DUMMY_DUMMY_DUMMY_DUMMY_DUMMY,DUMMY_Key,DUMMY_Value
TxtReplace,%MacroCursor_w%,"#$q#$x","#$x"
TxtReplace,%MacroCursor_w%,"=#$q","="
End
regards APT
ps posted on a Win10PE SE thread as not sure how often you chk PEBakery ones!
Hello Lancelot, long time no see.
First, let me suggest a perfect solution that will greatly help Win10PESE developers.
Let me introduce the macro IniCompactShim.
The macro should work both on WinBuilder 082 and PEBakery beta 6+.
// In Macro Library
[Variables]
IniCompactShim=Run,%API%,Process-IniCompactShim
[Process-IniCompactShim]
If,%PEBakery%,Equal,True,Begin
IniCompact,#1
End
Else,Begin
Set,#8,DUMMY_DUMMY_DUMMY_DUMMY_DUMMY_DUMMY_DUMMY_DUMMY_DUMMY_DUMMY_DUMMY_DUMMY_DUMMY_DUMMY_DUMMY,DUMMY_Key
Set,#9,DUMMY_Value
IniWrite,#1,#8,#9
IniDelete,#1,#8
End
// In mouse cursor code
[Macro_Cursor_Process]
// (Preceding Codes)
IniCompactShim,%MacroCursor_w%
TxtReplace,%MacroCursor_w%,"#$q#$x","#$x"
TxtReplace,%MacroCursor_w%,"=#$q","="
If you prefer a shorter code, here it is:
// In Macro Library
[Variables]
IniCompactShim=Run,%API%,Process-IniCompactShim
[Process-IniCompactShim]
Set,#8,DUMMY_DUMMY_DUMMY_DUMMY_DUMMY_DUMMY_DUMMY_DUMMY_DUMMY_DUMMY_DUMMY_DUMMY_DUMMY_DUMMY_DUMMY,DUMMY_Key
Set,#9,DUMMY_Value
IniWrite,#1,#8,#9
IniDelete,#1,#8
If,%PEBakery%,Equal,True,IniCompact,%MacroCursor_w%
// In mouse cursor code
[Macro_Cursor_Process]
// (Preceding Codes)
IniCompactShim,%MacroCursor_w%
TxtReplace,%MacroCursor_w%,"#$q#$x","#$x"
TxtReplace,%MacroCursor_w%,"=#$q","="
even shorter, this:
// In mouse cursor code
[Macro_Cursor_Process]
// (Preceding Codes)
IniWrite,%MacroCursor_w%,DUMMY_DUMMY_DUMMY_DUMMY_DUMMY_DUMMY_DUMMY_DUMMY_DUMMY_DUMMY_DUMMY_DUMMY_DUMMY_DUMMY_DUMMY,DUMMY_Key,DUMMY_Value
// Add only this line
If,%PEBakery%,Equal,True,IniCompact,%MacroCursor_w%
TxtReplace,%MacroCursor_w%,"#$q#$x","#$x"
TxtReplace,%MacroCursor_w%,"=#$q","="
If bob.omb wants, I am ready to contribute fully-patched .script files.
On the technical side, I implemented IniCompact command which replicates side-effect of WB's IniWrite command.
As a side note...
I agree with PEBakery decision but you should ask ied206 "another compatibility option" for such things,
there are many plugins written that way and I am not here. see: http://theoven.org/index.php?topic=2834.msg35012#msg35012
Sorry if he and I bothered you. I will talk to the proper maintainer for similar matters.
I guess APT001 talked to you because he wanted to honor the original writer.
As you may notice It is the opposite, I do not think ied206 check Win10PE SE or other topics for PEBakery, eg. there are new posts by ied206 on the PEBakery section after you open the current topic.
In fact, I was not able to visit theoven for months because I have been quite busy with personal things (as well as PEBakery development).
I started to posting to theoven again only a few days ago because PEBakery beta 6 announcement was ready, and I came across this article today.
I could not check all relevant new posts in only a few days...
Hello Lancelot, long time no see.
First, let me suggest a perfect solution that will greatly help Win10PESE developers.
Let me introduce the macro IniCompactShim.
The macro should work both on WinBuilder 082 and PEBakery beta 6+.
I don't think it is a perfect solution.
Why PEBakery was written?
PEBakery is compatible with WinBuilder 082.
PEBakery works as a drop-in replacement of WB082, while providing much improved envrionment.
3. Turn on compatibility optionss
For Win10PESE and Win10XPE, turning on compatibility options is required.
Create PEBakery.ini in %BaseDir% and paste these snippets:
[Compat]
AsteriskBugDirCopy=True
AsteriskBugDirLink=True
FileRenameCanMoveDir=True
AllowLetterInLoop=True
LegacyBranchCondition=True
LegacyRegWrite=True
...
with this settings PEBakery simulates WinBuilder's bugs and quirks.
There are already something about compatibility. It is better solution than update every plugins.
LegacyIniWrite=True ? BehaviroIniWrite=WinBuilder ? or something should fix this in one shot.
So I don't know why, PEBakery didn't that, and ask WinBuilder's plugins to write:
If,%PEBakery%,Equal,True,Begin
For people they just use Released Win10 PE SE, Win10XPE, those codes are useless.
Who want to use PEBackery to build the Win10 PE SE, they was following your description to add the Compat settings file,
NO needs to ask plugin's creators to write plugin to compat with other builders.
I also wonder why you make it to be complex.
It is very easy to detect a project is Win10 PE SE or Win10XPE, PEBackery can easily turn on the options auto, but it didn't,
push this to end users.
About compatibility, for old legacy projects, they shouldn't modify any thing to make it work, Build them out-of-the-box that is friendly.
For new projects with PEBackery's improve functions, you can make a new variable for them.