chocolatey / choco

Chocolatey - the package manager for Windows
https://chocolatey.org
Other
10.35k stars 903 forks source link

[Help] Creating Package #1367

Closed Skolzack closed 7 years ago

Skolzack commented 7 years ago

I need a little help from the community since I don't know where to go to ask for help. I'm trying to create a Zoiper 3.9 package but when I'm using the silentargs "/S" it gives me error when installing like 'options start with a leading "--" prefix'.

Here's the ps1 code:

$ErrorActionPreference = 'Stop';

$packageName = 'Zoiper' $url1 = 'https://github.com/nibodev/machineSetup/blob/master/Zoiper_3.9_Setup.exe?raw=true' $checksum1 = '0600f27b97a57918eeddcc1f9ea99cb0'

$packageArgs = @{ packageName = $packageName installerType = 'EXE' url = $url1 checksum = $checksum1 checksumType = 'md5' silentArgs = '/S' validExitCodes= @(0, 3010, 1641)

softwareName = 'zoiper*' }

Install-ChocolateyPackage @packageArgs

Thanks.

ferventcoder commented 7 years ago

Your packaging looks good so far, now it sounds like you just need to determine what the silent arguments are. Your best bet when creating packages is choco new <id> (e.g. choco new zoiper).

Determining silent arguments for an installer is a pretty normal situation of sometimes trial and error. With enough trial and error, and researching for installing silently, I am confident you will be able to determine the right switches. 👍

Skolzack commented 7 years ago

@ferventcoder They told to use "--mode unattended --unattendedmodeui minimal", what I need to do?

ferventcoder commented 7 years ago

@Skolzack I spent a minute in your repo. Let's start from square one. We have quite a bit of documentation on creating packages.

Then clean up the packaging before you submit it to the community repository. Please read over https://github.com/chocolatey/choco/wiki/CreatePackages for a much longer explanation of this, naming your package and redist requirements.

Skolzack commented 7 years ago

Thank you for the help. But I exactly need the 3.9 version cuz it does integrate with pipedrive calls and the new versions doesn't.

And the download URL that they have on their page only provides the newest version :/

About the silent args, it will be like that: SilentArgs = '--mode unattended --unattendedmodeui minimal' ?

bcurran3 commented 7 years ago

Hi @Skolzack

https://chocolatey.org/packages/ussf Is a good program for helping determine standard silent install options - though don't expect it be be 100% as a lot of normal installation programs then get custom wrappers.

This might be a better place for your questions: https://groups.google.com/forum/#!forum/chocolatey

ferventcoder commented 7 years ago

About the silent args, it will be like that: SilentArgs = '--mode unattended --unattendedmodeui minimal' ?

Yes

Thank you for the help. But I exactly need the 3.9 version cuz it does integrate with pipedrive calls and the new versions doesn't.

Just keep in mind, you can probably create a package for internal use, and just put the file inside the package, no reason to add the extra download at runtime. choco new output guides you how to set this up in the commented chocolateyInstall.ps1.

With that though, you won't be able to put this package on the community repository. It requires distribution rights for a repository that is publicly available.

And the download URL that they have on their page only provides the newest version :/

This is something we see sometimes, it doesn't negate the requirement for download, only that you may want to set up automation to keep the package up to date. Again, this is only if you are pushing the package to the community repository (https://chocolatey.org/packages).