Topic: PEBakery Release  (Read 1121 times)

0 Members and 1 Guest are viewing this topic.

PEBakery Release
« on: December 15, 2017, 11:41:58 PM »


  • Moderator,
  • Chef
  • *****
  • Location: South Korea
  • Date Registered: Jan 2014
  • Posts: 203
What is PEBakery?
PEBakery is a builder specialized in customizing Windows PE.
It is intended to be used with Win10PESE, MistyPE project.

Why PEBakery was written?
PEBakery is compatible with WinBuilder 082.
Projects like Win10PESE are dependent on WinBuilder 082, but WB082's development went discontinued.
PEBakery works as a drop-in replacement of WB082, while providing much improved envrionment.

Test Build can be downloaded from server.

PEBakery is a open source software, licensed under GPLv3.
Source of PEBakery can be downloaded in GitHub.
Bug report or Pull request is always welcome.

How to Test
.Net Framework 4.7.1 and Windows 7 or upper is required to run PEBakery.
1. Download Win10PESE project zip distribution and extract it.
2. Put 'Binary' and 'Launcher.exe' in project root (the directory where Project directory resides in).
3. Run 'Launcher.exe' with admin privilege.
4. Configure project and run. Compare with WinBuilder 082 (which is bundled by default).

Specification of PEBakery script language is being done in GitHub.

- PEBakery does not violate WinBuilder's EULA, its development is solely based on document and manual testing.
- PEBakery is still in alpha stage, so expect bugs.
- Even though I did not experience file corruption, It is advised to backup your files. I do not provide any warranty.

Re: PEBakery Release
« Reply #1 on: December 15, 2017, 11:45:10 PM »


  • Moderator,
  • Chef
  • *****
  • Location: South Korea
  • Date Registered: Jan 2014
  • Posts: 203
Latest Version
Latest Build is 20180103.
« Last Edit: January 02, 2018, 11:29:07 AM by ied206 »

Re: PEBakery Release
« Reply #2 on: December 15, 2017, 11:53:30 PM »


  • Moderator,
  • Chef
  • *****
  • Location: South Korea
  • Date Registered: Jan 2014
  • Posts: 203
Build 20171216

- Fix TXTDelLineOp optimization bug
- Fix NullReferenceException in System,RefreshInterface
- Disable System,SaveLog when logger is turned off
- Recognize "PathSetting=False" in "script.project - [Main]" and disable path setting.
- Prevent possible UI exceptions.
- "[Main] - Description=" line is no longer mandatory in plugin.
- CodeParser.GetNextArgument will not slice argument with "".
- Support legacy branch condition when compatibility option is set.
- Support 4-argument 0x7 RegWrite.
- Do not touch escape characters when setting variables.
- Ignore the plugin itself in "[Main] - Disable" directive.
  It fixes a bug VMWare.script is uncheckable.
- TXTReplace will be optimized to TXTReplaceOp if condition is met.
- IniReadOp will set varible to empty string when key is not found.
- Do not escape variables imported from interface.
- Pressing Update button of LogWindow while building no longer crashes program.
- Log stdout and stderr in ShellExecute,Hide.
- Implement ShellExecute,Min.
- Implement GetParam, PackParam.
- Implement "#a" to track section parameter count.
- Allow "-" in variable name, for compatibility with Gena_Meal.
- Fix IOException in CopyOrExpand.
- Fix UIParser to recognize tooltip in TextFile

1. Update to .Net Framework 4.7.1
PEBakery uses several libraries.
Update of some library caused PEBakery to malfunction (problem with .Net Standard 2.0), so I had to update .Net Framework to 4.7.1.

2. [New] PathSetting
Adding these lines into script.project will disable path textboxs of SettingWindow.
Code: [Select]

3. [New] ShellExecute
ShellExecute,Min added to execute programs minimized.
ShellExecute,Hide will show and log stdout and stderr.

4. [New] parameter count token #a
To deprecate PackParam, #a token is added.
When used in command, #a denotes section parameter's number.
« Last Edit: December 15, 2017, 11:59:44 PM by ied206 »

Re: PEBakery Release
« Reply #3 on: December 24, 2017, 11:14:52 AM »


  • Moderator,
  • Chef
  • *****
  • Location: South Korea
  • Date Registered: Jan 2014
  • Posts: 203
Build 20171225

- Fix FileBox to handle root directory path correctly.
- Encode command no longer duplicate entry under [EncodedFolders]
- Launcher.exe will alert user to update .Net Framework if 4.7.1 is not installed.
- Prevent crash in PluginEditButton.

- ShellExecuteSlow, a variant of ShellExecute to run process in BelowNormal Priority.
- ShellExecute's Standard Output Redirect TextBox will be autoscrolled.
- ShellExecute's Standard Output Redirect can be hidden in Setting.
- Implemented EchoFile command.
- .db files are moved info database directory.
- Implemented System,SetLocal|EndLocal, and #r.
- Implemented System,Load.
- System,LoadAll as a new alias of System,RescanScripts.
- New setting to let user choose custom code editor.
- Display line number in error or warning log.
- Implemented INIReadSection.

1. Alert user to install .Net Framework 4.7.1
Launcher.exe now depends on .Net Framework 4.6.2, and alert user to install .Net Framework 4.7.1 if not installed.
4.6.2 was chosen because it is the minimal version supports HiDPI natively.

- Speculations
Launcher.exe's target framework can be lowered more, minimum 4.0 (Windows 8 has this by default).
.Net Framework 4.0 is not installed in Windows 7 by default, but it cannot be trageted.
It is because starting from Windows 8, Microsoft ommited .Net Framework 3.5 in default install.

2. Display Line Number in Error Logs
PEBakery will display line number along with code in error logs.
It will help troubleshooting bugs in .script files.

3. [New] System,SetLocal|EndLocal, #r
I noticed Macro Library relies on section parameters rather than local variables.
I guessed it is because using local variable in macro call can affect other plugins.
Using section parameter as a free memory slot can also cause PackParam to malfunction, unable to count parameter number (#a).
To solve these problem, System,SetLocal and System,EndLocal is introduced from cmd syntax.

After calling System,SetLocal, all modification to local variables are isolated.
To end isolation call System,EndLocal. System,EndLocal will be called automatically when a section exits.
System,EndLocal will revert local variable state to before calling System,SetLocal.
Its logic is similar with how Windows isolate envrionment variable in batch file.

New token #r is introduced to be used as return value.
#r is not affected by SetLocal and EndLocal, and it does not affect parameter number counting in PackParam or #a.
Its value cannot be guaranteed to survive another macro/section call, so copy value into local variables to preserve.
(Think how EAX hold return value in x86 assembly language).

Code: [Select]
Echo,B = %B%
Echo,C = %C%
Echo,R = #r


Code: [Select]
B = F
C = %C%
R = T

4. [New] System,Load
New syntax to refresh/load plugin introduced.

Code: [Select]

In FilePath, wildcard can be used. Unless NOREC flag is used, PEBakery will search for file recursively.

System,RescanScripts now have an alias, to match terminoloy with System,Load.
Code: [Select]

- Limitation
PEBakery cannot fully refresh current plugin.
Code: [Select]
Refreshed plugin is applied in next build run, not in current build run.
-> Using System,Load,%ScriptFile% in interface button is okay.
-> Using System,Load,%ScriptFile% in project building is not okay.
It is due to PEBakery's internal design, modifing architecture will require many changes.

Discussed in this topic.

5. [New] INIReadSection
See the manual in GitHub.

Re: PEBakery Release
« Reply #4 on: January 02, 2018, 11:49:47 AM »


  • Moderator,
  • Chef
  • *****
  • Location: South Korea
  • Date Registered: Jan 2014
  • Posts: 203
Build 20180103 (Beta 1)

Download : Link

- [Added] ReadInterface, WriteInterface
- [Added] WimMount, WimUnmount
- [Added] ProgressBar for WebGet/WimMount/WimUnmount
- [Added] Flag GLOBAL introduced to SetMacro
- [Added] FileCopy/RegWrite produce LogState.Overwrite instead of LogState.Warning
- [Added] Print summary of warning as well as error in exported log.

- [Changed] Improved Console Output in ShellExecute,Hide.

- [Fixed] Handle negative number properly in Command 'If'.
- [Fixed] Fix hang in System,Cursor.
- [Fixed] Fix hang in UserInput,Dir.
- [Fixed] Fix crash in SettingWindow.
- [Fixed] OnPluginExit/OnBuildExit produces proper #1 argument.
- [Fixed] ShellExecute,Hide,XCOPY.exe,... now work properly on Windows 7

1. Improved Console Output in ShellExecute,Hide
PEBakery will display and log stdout and stderr as unified one output, to simulate real console print.

2. ReadInterface, WriteInterface
This command is a native version of Macro Library's ChangeInterface.
See manual for usage.

3. WimMount, WimUnmount
New commands for handling wim files are being added.
WimMount and WimUnmount depends on wimgapi, and the other commands are planed to use wimlib.
See manual for usage.

4. ProgressBar for Current Command
PEBakery will display current progress in some commands.
Currently WebGet, WimMount, WimUnmount is supported.

5. FileCopy/RegWrite produce [Overwrite] log instead of [Warning] log
PEBakery was producing too much overwrite warning, making hard to find more important warnings.
So FileCopy and RegWrite will generate [Overwrite] log instead of [Warning].
« Last Edit: January 02, 2018, 01:47:52 PM by Lancelot »


Powered by EzPortal