Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - ied206

Pages: [1] 2 3 ... 11
1
PEBakery / Re: Bug: Syntax Check with \
« on: January 05, 2018, 11:31:15 AM »
Sorry, I mistyped. See edit.

2
PEBakery / Re: Bug: Syntax Check with \
« on: January 05, 2018, 11:19:44 AM »
Is there any known rules for new line token '\'?
I myself found WinBuilder does concat next line into current line if is \ used, but not in "\".
Better to document this.

EDIT
Fix / to \

3
PEBakery / Re: PEBakery Release
« on: January 02, 2018, 11:49:47 AM »
Build 20180103 (Beta 1)

EDIT
Beta 1 was taken down because of potential license issue.
Please use beta 2 or later, sorry for inconvenience.

Changelog
- [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.
ila_rendered

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].

4
PEBakery / Re: Request: Build Button Syntax
« on: January 01, 2018, 09:32:51 AM »
PEBakery is designed under an assumption which only one interpreter engine runs at a moment.
Supporting invokation of a build while engine is already running will require nested engine runs.
So implementing this will take too much time, I am afraid.

Under this reason I like Homes32's approach.

5
PEBakery / Re: PEBakery Test Build
« on: January 01, 2018, 09:16:58 AM »
Issue solved, see this post.

APT, please test this version of PEBakery in your Windows 7 system.
We need to clarify this workaround works.

EDIT
TestBuild taken down because of license issue.
Please use beta 2 or later.

6
PEBakery / Re: BUG: ShellExecute - Ex: Win7 Xcopy
« on: January 01, 2018, 08:47:34 AM »
I found an StackOverflow page describing similar issue with XCOPY.
https://stackoverflow.com/questions/14218642/xcopy-does-not-work-with-useshellexecute-false

And adding one line fixed this issue:
Code: [Select]
proc.StartInfo.RedirectStandardInput = true;

So the culprit is Windows 7's xcopy.exe, demanding stdin where it should not be required.
The fix will be applied in next release.

7
PEBakery / Re: BUG: ShellExecute - Ex: Win7 Xcopy
« on: January 01, 2018, 08:32:43 AM »
How about disabling ShellExecute console redirect only in Windows 7, or turning on in only Windows 10?

8
PEBakery / Re: Request: Rule for decimal mark
« on: January 01, 2018, 08:12:12 AM »
Hi ied206,

We need a fixed (hardcoded) rule for decimal mark.

We had used dot ( . ) as decimal mark on plugins but one day a user came and decimal mark ( . )  did not work.
(a topic somewhere on http://theoven.org ... )
It seems decimal mark changed by hostos settings somehow effect old builder at one special hostos setting.

So we had to update plugins that are affected and create a Macro at Macro Library to overcome such situations.
PEBakery follows solution 1a.
Reason: C#'s language-neutral number parsing is based on English, which allows '.' in decimal mark.

This snnipet is a code used in PEBakery to parse decimal number.
Code: [Select]
public static bool ParseDecimal(string str, out decimal value)
{
if (str.Equals(string.Empty, StringComparison.Ordinal))
{
value = 0;
return false;
}

if (str.StartsWith("0x", StringComparison.OrdinalIgnoreCase))
{
bool result = ulong.TryParse(str.Substring(2), NumberStyles.HexNumber, CultureInfo.InvariantCulture, out ulong intValue);
value = (decimal)intValue;
return result;

else
{
return decimal.TryParse(str, NumberStyles.AllowDecimalPoint | NumberStyles.Integer, CultureInfo.InvariantCulture, out value);
}
}

MSDN article clarifies:
Quote
The invariant culture is culture-insensitive; it is associated with the English language but not with any country/region.

9
PEBakery / Re: BUG: ShellExecute - Ex: Win7 Xcopy
« on: January 01, 2018, 08:01:57 AM »
This bug is caused by redirection of stdout / stderr in ShellExectue,Hide syntax.
PEBakery uses CreateProcess API instead of ShellExectue API in ShellExectue,Hide syntax.
Need more research about CreateProcess()'s behavior in Windows 7 when its stdout/stderr is redirected.

10
PEBakery / Re: PEBakery Test Build
« on: January 01, 2018, 07:53:36 AM »
P.S. still works fully all drives/folders with 
PEBakery_20171202.7z   MD5:DF81602CF1FC427B66718892DF647712
PEBakery_20171213.7z   MD5: 733EC10AA896E9F98003F483B8DA6530
I compared codes powers WB ShellExecute syntax between 20171213 and 20180101.
See ShellExecute method of CommandSystem.cs.

Three things had changed:
1. Prevent crash while opening a text file in Windows 7 (Eliminates use of the verb "Open").
2. Update .Net Framework version to 4.7.1 from 4.7.
3. Redirect Console Output to UI.

I tested PEBakery with .Net Framework 4.7 in Windows 7 and problem is not solved, so 2 is not a culprit.
ShellExecute,Hide syntax does not use ShellExecute API, and 'Verb' is only effective in ShellExecute API (UseShellExecute = true;).
I suspect redirection of console output caused this issue, but it needs more investigation.

EDIT
Removing support for redirect stdout/stderr solves this problem.

11
PEBakery / Re: PEBakery Test Build
« on: January 01, 2018, 04:26:31 AM »
What is the meaning of:
Parameter name: major

To support version compare (Ex 1.2.3.4 vs 1.2.3.4), PEBakery uses Version class.
Version is divided to major, (1.2) minor (1.2), and etc.
They are not intended to shown in public, so I don't think documentation is necessary.


I am looking to Windows 7 ShellExecute issue.
This is my test on Windows 7 VM : * 2018-01-01 18-57-02.7z (3625.69 kB - downloaded 15 times.)

Strange enough, if I turn on debugger ShellExecute,Hide,xcopy.exe works properly.
It makes troubleshooting very hard.

However, If I change Hide into Open, it works well.
Code: [Select]
Shellexecute,hide,xcopy.exe,"#$q%ProjectTemp%\1\*.*#$q #$q%ProjectTemp%\2\#$q /i /s /e /r /v /k /f /c /h /y"

One possible hypothesis is a problem with CreateProcess.
PEBakery uses CreateProcess API instead of ShellExecute API in ShellExecute,Hide.

About Win7 xcopy APT case :

Is there a %ExitCode% variable fallback on PEBakery
 -> If yes and fallback to 0 then please do not fallback to 0 but use something else ?
 --> If yes ---> is it related to APT Win7 xcopy case ?
 ----> If yes ---> than it is easy to be tested by APT with current ShellExecute  :wink:

 -> If no, Win7 Xcopy simply finds no error on parameters but do not continue processing command and exit with success for whatever reason behind with ShellExecute change on PEBakery....
 --> If no, I hope it is easy to revert back to old ShellExecute behaviour which seems to be more correct and direct.
I cannot understand what '%ExitCode% variable fallback', but let me explain about internals.
PEBakery always get exit code from sub process (which is often default to 0).
And even though a user does not specify a variable name to save exit code, PEBakery will save return value info %ExitCode%.




12
PEBakery / Re: PEBakery Test Build
« on: December 30, 2017, 05:45:19 AM »
Hi ied206,

on line 1125 of APT log  r218.txt
%tExitCode% variable defined here :
Code: [Select]
          [Success] Set - Local variable [%tExitCode%] set to [-1] (Set,%tExitCode%,%ExitCode%)
and next %tExitCode% variable line is at line 1151 of APT log r218.txt
Code: [Select]
Parameter name: major (If,Not,%tExitCode%,Equal,0,Begin) (Line 974)

?????

It took me much time to get this, now I guess it is caused by faulty version comparing code.
EDIT : Fixed in recent commit.

13
PEBakery / Re: Build Error Components/Search
« on: December 30, 2017, 05:43:09 AM »
[2] Errors in Plugin [Search] (Win10PESE\Components\Search.script)
[Error] Error - Command [Halt] can have
  • ~ [1] arguments (If,Not,%ExitCode%,Equal,0,Halt,"Call FileCopy Error C: XCopy ErrorLevel:%ExitCode% From: #2 To: #3",Warn) (Line 1657)
[Error] Error - Command [Halt] can have
  • ~ [1] arguments (If,Not,%ExitCode%,Equal,0,Halt,"Call FileCopy Error C: XCopy ErrorLevel:%ExitCode% From: #2 To: #3",Warn) (Line 1657)
I think it can be fixed by removing "Warn" at the end of the code.
As long as I know, WinBuilder 082 always produce warning log in Halt command.

14
PEBakery / Re: Request: EchoFile
« on: December 28, 2017, 07:46:47 AM »
What do you see as the most desirable behavior considering that there is no formal standard for the .ini specification?

Do we want PEBakery to:

  • Continue with current behavior and only process/delete the first occurrence of a section, ignoring other sections with the same name.
  • Continue with the current behavior and only process/delete the first occurrence of a section, and add a warning in the log that other sections exist.
  • Modify the behavior of PEBakery and only process/delete the last occurrence of a section.
  • Modify the behavior of PEBakery and only process/delete the last occurrence of a section , and add a warning in the log that other sections exist.
  • Modify the behavior of PEBakery and read (merge) duplicate sections as one section, with duplicate keys from the last occurrence of a section overwriting earlier occurrences. If IniDeleteX is used delete all occurrences of the section or key.
  • Something else.
I vote for option 1.
PEBakery's ini file manipulation is a bottleneck of File IO and already is slow. Adding more checks will result much slower IO.

My opinion is to follow WinAPI (WriteProfileString, GetProfileString) behavior.
Many programs are still dependent on those APIs, so syncing behavior with other programs is better.

15
PEBakery / Re: RFC: RegWrite Warning
« on: December 28, 2017, 07:37:49 AM »
I added experimental log type Overwrite.
FileCopy/RegWrite will produce [Overwrite] logs instead of [Warning] logs, reducing number of Warning logs.
I chose this method because the modification could be done in shortest time.

Inspect attached log export for more actual implementation.


16
PEBakery / Re: PEBakery Test Build
« on: December 28, 2017, 07:32:06 AM »
Yes, I noticed it. Crash on SettingWindow is fixed in git develop branch now.

17
PEBakery / Re: PEBakery Test Build
« on: December 26, 2017, 09:54:38 AM »
I applied a fix for ShellExecute, but I am not sure it will work.
APT, please test this special build to test if ShellExecute works.

EDIT
TestBuild taken down because of potential license issue.
Please use beta 2 or later, sorry for inconvenience.

18
PEBakery / Re: BUG: ShellExecute - Ex: Win7 Xcopy
« on: December 25, 2017, 05:53:37 PM »
Regarding ShellExecute, I also noticed similar issue, reported by Homes32.
That problem also appeared on Windows 7 host, and I fixed this problem in plugin edit button.

Original Code:
Code: [Select]
ProcessStartInfo procInfo = new ProcessStartInfo()
{
Verb = "open",
FileName = curMainTree.Plugin.FullPath,
UseShellExecute = true
};
Process.Start(procInfo);

Fixed Code:
Code: [Select]
ProcessStartInfo procInfo = new ProcessStartInfo(curMainTree.Plugin.FullPath)
{
UseShellExecute = true
};
Process.Start(procInfo);

I cannot figure why original code only works on Windows 10, but I guess this bug is quite similar.

I will try quick fix in next release.
In case of the bug persist after the fix the bug, then I can use 'cmd /C' workaround.

19
PEBakery / Re: Request: System,Load - Parameters
« on: December 24, 2017, 12:06:53 PM »
Implemented in Build 20171225.

Please note current implementation have a limitation.
Due to PEBakery's internal design, PEBakery cannot refresh the plugin itself during the build is running.
Parsed commands are valid before section exits, so editing the section itself will not work.
So System,Load,%ScriptFile% will work in interface button, but not well in build.

Quote
Syntax for single file and files ?
ex: Add/Remove/Update new plugin ?
System,Load covers add/refresh of single file and multiple files both.
Similar to how FileCopy works with wildcard.

No wildcard -> Single file
With wildcard -> Multiple files



Quote
Too early for now.
The day we depreciate wb with different extension than I am fine to update all relevant plugins.
Eventually I chose NOREC flag for consistency.

20
PEBakery / Re: Request: Database SubFolder
« on: December 24, 2017, 11:39:27 AM »
Starting from Build 20171225, PEBakeryCache.db and PEBakeryLog.db are moved into %BaseDir%\Database directory.

Pages: [1] 2 3 ... 11
Powered by EzPortal