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

Support optional properties for shortcut #1320

Closed
wants to merge 1 commit into from

Conversation

wangzq
Copy link
Contributor

@wangzq wangzq commented Feb 4, 2017

No description provided.

wangzq added a commit to wangzq/scoop-bucket that referenced this pull request Feb 4, 2017
@lukesampson
Copy link
Member

I much prefer being selective about which properties are used. It's important that adding a shortcut to a manifest is approachable—it should be easy to get right and shouldn't require looking up the Windows API. This is why I asked for an example of where the working directory is required, because if it ain't broke don't fix it. Is there a specific Scoop install that doesn't work because the working directory isn't set for the shortcut?

@wangzq
Copy link
Contributor Author

wangzq commented Feb 4, 2017

I am currently trying to create a manifest for http://sf.net/projects/freemind which is a Java application and uses batch file to open, its batch file will only work when the working directory is the script's base directory. I understand this is really a bug in itself, but on the other hand I also think having the ability to configure all the shortcuts' properties in Scoop is something worth doing. Please feel free to close this if you disagree and I will find another workaround. Thanks.

@lukesampson
Copy link
Member

Ah okay. The idea was that shortcuts would point to a GUI .exe (like Atom, Notepad2 etc), although that's not explicit in the documentation. I don't think these sort of programs need all the extra shortcut properties.

Simplicity is a big priority here, rather than supporting every feature of the Win API. So I'd prefer not to add all these extra shortcut properties.

If you do want to use the .bat as the Start Menu shortcut, perhaps you could use a pre_install which does something like this to write a new batch file to the install directory which sets the correct directory...

{
...
"pre_install": ["cd %~dp0 >> start.bat", "call freemind.bat >> start.bat" ],
"shortcuts": [ "start.bat", "Freemind" ]
...
}

I'm not sure if that's correct code, but maybe something like that would work.

@wangzq
Copy link
Contributor Author

wangzq commented Feb 4, 2017

No problem. Yes pre_install should be able to fix this.

@wangzq wangzq closed this Feb 4, 2017
@r15ch13
Copy link
Member

r15ch13 commented Aug 31, 2017

OBS Studio need a correct WorkingDirectory to start properly.

r15ch13 added a commit that referenced this pull request Jan 8, 2018
* Solves #1319, #1320, #1378, #1757, #1846, #1867
* Add WorkingDirectory
* Add Icon
* Add Arguments
* Use FileInfo and DirectoryInfo
@r15ch13
Copy link
Member

r15ch13 commented Jan 8, 2018

Added with 83b8238

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

Successfully merging this pull request may close these issues.

3 participants