Skip to content
This repository was archived by the owner on Oct 18, 2024. It is now read-only.

Commit 739a227

Browse files
authored
Merge pull request #57 from Romanitho/Update-links-and-features
Update links and add new WAU features
2 parents da5ca0e + 22193ae commit 739a227

File tree

2 files changed

+57
-51
lines changed

2 files changed

+57
-51
lines changed

Compiler/ps2exe_script.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ $InputFile = "$Path\Sources\Winget-Install-GUI.ps1"
77
$OutputFile = "$Path\Compiler\WiGui.exe"
88
$Icon = "$Path\Sources\WiGui.ico"
99
$Title = "WiGui"
10-
$AppVersion = "1.6.4"
10+
$AppVersion = "1.7.0"
1111
Invoke-ps2exe -inputFile $InputFile -outputFile $OutputFile -noConsole -requireAdmin -title $Title -version $AppVersion -copyright "Romanitho" -product $Title -icon $Icon -noerror

Sources/Winget-Install-GUI.ps1

Lines changed: 56 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ https://github.com/Romanitho/Winget-AllinOne
1212

1313
<# APP INFO #>
1414

15-
$Script:WiGuiVersion = "1.6.4"
16-
$Script:WAUGithubLink = "https://github.com/Romanitho/Winget-AutoUpdate/archive/refs/tags/v1.11.5.zip"
17-
$Script:WIGithubLink = "https://github.com/Romanitho/Winget-Install/archive/refs/tags/v1.7.4.zip"
15+
$Script:WiGuiVersion = "1.7.0"
16+
$Script:WAUGithubLink = "https://github.com/Romanitho/Winget-AutoUpdate/archive/refs/tags/v1.13.2.zip"
17+
$Script:WIGithubLink = "https://github.com/Romanitho/Winget-Install/archive/refs/tags/v1.8.0.zip"
1818
$Script:WingetLink = "https://github.com/microsoft/winget-cli/releases/download/v.1.3.1611/Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle"
1919

2020
<# FUNCTIONS #>
@@ -293,6 +293,8 @@ function Start-InstallGUI {
293293
$WiGuiForm = New-Object System.Windows.Forms.Form
294294
$WiGuiTabControl = New-Object System.Windows.Forms.TabControl
295295
$AppsTabPage = New-Object System.Windows.Forms.TabPage
296+
$InstalledAppButton = New-Object System.Windows.Forms.Button
297+
$UninstallButton = New-Object System.Windows.Forms.Button
296298
$OpenListButton = New-Object System.Windows.Forms.Button
297299
$SaveListButton = New-Object System.Windows.Forms.Button
298300
$RemoveButton = New-Object System.Windows.Forms.Button
@@ -305,6 +307,7 @@ function Start-InstallGUI {
305307
$SearchTextBox = New-Object System.Windows.Forms.TextBox
306308
$SearchButton = New-Object System.Windows.Forms.Button
307309
$WAUTabPage = New-Object System.Windows.Forms.TabPage
310+
$WAUStatusLabel = New-Object System.Windows.Forms.Label
308311
$WAUWhiteBlackGroupBox = New-Object System.Windows.Forms.GroupBox
309312
$WAULoadListButton = New-Object System.Windows.Forms.Button
310313
$WAUListFileTextBox = New-Object System.Windows.Forms.TextBox
@@ -336,9 +339,7 @@ function Start-InstallGUI {
336339
$SaveFileDialog = New-Object System.Windows.Forms.SaveFileDialog
337340
$OpenFileDialog = New-Object System.Windows.Forms.OpenFileDialog
338341
$WAUListOpenFile = New-Object System.Windows.Forms.OpenFileDialog
339-
$WAUStatusLabel = New-Object System.Windows.Forms.Label
340-
$UninstallButton = New-Object System.Windows.Forms.Button
341-
$InstalledAppButton = New-Object System.Windows.Forms.Button
342+
$WAUonMeteredCheckBox = New-Object System.Windows.Forms.CheckBox
342343
#
343344
# WiGuiTabControl
344345
#
@@ -372,6 +373,22 @@ function Start-InstallGUI {
372373
$AppsTabPage.TabIndex = 0
373374
$AppsTabPage.Text = "Select Apps"
374375
#
376+
# InstalledAppButton
377+
#
378+
$InstalledAppButton.Location = New-Object System.Drawing.Point(394, 410)
379+
$InstalledAppButton.Name = "InstalledAppButton"
380+
$InstalledAppButton.Size = New-Object System.Drawing.Size(100, 23)
381+
$InstalledAppButton.TabIndex = 29
382+
$InstalledAppButton.Text = "&List installed"
383+
#
384+
# UninstallButton
385+
#
386+
$UninstallButton.Location = New-Object System.Drawing.Point(394, 439)
387+
$UninstallButton.Name = "UninstallButton"
388+
$UninstallButton.Size = New-Object System.Drawing.Size(100, 23)
389+
$UninstallButton.TabIndex = 28
390+
$UninstallButton.Text = "&Uninstall"
391+
#
375392
# OpenListButton
376393
#
377394
$OpenListButton.Location = New-Object System.Drawing.Point(394, 149)
@@ -444,7 +461,7 @@ function Start-InstallGUI {
444461
$SearchLabel.AutoSize = $true
445462
$SearchLabel.Location = New-Object System.Drawing.Point(6, 6)
446463
$SearchLabel.Name = "SearchLabel"
447-
$SearchLabel.Size = New-Object System.Drawing.Size(80, 13)
464+
$SearchLabel.Size = New-Object System.Drawing.Size(95, 13)
448465
$SearchLabel.TabIndex = 20
449466
$SearchLabel.Text = "Search for an app:"
450467
#
@@ -477,6 +494,15 @@ function Start-InstallGUI {
477494
$WAUTabPage.TabIndex = 1
478495
$WAUTabPage.Text = "Configure WAU"
479496
#
497+
# WAUStatusLabel
498+
#
499+
$WAUStatusLabel.AutoSize = $true
500+
$WAUStatusLabel.Location = New-Object System.Drawing.Point(15, 443)
501+
$WAUStatusLabel.Name = "WAUStatusLabel"
502+
$WAUStatusLabel.Size = New-Object System.Drawing.Size(105, 13)
503+
$WAUStatusLabel.TabIndex = 25
504+
$WAUStatusLabel.Text = "WAU installed status"
505+
#
480506
# WAUWhiteBlackGroupBox
481507
#
482508
$WAUWhiteBlackGroupBox.Controls.Add($WAULoadListButton)
@@ -485,7 +511,7 @@ function Start-InstallGUI {
485511
$WAUWhiteBlackGroupBox.Controls.Add($BlackRadioBut)
486512
$WAUWhiteBlackGroupBox.Controls.Add($DefaultRadioBut)
487513
$WAUWhiteBlackGroupBox.Enabled = $false
488-
$WAUWhiteBlackGroupBox.Location = New-Object System.Drawing.Point(31, 232)
514+
$WAUWhiteBlackGroupBox.Location = New-Object System.Drawing.Point(31, 257)
489515
$WAUWhiteBlackGroupBox.Name = "WAUWhiteBlackGroupBox"
490516
$WAUWhiteBlackGroupBox.Size = New-Object System.Drawing.Size(445, 72)
491517
$WAUWhiteBlackGroupBox.TabIndex = 24
@@ -546,7 +572,7 @@ function Start-InstallGUI {
546572
$WAUFreqGroupBox.Controls.Add($WAUFreqLayoutPanel)
547573
$WAUFreqGroupBox.Controls.Add($UpdAtLogonCheckBox)
548574
$WAUFreqGroupBox.Enabled = $false
549-
$WAUFreqGroupBox.Location = New-Object System.Drawing.Point(31, 152)
575+
$WAUFreqGroupBox.Location = New-Object System.Drawing.Point(31, 174)
550576
$WAUFreqGroupBox.Name = "WAUFreqGroupBox"
551577
$WAUFreqGroupBox.Size = New-Object System.Drawing.Size(284, 69)
552578
$WAUFreqGroupBox.TabIndex = 23
@@ -616,22 +642,23 @@ function Start-InstallGUI {
616642
#
617643
# WAUConfGroupBox
618644
#
645+
$WAUConfGroupBox.Controls.Add($WAUonMeteredCheckBox)
619646
$WAUConfGroupBox.Controls.Add($NotifLevelLabel)
620647
$WAUConfGroupBox.Controls.Add($NotifLevelComboBox)
621648
$WAUConfGroupBox.Controls.Add($WAUDisableAUCheckBox)
622649
$WAUConfGroupBox.Controls.Add($WAUDoNotUpdateCheckBox)
623650
$WAUConfGroupBox.Enabled = $false
624651
$WAUConfGroupBox.Location = New-Object System.Drawing.Point(31, 46)
625652
$WAUConfGroupBox.Name = "WAUConfGroupBox"
626-
$WAUConfGroupBox.Size = New-Object System.Drawing.Size(214, 94)
653+
$WAUConfGroupBox.Size = New-Object System.Drawing.Size(214, 114)
627654
$WAUConfGroupBox.TabIndex = 20
628655
$WAUConfGroupBox.TabStop = $false
629656
$WAUConfGroupBox.Text = "WAU Configurations"
630657
#
631658
# NotifLevelLabel
632659
#
633660
$NotifLevelLabel.AutoSize = $true
634-
$NotifLevelLabel.Location = New-Object System.Drawing.Point(6, 68)
661+
$NotifLevelLabel.Location = New-Object System.Drawing.Point(6, 89)
635662
$NotifLevelLabel.Name = "NotifLevelLabel"
636663
$NotifLevelLabel.Size = New-Object System.Drawing.Size(85, 13)
637664
$NotifLevelLabel.TabIndex = 22
@@ -640,8 +667,8 @@ function Start-InstallGUI {
640667
# NotifLevelComboBox
641668
#
642669
$NotifLevelComboBox.DropDownStyle = [System.Windows.Forms.ComboBoxStyle]::DropDownList
643-
$NotifLevelComboBox.Items.AddRange(@("Full", "SuccessOnly", "None"))
644-
$NotifLevelComboBox.Location = New-Object System.Drawing.Point(97, 65)
670+
$NotifLevelComboBox.Items.AddRange(@("Full","SuccessOnly","None"))
671+
$NotifLevelComboBox.Location = New-Object System.Drawing.Point(97, 86)
645672
$NotifLevelComboBox.Name = "NotifLevelComboBox"
646673
$NotifLevelComboBox.Size = New-Object System.Drawing.Size(100, 21)
647674
$NotifLevelComboBox.TabIndex = 21
@@ -651,9 +678,9 @@ function Start-InstallGUI {
651678
$WAUDisableAUCheckBox.AutoSize = $true
652679
$WAUDisableAUCheckBox.Location = New-Object System.Drawing.Point(6, 42)
653680
$WAUDisableAUCheckBox.Name = "WAUDisableAUCheckBox"
654-
$WAUDisableAUCheckBox.Size = New-Object System.Drawing.Size(151, 17)
681+
$WAUDisableAUCheckBox.Size = New-Object System.Drawing.Size(149, 17)
655682
$WAUDisableAUCheckBox.TabIndex = 20
656-
$WAUDisableAUCheckBox.Text = "Disable WAU Auto-update"
683+
$WAUDisableAUCheckBox.Text = "Disable WAU Self-Update"
657684
#
658685
# WAUDoNotUpdateCheckBox
659686
#
@@ -706,7 +733,7 @@ function Start-InstallGUI {
706733
# AdvancedRunCheckBox
707734
#
708735
$AdvancedRunCheckBox.AutoSize = $true
709-
$AdvancedRunCheckBox.Location = New-Object System.Drawing.Point(15, 12)
736+
$AdvancedRunCheckBox.Location = New-Object System.Drawing.Point(18, 15)
710737
$AdvancedRunCheckBox.Name = "AdvancedRunCheckBox"
711738
$AdvancedRunCheckBox.Size = New-Object System.Drawing.Size(160, 17)
712739
$AdvancedRunCheckBox.TabIndex = 21
@@ -715,7 +742,7 @@ function Start-InstallGUI {
715742
# UninstallViewCheckBox
716743
#
717744
$UninstallViewCheckBox.AutoSize = $true
718-
$UninstallViewCheckBox.Location = New-Object System.Drawing.Point(15, 35)
745+
$UninstallViewCheckBox.Location = New-Object System.Drawing.Point(18, 38)
719746
$UninstallViewCheckBox.Name = "UninstallViewCheckBox"
720747
$UninstallViewCheckBox.Size = New-Object System.Drawing.Size(154, 17)
721748
$UninstallViewCheckBox.TabIndex = 20
@@ -724,7 +751,7 @@ function Start-InstallGUI {
724751
# CMTraceCheckBox
725752
#
726753
$CMTraceCheckBox.AutoSize = $true
727-
$CMTraceCheckBox.Location = New-Object System.Drawing.Point(15, 58)
754+
$CMTraceCheckBox.Location = New-Object System.Drawing.Point(18, 61)
728755
$CMTraceCheckBox.Name = "CMTraceCheckBox"
729756
$CMTraceCheckBox.Size = New-Object System.Drawing.Size(288, 17)
730757
$CMTraceCheckBox.TabIndex = 19
@@ -768,30 +795,14 @@ function Start-InstallGUI {
768795
#
769796
$WAUListOpenFile.Filter = "Text files (*.txt)|*.txt|All files (*.*)|*.*"
770797
#
771-
# WAUStatusLabel
798+
# WAUonMeteredCheckBox
772799
#
773-
$WAUStatusLabel.AutoSize = $true
774-
$WAUStatusLabel.Location = New-Object System.Drawing.Point(15, 443)
775-
$WAUStatusLabel.Name = "WAUStatusLabel"
776-
$WAUStatusLabel.Size = New-Object System.Drawing.Size(217, 13)
777-
$WAUStatusLabel.TabIndex = 25
778-
$WAUStatusLabel.Text = "WAU installed status"
779-
#
780-
# UninstallButton
781-
#
782-
$UninstallButton.Location = New-Object System.Drawing.Point(394, 439)
783-
$UninstallButton.Name = "UninstallButton"
784-
$UninstallButton.Size = New-Object System.Drawing.Size(100, 23)
785-
$UninstallButton.TabIndex = 28
786-
$UninstallButton.Text = "Uninstall"
787-
#
788-
# InstalledAppButton
789-
#
790-
$InstalledAppButton.Location = New-Object System.Drawing.Point(394, 410)
791-
$InstalledAppButton.Name = "InstalledAppButton"
792-
$InstalledAppButton.Size = New-Object System.Drawing.Size(100, 23)
793-
$InstalledAppButton.TabIndex = 29
794-
$InstalledAppButton.Text = "List installed"
800+
$WAUonMeteredCheckBox.AutoSize = $true
801+
$WAUonMeteredCheckBox.Location = New-Object System.Drawing.Point(6, 65)
802+
$WAUonMeteredCheckBox.Name = "WAUonMeteredCheckBox"
803+
$WAUonMeteredCheckBox.Size = New-Object System.Drawing.Size(183, 17)
804+
$WAUonMeteredCheckBox.TabIndex = 23
805+
$WAUonMeteredCheckBox.Text = "Run WAU on metered connexion"
795806
#
796807
# WiGuiForm
797808
#
@@ -806,15 +817,6 @@ function Start-InstallGUI {
806817
$WiGuiForm.Name = "WiGuiForm"
807818
$WiGuiForm.StartPosition = [System.Windows.Forms.FormStartPosition]::CenterScreen
808819
$WiGuiForm.Text = "WiGui $WiGuiVersion"
809-
#
810-
# Custom
811-
#
812-
$WiGuiForm.Add_Shown({ $SearchTextBox.Select() })
813-
$WiGuiForm.Icon = [System.Drawing.Icon]::FromHandle(([System.Drawing.Bitmap]::new($stream).GetHIcon()))
814-
$NotifLevelComboBox.Text = "Full"
815-
$WAUInstallStatus = Get-WAUInstallStatus
816-
$WAUStatusLabel.Text = $WAUInstallStatus[0]
817-
$WAUStatusLabel.ForeColor = $WAUInstallStatus[1]
818820

819821

820822
## ACTIONS ##
@@ -987,6 +989,7 @@ function Start-InstallGUI {
987989
$Script:AdvancedRun = $AdvancedRunCheckBox.Checked
988990
$Script:UninstallView = $UninstallViewCheckBox.Checked
989991
$Script:CMTrace = $CMTraceCheckBox.Checked
992+
$Script:WAUonMetered = $WAUonMeteredCheckBox.Checked
990993
Start-Installations
991994
$WAUCheckBox.Checked = $false
992995
$WAUConfGroupBox.Enabled = $false
@@ -1064,6 +1067,9 @@ function Start-Installations {
10641067
if ($WAUAtUserLogon) {
10651068
$WAUParameters += "-UpdatesAtLogon "
10661069
}
1070+
if ($WAUonMetered) {
1071+
$WAUParameters += "-RunOnMetered "
1072+
}
10671073
if ($WAUUseWhiteList) {
10681074
$WAUParameters += "-UseWhiteList "
10691075
if ($WAUListPath) { Copy-Item $WAUListPath -Destination "$WAUInstallFolder\included_apps.txt" -Force -ErrorAction SilentlyContinue }

0 commit comments

Comments
 (0)