Skip to content

Commit 131de12

Browse files
committed
6.0.0.0 - Crunchy Packet
CHANGED the way software is installed. Software is now installed using the winget command. CHANGED the default TCP server port
1 parent 5d988e5 commit 131de12

File tree

8 files changed

+61
-25
lines changed

8 files changed

+61
-25
lines changed

Build Tools 6.0.0.0.exe

1.2 MB
Binary file not shown.

Build Tools 6.0.0.0.zip

6.96 MB
Binary file not shown.

Build Tools Server.au3

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Global $colorBlack=0x000000
3131
Global $ServerActive=0
3232
Global $ClientActive=0
3333
Global $ServerIP=@IPAddress2
34-
Global $ServerPort=65432
34+
Global $ServerPort=3000
3535

3636
;----Running live
3737
#EndRegion ==================================================================================================================== Var

Build Tools.au3

Lines changed: 54 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#RequireAdmin
22
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
3+
#AutoIt3Wrapper_Outfile_x64=Build Tools 6.0.0.0.exe
34
#AutoIt3Wrapper_Res_Comment=This program helps IT professionals automate your work.
45
#AutoIt3Wrapper_Res_Description=Automation Software By Jacob Stewart
56
#AutoIt3Wrapper_Res_Fileversion=5.1.0.2
@@ -11,7 +12,8 @@
1112
#AutoIt3Wrapper_Res_SaveSource=y
1213
#AutoIt3Wrapper_Res_requestedExecutionLevel=requireAdministrator
1314
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
14-
Global $version="5.1.0.2"
15+
Global $version="6.0.0.0"
16+
Global $version_name='Build Tools 6 - Crunchy Packet'
1517
;VERSION 4 AND ABOVE IS NOW HOSTED ON GITHUB.COM
1618
Global $admin=0
1719
If FileExists(@ScriptDir&"\admin") Then $admin=1
@@ -36,13 +38,14 @@ Global $LinkGrabify="https://grabify.link/KQJ835" ; Tracking link for stats
3638
;=== Dir ===
3739
Global $DirBin=@ScriptDir&"\Build Tools"
3840
If Not FileExists($DirBin) Then DirCreate($DirBin)
39-
Global $DirInstallers=$DirBin&"\Installers"
41+
Global $DirInstallers=$DirBin&"\Installers" ; TODO No longer used
4042
Global $DirOther=$DirBin&"\Other"
4143
Global $dirLocalRoamCache=@LocalAppDataDir&"\Microsoft\Outlook\RoamCache"
4244

4345
;=== File ===
44-
Global $fileLog=$DirBin&"\Log.log"
46+
Global $FileLog=$DirBin&"\Log.log"
4547
Global $FileClipHistory=$DirBin&"\ClipBoardHistory.txt"
48+
Global $FileInstallers=$DirBin&"\installers.txt"
4649
_log("---running---") ;Start the log file
4750

4851
;SetDefaultBrowser.exe
@@ -79,6 +82,7 @@ Global $colorRED_dark=0x990000
7982
Global $colorRed=0xff0000
8083
Global $colorGreen=0x478a00
8184
Global $colorBlue=0x000fb0
85+
Global $colorBlueLight=0x027dc4
8286
Global $colorBlack=0x000000
8387
Global $colorPink=0xff54cf
8488
Global $colorGray=0xd1d1d1
@@ -97,7 +101,7 @@ $SpacingButtons=25
97101
Global $ServerActive=0
98102
Global $ClientActive=0
99103
Global $ServerIP=@IPAddress1
100-
Global $ServerPort=65432
104+
Global $ServerPort=3000
101105

102106
;=== REG ===
103107
Global $regSearch[3] = ["HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Search","SearchboxTaskbarMode","REG_DWORD"]
@@ -226,22 +230,32 @@ EndIf
226230

227231
; --------------------------------------------------------------------------------------- TOP
228232
$top=5
229-
GUICtrlCreateLabel('Build Tools 5 - Big Data',5,$top,$guiW-10,17,0x01)
233+
GUICtrlCreateLabel($version_name,5,$top,$guiW-10,17,0x01)
230234
GUICtrlSetFont(-1,11,600)
231-
GUICtrlSetBkColor(-1,$colorRED_dark)
235+
GUICtrlSetBkColor(-1,$colorBlueLight)
232236
GUISetBkColor($colorGray)
233237

234238
; --------------------------------------------------------------------------------------- LEFT
235239
$width=$guiW/2-3
236240
$top+=20
237241

238242
;Software setup
239-
Global $SoftwareSearch=_FileListToArray($DirInstallers,"*.exe")
240-
243+
Global $SoftwareSearch=_FileListToArray($DirInstallers,"*.exe") ; TODO remove
244+
Global $SoftwareInstallers[99][2]
245+
Global $SoftwareCount=0
241246
Global $SoftwareError=0
242-
If Not @error Then
243-
For $i=1 To $SoftwareSearch[0] step 1
244-
$CheckSoftware[$i]=GUICtrlCreateCheckbox(StringTrimRight($SoftwareSearch[$i],4),5,$top,$width,15)
247+
If _FileCountLines($FileInstallers) > 1 Then
248+
For $i = 2 to _FileCountLines($FileInstallers) step 1
249+
$SoftwareCount+=1
250+
$temp = StringSplit(FileReadLine($FileInstallers,$i),",")
251+
If $temp[0] <> 2 then
252+
ProgressOff()
253+
MsgBox(16,'ERROR Installers','There is a syntax error in the installers.txt file (line: '&$i&')' & @CRLF & FileReadLine($FileInstallers,$i))
254+
Exit
255+
EndIf
256+
$SoftwareInstallers[$i][0] = $temp[1]
257+
$SoftwareInstallers[$i][1] = $temp[2]
258+
$CheckSoftware[$i]=GUICtrlCreateCheckbox($temp[1],5,$top,$width,15)
245259
GUICtrlSetBkColor(-1,0xbdbdbd)
246260
$top+=20
247261
Next
@@ -473,14 +487,15 @@ While 1
473487
_log("ERROR: "&$DirInstallers&" Does not exist, this is because the program has not been fully installed/downloaded correctly.")
474488
Else
475489
ShellExecute($DirInstallers)
476-
MsgBox(0,"Info","Program will need to be reloaded.",3)
490+
Sleep(1000)
491+
MsgBox(0,"Info","NOTE: Build Tools will need to be reloaded if programs are added.", 4)
477492
EndIf
478493

479494
Case $ButtonUpdate
480495
_Update()
481496

482497
;Case $ButtonLog
483-
;ShellExecute($fileLog)
498+
;ShellExecute($FileLog)
484499

485500
Case $ButtonPowerOptions
486501
_PowerOptions()
@@ -947,6 +962,7 @@ Func _Server() ;----------------------------------------------------------------
947962
$SocketListen=TCPListen($ServerIP,$ServerPort,5)
948963
If @error Then
949964
_log("Error("&@error&"): Starting TCP Server, PORT: "&$ServerPort&" IP: "&$ServerIP)
965+
MsgBox(16,'Server Error', 'Could not start the server: ' & @error)
950966
GUICtrlSetColor($ButtonServerOnOFF,$colorRed)
951967
GUICtrlSetBkColor($ButtonServerOnOFF,14408667)
952968
TCPShutdown()
@@ -977,16 +993,20 @@ Func _Client() ;----------------------------------------------------------------
977993
MsgBox(16,"Client","You cant be a Client when you are a Server!")
978994
Return
979995
EndIf
980-
$ServerIP=GUICtrlRead($InputServerIP)
981-
$ServerPort=GUICtrlRead($InputServerPort)
982996

983-
TCPStartup()
997+
If $ClientActive=0 Then ;start the client server for the first time
998+
$ClientActive = 1
999+
$ServerIP=GUICtrlRead($InputServerIP)
1000+
$ServerPort=GUICtrlRead($InputServerPort)
9841001

985-
$iSocket=TCPConnect($ServerIP,$ServerPort)
986-
If @error Then
987-
_log("ERROR("&@error&"): TCP Server not found.")
988-
GUICtrlSetColor($ButtonClientOnOFF,$colorOrange)
989-
Return
1002+
TCPStartup()
1003+
1004+
$iSocket=TCPConnect($ServerIP,$ServerPort)
1005+
If @error Then
1006+
_log("ERROR("&@error&"): TCP Server not found.")
1007+
GUICtrlSetColor($ButtonClientOnOFF,$colorRed)
1008+
Return
1009+
EndIf
9901010
EndIf
9911011

9921012
$recive=TCPRecv($iSocket,500)
@@ -999,13 +1019,23 @@ EndFunc
9991019
Func _install() ;------------------------------------------------------------------------------ Install Software
10001020

10011021
_log("_install() called")
1022+
$SoftwareString = ""
1023+
$InstallError = 1
10021024
If $SoftwareError=0 Then
1003-
For $i=1 To $SoftwareSearch[0] step 1
1025+
For $i=2 To $SoftwareCount+2 step 1
10041026
If GUICtrlRead($CheckSoftware[$i])=1 Then
10051027
GUICtrlSetState($CheckSoftware[$i],4)
1006-
ShellExecute($DirInstallers&"\"&$SoftwareSearch[$i])
1028+
$InstallError = 0
1029+
;ShellExecute($DirInstallers&"\"&$SoftwareSearch[$i])
1030+
$SoftwareString = $SoftwareString & " " & $SoftwareInstallers[$i][1]
10071031
EndIf
10081032
Next
1033+
If $InstallError = 1 Then
1034+
MsgBox(48,"warning!","Please select software to install.")
1035+
Return
1036+
EndIf
1037+
_log("_install() run command: " & "winget install -h --wait --verbose --disable-interactivity --no-upgrade" & $SoftwareString)
1038+
Run("winget install -h --wait --verbose --disable-interactivity --no-upgrade" & $SoftwareString)
10091039

10101040
Else
10111041
MsgBox(48,'Warning','Warning! There is no software to install!')
@@ -1037,7 +1067,7 @@ Func _TaskbarIconsToDefault()
10371067
EndFunc
10381068

10391069
Func _log($_logMSG) ;------------------------------------------------------------------------------ Log
1040-
_FileWriteLog($fileLog,$_logMSG,1)
1070+
_FileWriteLog($FileLog,$_logMSG,1)
10411071
EndFunc
10421072

10431073
Func _exit($_exitCode) ;------------------------------------------------------------------------------ EXIT

Build Tools/Installers.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
--- HELP: Friendly Name,winget package ID ---
2+
Google Chrome,Google.Chrome
3+
Malwarebytes,Malwarebytes.Malwarebytes
4+
Open Office,Apache.OpenOffice
5+
Adobe Acrobat Reader DC (64-bit),Adobe.Acrobat.Reader.64-bit
6+
Mozilla Thunderbird,Mozilla.Thunderbird
File renamed without changes.
File renamed without changes.

testing.au3

Whitespace-only changes.

0 commit comments

Comments
 (0)