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

Feature Request: Add option to pass portable.ini or portable_dir to choco install #1

Open
bradenwatkins opened this issue Sep 28, 2020 · 3 comments

Comments

@bradenwatkins
Copy link

Use case:
I'm writing a Windows PowerShell setup script that will install all of my favorite tools/programs etc... that will live inside of a .dotfiles repository containing all of my config files (including Keypirinha). I'd really like to use the choco install keypirinha command in the script, but it appears that the chocolaty install only supports Keypirinha's installed mode.

Desired behavior:
It would be great if I could pass the path to my custom config directory and the install script could write that path to the portable.ini file of the installed version.

Example:
choco install keypirinha.portable --install-args="'/PORTABLE_DIR=C:\Users\MyUser\source.dotfiles\keypirinha'"

Output:
The install script writes portable_dir = to the portable.ini file

Link to original issue on Keypirinha/Keypirinha repository

@polyvertex
Copy link
Member

I do not use Chocolatey myself but anyone is welcome to provide a patch for this feature. I would gladly integrate it.

It does seem however that a new "keypirinha.portable" Chocolatey package should be created (in this same repo) to avoid confusion with its "'installed mode" counterpart.

@laurinkeithdavis
Copy link
Collaborator

I'm taking a look at this, @polyvertex, but all the packages that I see that share the same repo, have separate directories for each page, like for instance git, git.portable, git.install, etc...

https://github.com/chocolatey-community/chocolatey-coreteampackages/tree/master/automatic

What would you like the directory structure to be for keypirinha.portable in this repo?

@polyvertex
Copy link
Member

Thanks @laurin1! :)

The structure depends on the modifications on Keypirinha's internal build process which I have yet to implement in order to take the new Choco package. In the meantime, perhaps the easiest way would be for you to create a src.portable directory, with a similar structure than src?

Note that all the .in files in src.portable will be preprocessed by Keypirinha's builder, which will replace tags like {{some_value_name}} in these files on-the-fly while being copied to say build.portable directory for instance. Other non-.in files will just be copied as-is.

Feel free to add and/or modify the structure under src.portable if needed, so that it fits better to how this kind of package should handled. I will adapt the builder according to it.

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

No branches or pull requests

3 participants