Skip to content
This repository has been archived by the owner on Feb 19, 2019. It is now read-only.

The /bin/ system is not working satisfactory. #215

Closed
Redsandro opened this issue Dec 17, 2012 · 12 comments
Closed

The /bin/ system is not working satisfactory. #215

Redsandro opened this issue Dec 17, 2012 · 12 comments

Comments

@Redsandro
Copy link
Contributor

I have created a package (locally) which extracts an .exe file from .zip.

This is all very nicely automated by the Install-ChocolateyZipPackage command.
However, there are two problems and two possible improvements with that.

The package I created (and will upload once it works correctly) goes like this:

try { 
  $installDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"
  ### I found this example somewhere, but it does not work. I assume I need to set bin_root manually?  
#  $binRoot = "$env:systemdrive\"
#  if($env:chocolatey_bin_root -ne $null){$binRoot = join-path $env:systemdrive $env:chocolatey_bin_root}
#  $installDir = "$binRoot"
  $zipUrl = 'http://www.alcpu.com/CoreTemp/CoreTemp32.zip'
  $zipUrl64 = 'http://www.alcpu.com/CoreTemp/CoreTemp64.zip'
  Install-ChocolateyZipPackage 'coretemp' "$zipUrl" "$installDir" "$zipUrl64"
  Write-ChocolateySuccess 'coretemp'
} catch {
  Write-ChocolateyFailure 'coretemp' "$($_.Exception.Message)"
  throw 
}
  • In this form, the .exe will be installed in it's respective package folder inside **\Chocolatey\lib**; and the executable will be linked in the form of a .bat file in the *\Chocolatey\bin* directory.
    • I would like the .exe file to be copied in bin instead of fake-linked, is this possible?
    • I would like to use 'my' bin-folder for this, is there a chocolatey configuration file or is that what the chocolatey_bin_root environment var does?
    • Files with a space link to files with a space (Core Temp.bat) making the link unavailable for typing. Spaces could be replaced with a dot or underscore or something.
  • In this specific case, what we really want the package to do is for the .exe to be installed in bin or lib or wherever, but in stead of a .bat file link, have a real .lnk file created in C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Chocolatey or something, so we can (in Windows Vista/7/8) press Win, start typing, and launch the app. In this case launch Core Temperature. It's a Windows GUI app so we wouldn't launch it in the terminal anyway.
@Redsandro
Copy link
Contributor Author

(I was considering the google group, but I think the last two points should be identified as important issues.)

@ferventcoder
Copy link
Contributor

GUI apps have a helper. appname.exe.gui (empty file that matches in case sitting directly next to where the file is or will be).

@ferventcoder
Copy link
Contributor

SymLink/Shortcut/exe in choco/bin folder - we've talked about this in the past. The biggest problem here is that it is not a universal thing due to windows, otherwise we would symlink everything in.

What may be better is to determine a convention where we can symlink the executable into bin.

@ferventcoder
Copy link
Contributor

Spaces in Exe Names - Are there really executables with spaces in them or are you providing an example? I've never seen one, that's why I'm asking.

@ferventcoder
Copy link
Contributor

I'd prefer if we break these up and list on the front of each of these as [Enhancement] since they are enhancement requests.

@Redsandro
Copy link
Contributor Author

I will break this up for you soonish.

In the meanwhile, fyi, the space in .exe names is the case for the example (you can download the zip file and see for yourself), except in this case a .bat link doesn't really make sense anyway because you would want it in the start menu where spaces are no problem.

I've seen it another time with a custom build of x264 64bit in the past. The author claimed it would be used within another script using "quotes" anyway, which wasn't true for me.

Granted, for command line tools you won't see this often because devs would quickly start to feel silly.

Back in the day, you could type filena~1.exe in stead of filename with space.exe, but those days are long gone. ;)

@Redsandro
Copy link
Contributor Author

PS is there a page on the wiki that explains what this .exe.gui is and does?

@ferventcoder
Copy link
Contributor

Yes, the tl;dr page for creating packages. ;)

On Monday, December 17, 2012, Redsandro wrote:

PS is there a page on the wiki that explains what this .exe.gui is and
does?


Reply to this email directly or view it on GitHubhttps://github.com//issues/215#issuecomment-11469277.


Rob
"Be passionate in all you do"

http://devlicio.us/blogs/rob_reynolds
http://ferventcoder.com
http://twitter.com/ferventcoder

@Redsandro
Copy link
Contributor Author

Ah so it changes the way the .bat shortcut launches the application.

I remember reading that and thinking it had to do with gui-installers that cannot be put in silent mode, to prevent them from hanging the Chocolatey installer window when running in batch mode. Wrong assumption. I get it now.

In this case there would need to be a Core Temp.exe.ignore and the hypothetical Core Temp.exe.copyToBinFolderInstead and/or Core Temp.exe.createShortcutInStartMenu

@ferventcoder
Copy link
Contributor

We might have a command already for the start menu item.

@Redsandro
Copy link
Contributor Author

That is good news.

I have been looking for a user variable that links there but couldn't find it. There were a lot of %VARS% linking to folders in 2k/xp, but they don't work anymore.

I thought in your second comment #issuecomment-11463385 you mentioned this was a problem. But if you have a possible solution for the start menu, please tell me. :)

Redirected issues:

#216 -> [Enhancement] Copy/move .exe tools to \bin\ folder in stead of creating a .bat file.
#217 -> [Enhancement] Use custom \bin\ folder
#218 -> [Enhancement] Create link to GUI tool in Start Menu
#219 -> [Enhancement] Ignore spaces when creating a 'fake' link (.bat file)

@ferventcoder
Copy link
Contributor

Much thanks

On Tuesday, December 18, 2012, Redsandro wrote:

Redirected issues:

#216 #216 ->
[Enhancement] Copy/move .exe tools to \bin\ folder in stead of creating a
.bat file.
#217 #217 ->
[Enhancement] Use custom \bin\ folder
#218 #218 ->
[Enhancement] Create link to GUI tool in Start Menu
#219 #219 ->
[Enhancement] Ignore spaces when creating a 'fake' link (.bat file)


Reply to this email directly or view it on GitHubhttps://github.com//issues/215#issuecomment-11490041.


Rob
"Be passionate in all you do"

http://devlicio.us/blogs/rob_reynolds
http://ferventcoder.com
http://twitter.com/ferventcoder

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

No branches or pull requests

2 participants