Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(autohotkey.portable) tools\Install.cmd is broken due to removal of AutoHotkey32.exe #2607

Open
2 tasks done
aetonsi opened this issue Dec 23, 2024 · 1 comment
Open
2 tasks done
Labels

Comments

@aetonsi
Copy link

aetonsi commented Dec 23, 2024

Checklist

  • I have verified that this is the correct repository, and the package is maintained by the chocolatey-community user.
  • I have verified that this is happening in the latest available version of the package.

Chocolatey Version

2.4.1

Chocolatey License

None

Package Version

v2.1.0-alpha9

Current Behaviour

As already mentioned here by user @Chiajao, currently, the installed

%ChocolateyInstall%\lib\autohotkey.portable\tools\Install.cmd

is no longer working due to the "cleanup" of all the "AutohotkeyXXX.exe"s done by the final portion of the tools/chocolateyInstall.ps1 script, which leaves just 1 AutoHotkey.exe (which is absolutely cool).

Still, the original tools\Install.cmd looks for its original AutoHotkey32.exe (i guess to be sure to run on any windows version):

> type %ChocolateyInstall%\lib\autohotkey.portable\tools\Install.cmd
@echo off
start "" "%~dp0AutoHotkey32.exe" "%~dp0UX\ui-setup.ahk"

Expected Behaviour

To be able to run Install.cmd without problems.
This would mean also updating this script, during installation, in the tools/chocolateyInstall.ps1 script, with something like:

Set-Content "$toolsPath\tools\Install.cmd" (
  (Get-Content -Raw "$toolsPath\tools\Install.cmd") -ireplace 'AutoHotkey32.exe','AutoHotkey.exe'
)

NB: yeah, i know, the point of the chocolatey package is to avoid using the install script, but one could need it for any number of reasons

Steps To Reproduce

In (for example) a cmd.exe session:

  1. install latest version of the package:
c:\> choco upgrade autohotkey.portable --force --pre -y
  1. run the provided Install.cmd to install additional tools:
c:\> call %ChocolateyInstall%\lib\autohotkey.portable\tools\Install.cmd

Environment

- Operating System: Microsoft Windows NT 10.0.26100.0 (win 11 24h2)

- PowerShell Version:
                 
Name                           Value                                                                                                                      
----                           -----                                                                                                                      
PSVersion                      5.1.26100.2161                                                                                                             
PSEdition                      Desktop                                                                                                                    
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}                                                                                                    
BuildVersion                   10.0.26100.2161                                                                                                            
CLRVersion                     4.0.30319.42000                                                                                                            
WSManStackVersion              3.0                                                                                                                        
PSRemotingProtocolVersion      2.3                                                                                                                        
SerializationVersion           1.1.0.1                                                                                                                                        

- Shell: cmd / powershell / or simply opening `Install.cmd` in Explorer

Chocolatey Log

https://gist.github.com/aetonsi/7e4f70ebf0bec8867c572f9e23cb3932

Anything else?

Result:

  The system cannot find the file C:\ProgramData\chocolatey\lib\autohotkey.portable\tools\AutoHotkey32.exe.

image

@aetonsi aetonsi added the Bug label Dec 23, 2024
Copy link

Thanks for raising this issue!

The packages within this repository are maintained by a small team of volunteer Community Maintainers, in their own time. Their time, like yours is important. Please help them by not wasting it.

This is a community repository where the expectation is that everybody will get involved by raising pull requests to fix problems they find. This will also allow that problem to be fixed more quickly as you don't have to wait for a member of the Community Maintainer Team to pick it up.

If you are unable to fix the issue yourself, the Community Maintainers Team will look at it when time allows. There are no service level agreements, nor should there be any expectation on when people can resolve issues in their own time.

A few dos and don'ts:

  • Do provide as much information as you can in any issue that you raise.
  • Don't complain that an issue has not yet been picked up or resolved. You are expected to help out in this community maintained repository. If you are unable to do so, don't complain when others don't adhere to your timelines. There is no SLA nor should you have any expectation of one.
  • Do read the CONTRIBUTING and COMMITTERS documentation before raising a pull request as it contains valuable information on what automation is used in this repository.
  • Do read the Code of Conduct.
  • Don't post your frustration in comments. The Community Maintainers Team are not a punching bag for your frustration. You will only end up banned from the repository.

Thank you.
(Automatically posted message)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant