Skip to content

Commit

Permalink
eng suppt
Browse files Browse the repository at this point in the history
  • Loading branch information
steve02081504 committed Dec 30, 2023
1 parent 21debcd commit 937328d
Show file tree
Hide file tree
Showing 5 changed files with 108 additions and 2 deletions.
5 changes: 5 additions & 0 deletions GUI/GUI.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,9 @@ if (!$Localize) {
$Localize = (Get-Culture).Name
}

if (Get-Command powershell -ErrorAction Ignore) {
powershell -NoProfile -ExecutionPolicy Bypass -File $PSScriptRoot\src\Main.ps1 -ConfingFile $ConfingFile -Localize $Localize | Out-Null
return
}

.$PSScriptRoot\src\Main.ps1 -ConfingFile $ConfingFile -Localize $Localize | Out-Null
92 changes: 92 additions & 0 deletions GUI/locale/en-UK.fbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
<Data>
<Events Desc="Events associated with controls">
</Events>
<Form Name="MainForm" Size="928,651" Tag="VisualStyle,DPIAware" Text="ps12exe GUI">
<GroupBox Name="InputsGroupBox" Location="8,1" Size="766,573">
<GroupBox Name="BaseIOGroupBox" Location="5,13" Size="626,102">
<Label Name="CompileFileLabel" Location="5,15" Size="80,14" Text="Input File" />
<TextBox Name="CompileFileTextBox" AllowDrop="True" Location="6,30" Size="551,22" />
<Button Name="CompileFileButton" Location="558,27" Size="59,26" Text="..." />
<Label Name="OutputFileLabel" Location="4,54" Size="80,14" Text="Output File" />
<TextBox Name="OutputFileTextBox" AllowDrop="True" Location="6,70" Size="550,22" />
<Button Name="OutputFileButton" Location="559,68" Size="59,25" Text="..." />
</GroupBox>
<GroupBox Name="OtherInputsGroupBox" Location="6,118" Size="374,136">
<Label Name="CompileParamsLabel" Location="5,12" Size="80,14" Text="Compile Params" />
<TextBox Name="CompileParamsTextBox" Location="5,30" Size="360,22" Text="/o+ /debug-" />
<Label Name="TempDirLabel" Location="6,54" Size="80,14" Text="Temp Dir" />
<TextBox Name="TempDirTextBox" Location="5,70" Size="360,22" />
<Label Name="MinifyScriptLabel" Location="3,93" Size="80,14" Text="Minify Script" />
<TextBox Name="MinifyScriptTextBox" Location="5,110" Size="360,22" />
</GroupBox>
<GroupBox Name="ArchitectureGroupBox" Location="15,262" Size="95,89" Text="Architecture">
<CheckBox Name="x64CheckBox" Location="8,15" Size="82,23" Text="x64" />
<CheckBox Name="x86CheckBox" Location="9,36" Size="81,26" Text="x86" />
<CheckBox Name="AnyCPUCheckBox" AutoCheck="False" Checked="True" CheckState="Checked" Location="8,58" Size="86,27" Text="AnyCPU" />
</GroupBox>
<GroupBox Name="CommonOptionsGroupBox" Location="641,21" Size="117,130" Text="Common Options">
<CheckBox Name="ConsoleAppCheckBox" Checked="True" CheckState="Checked" Location="7,15" Size="103,26" Text="Console App" />
<CheckBox Name="RequestAdminCheckBox" Location="11,91" Size="102,32" Text="Request Admin" />
<CheckBox Name="DebugInfoCheckBox" Location="7,36" Size="108,28" Text="Debug Info" />
<CheckBox Name="SpecialParamsCheckBox" Location="7,61" Size="112,31" Text="Special Params" />
</GroupBox>
<GroupBox Name="DetailedOptionsGroupBox" Location="642,154" Size="118,215" Text="Detailed Options">
<CheckBox Name="ConfigFileCheckBox" Location="14,22" Size="102,32" Text="Generate Config" />
<CheckBox Name="DisableOutputStreamCheckBox" Location="12,57" Size="100,30" Text="Disable Output" />
<CheckBox Name="DisableErrorStreamCheckBox" Location="10,85" Size="102,29" Text="Disable Error" />
<CheckBox Name="MoreOSFeaturesCheckBox" Location="11,178" Size="105,34" Text="More OS Features" />
<CheckBox Name="EnableVirtualizationCheckBox" Location="10,141" Size="109,37" Text="Enable Virtualization" />
<CheckBox Name="LongPathSupportCheckBox" Location="11,110" Size="102,34" Text="Long Path Support" />
</GroupBox>
<GroupBox Name="RegionIDGroupBox" Location="219,262" Size="86,70">
<Label Name="RegionIDLabel" Location="7,15" Size="68,21" Text="Region ID" />
<TextBox Name="RegionIDTextBox" Location="5,38" Size="73,22" />
</GroupBox>
<GroupBox Name="ThreadModelGroupBox" Location="117,263" Size="87,94" Text="Thread Model">
<CheckBox Name="SingleThreadCheckBox" AutoCheck="False" Checked="True" CheckState="Checked" Location="10,30" Size="72,26" Text="Single" />
<CheckBox Name="MultiThreadCheckBox" Location="10,56" Size="73,30" Text="Multi" />
</GroupBox>
<GroupBox Name="ResourceParamsGroupBox" Location="16,371" Size="710,193" Text="Resource Params">
<Label Name="IconFileLabel" Location="13,17" Size="89,17" Text="Icon File" />
<TextBox Name="IconFileTextBox" AllowDrop="True" Location="14,34" Size="284,22" />
<Button Name="IconFileButton" Location="297,33" Size="38,23" Text="..." />
<Label Name="TitleLabel" Location="19,60" Size="80,14" Text="Title" />
<TextBox Name="TitleTextBox" Location="14,78" Size="314,22" />
<Label Name="DescriptionLabel" Location="14,102" Size="103,15" Text="Description" />
<TextBox Name="DescriptionTextBox" Location="17,116" Size="312,22" />
<Label Name="CompanyLabel" Location="13,138" Size="87,21" Text="Company" />
<TextBox Name="CompanyTextBox" Location="13,158" Size="313,22" />
<Label Name="ProductNameLabel" Location="342,17" Size="62,18" Text="Product Name" />
<TextBox Name="ProductNameTextBox" Location="340,32" Size="359,22" />
<Label Name="CopyrightInfoLabel" Location="342,62" Size="80,14" Text="Copyright" />
<TextBox Name="CopyrightInfoTextBox" Location="339,78" Size="354,22" />
<Label Name="TrademarkInfoLabel" Location="343,102" Size="83,18" Text="Trademark" />
<TextBox Name="TrademarkInfoTextBox" Location="340,117" Size="357,22" />
<Label Name="VersionLabel" Location="342,148" Size="80,14" Text="Version" />
<TextBox Name="VersionTextBox" Location="341,159" Size="357,22" />
</GroupBox>
<GroupBox Name="OptionsSplitterPanel" Location="385,119" Size="230,228">
<GroupBox Name="ConsoleOptionsSplitterPanel" Location="8,14" Size="206,75" Text="Console App Options">
<CheckBox Name="UnicodeEncodingCheckBox" Location="11,19" Size="187,28" Text="Force Unicode Encoding" />
<CheckBox Name="CredentialGUICheckBox" Location="10,48" Size="178,20" Text="Credential GUI" />
</GroupBox>
<GroupBox Name="WindowsOptionsSplitterPanel" Location="8,102" Size="212,116" Text="Window App Options">
<CheckBox Name="IgnoreVisualStylesCheckBox" Location="10,18" Size="196,24" Text="Ignore Visual Styles" />
<CheckBox Name="ExitOnCancelCheckBox" Location="10,88" Size="190,22" Text="Exit on Cancel" />
<CheckBox Name="DPIAwareCheckBox" Location="10,40" Size="189,23" Text="DPI Aware" />
<CheckBox Name="WinFormsDPIAwareCheckBox" Location="10,64" Size="194,24" Text="WinForms DPI Aware" />
</GroupBox>
</GroupBox>
</GroupBox>
<Button Name="LoadCfgButton" Location="805,14" Size="74,32" Text="Load Config" />
<Button Name="SaveCfgButton" Location="806,48" Size="72,34" Text="Save Config" />
<Button Name="SaveCfg2OtherFileButton" Location="807,94" Size="71,40" Text="Save Config As" />
<Button Name="CompileButton" Location="806,563" Size="75,23" Text="Compile" />
<Label Name="CfgFileLabel" Location="7,578" Size="778,23" Text="No configuration file has been selected, old chap." />
</Form>
<OpenFileDialog Name="OpenCfgFileDialog" DefaultExt="xml" Filter="Configuration Files (*.xml)|*.xml" Title="Select a configuration file, if you'd be so kind" />
<SaveFileDialog Name="SaveCfgFileDialog" DefaultExt="xml" Filter="Configuration Files (*.xml)|*.xml" Title="Save the configuration file, old chap" />
<OpenFileDialog Name="OpenCompileFileDialog" DefaultExt="ps1" Filter="Powershell Files (*.ps1)|*.ps1|Powershell Data Files (*.psd1)|*.psd1" Title="Select a compilation file, my good sir" />
<OpenFileDialog Name="OpenOutputFileDialog" DefaultExt="exe" Filter="Executable Files (*.exe)|*.exe" Title="Select an output file, if you please" />
<OpenFileDialog Name="OpenIconFileDialog" DefaultExt="ico" Filter="Icon Files (*.ico)|*.ico" Title="Select an icon file, old bean" />
</Data>
8 changes: 8 additions & 0 deletions GUI/locale/en-UK.psd1
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
@{
ErrorHead = "Oh dear, an error has occurred:"
CompileResult = "The result of the compilation, old chap:"
DefaultResult = "All done and dusted!"
AskSaveCfg = "Would you be so kind as to save the configuration file?"
AskSaveCfgTitle = "Save the configuration file, if you please"
CfgFileLabelHead = "Configuration file, my good sir:"
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Compared to [`MScholtes/PS2EXE@678a892`](https://github.com/MScholtes/PS2EXE/tre
- Support for compiling scripts and including files from urls, support for downloading icons from urls
- Optimised option handling and window title display under the `-noConsole` parameter, you can now customise the title of popup windows by setting `$Host.UI.RawUI.WindowTitle`.
- Removed exe files from code repository
- Better multi-language、support pure script GUI
- Better multi-language support、pure script GUI
- Separated the cs file from the ps1 file, easier to read and maintain.
- and more...

Expand Down
3 changes: 2 additions & 1 deletion ps12exe.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@
'GUI/Src/Events.ps1', 'GUI/Src/Functions.ps1', 'GUI/Src/UITools.ps1', 'GUI/Src/DialogLoader.ps1',
# GUI locale files
'GUI/Locale/README.md',
'GUI/Locale/zh-CN.psd1', 'GUI/Locale/zh-CN.fbs'
'GUI/Locale/zh-CN.psd1', 'GUI/Locale/zh-CN.fbs',
'GUI/Locale/en-UK.psd1', 'GUI/Locale/en-UK.fbs'
)

# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell.
Expand Down

0 comments on commit 937328d

Please sign in to comment.