From 026a38f6a1c6e5f8960698e9686745f7ce61c243 Mon Sep 17 00:00:00 2001 From: Mike Cole Date: Thu, 11 Jul 2024 21:46:10 -0500 Subject: [PATCH] Fixed flashdevelop --- manual/flashdevelop/flashdevelop.nuspec | 3 +- .../flashdevelop/tools/chocolateyInstall.ps1 | 27 ++++++++++------- manual/flashdevelop/tools/flashdevelop.au3 | 29 +++++++++++++++++++ 3 files changed, 48 insertions(+), 11 deletions(-) create mode 100644 manual/flashdevelop/tools/flashdevelop.au3 diff --git a/manual/flashdevelop/flashdevelop.nuspec b/manual/flashdevelop/flashdevelop.nuspec index 0a8471f377..43da3e11f5 100644 --- a/manual/flashdevelop/flashdevelop.nuspec +++ b/manual/flashdevelop/flashdevelop.nuspec @@ -2,7 +2,7 @@ flashdevelop - 5.3.3.0 + 5.3.3.20240711 https://github.com/mikecole/chocolatey-packages FlashDevelop fdorg @@ -21,6 +21,7 @@ https://github.com/fdorg/flashdevelop + \ No newline at end of file diff --git a/manual/flashdevelop/tools/chocolateyInstall.ps1 b/manual/flashdevelop/tools/chocolateyInstall.ps1 index c6602f8587..c488a8014d 100644 --- a/manual/flashdevelop/tools/chocolateyInstall.ps1 +++ b/manual/flashdevelop/tools/chocolateyInstall.ps1 @@ -1,13 +1,20 @@ +$ErrorActionPreference = 'Stop' + +$toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)" +$fileFullPath = Join-Path $toolsDir 'FlashDevelop-5.3.3.exe' + $packageArgs = @{ - packageName = 'flashdevelop' - unzipLocation = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)" - fileType = 'exe' - url = 'http://www.flashdevelop.org/downloads/releases/FlashDevelop-5.3.3.exe' - silentArgs = '/S' - validExitCodes= @(0) - softwareName = 'FlashDevelop*' - checksum = '7B3109DD768C0C2EF285A0D4A019AB4E89D58F0229A3B820D72F363E7EE3DE38' - checksumType = 'sha256' + packageName = 'flashdevelop' + fileFullPath = $fileFullPath + url = 'http://www.flashdevelop.org/downloads/releases/FlashDevelop-5.3.3.exe' + checksum = '7B3109DD768C0C2EF285A0D4A019AB4E89D58F0229A3B820D72F363E7EE3DE38' + checksumType = 'sha256' } -Install-ChocolateyPackage @packageArgs \ No newline at end of file +Get-ChocolateyWebFile @packageArgs + +# AutoIt +$installerFile = Join-Path $toolsDir 'flashdevelop.au3' +write-host "Installing `'$fileFullPath`' with AutoIt3 using `'$installerFile`'" +$installArgs = "/c autoit3 `"$installerFile`" `"$fileFullPath`"" +Start-ChocolateyProcessAsAdmin -Statements "$installArgs" -ExeToRun 'cmd.exe' -ValidExitCodes @(0) \ No newline at end of file diff --git a/manual/flashdevelop/tools/flashdevelop.au3 b/manual/flashdevelop/tools/flashdevelop.au3 new file mode 100644 index 0000000000..f824bd7e3a --- /dev/null +++ b/manual/flashdevelop/tools/flashdevelop.au3 @@ -0,0 +1,29 @@ +Opt('WinDetectHiddenText', 1) +;Path and filename of the installer executable +$APPTOINSTALL="""" & $CmdLine[1] & """" +Run($APPTOINSTALL) +If @error <> 0 Then + Exit @error +EndIf + +$WINDOWNAME="FlashDevelop 5.3.3 Setup" +WinWaitActive($WINDOWNAME) +ControlClick($WINDOWNAME,"","[TEXT:OK]") +WinSetState($WINDOWNAME,"",@SW_HIDE) + +WinWaitActive($WINDOWNAME) +ControlClick($WINDOWNAME,"","[TEXT:&Next >]") +WinSetState($WINDOWNAME,"",@SW_HIDE) + +WinWaitActive($WINDOWNAME) +ControlClick($WINDOWNAME,"","[TEXT:&Next >]") +WinSetState($WINDOWNAME,"",@SW_HIDE) + +WinWaitActive($WINDOWNAME) +ControlClick($WINDOWNAME,"","[TEXT:&Install]") +WinSetState($WINDOWNAME,"",@SW_HIDE) +Sleep(1000) + +WinWaitActive($WINDOWNAME) +ControlClick($WINDOWNAME,"","[TEXT:Finish]") +WinSetState($WINDOWNAME,"",@SW_HIDE) \ No newline at end of file