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

Chocolatey Package #101

Open
simeonradivoev opened this issue Apr 23, 2024 · 7 comments
Open

Chocolatey Package #101

simeonradivoev opened this issue Apr 23, 2024 · 7 comments
Labels
enhancement New feature or request

Comments

@simeonradivoev
Copy link

Describe the feature
It should be straightforward to make a Chocolatey package. It would play nice with the portable nature of the app.

@simeonradivoev simeonradivoev added the enhancement New feature or request label Apr 23, 2024
@simeonradivoev
Copy link
Author

simeonradivoev commented Apr 23, 2024

I managed to configure it, has some nice features like file associations and start menu shortcut adding. I thought it best you the creator distribute the package. I guess the only hurdle but that's a general one not specific to Chocolatey is that the exe file isn't signed.

the beeref.nuspec file

<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2015/06/nuspec.xsd">
  <metadata>
    <id>beeref</id>
    <version>0.3.2</version>
    <!-- <packageSourceUrl>Where is this Chocolatey package located (think GitHub)? packageSourceUrl is highly recommended for the community feed</packageSourceUrl>-->
    <title>BeeRef</title>
    <authors>Rebecca Breu</authors>
    <projectUrl>https://github.com/rbreu/beeref</projectUrl>
    <iconUrl>https://raw.githubusercontent.com/rbreu/beeref/main/beeref/assets/logo.png</iconUrl>
    <licenseUrl>https://github.com/rbreu/beeref/blob/main/LICENSE</licenseUrl>
    <requireLicenseAcceptance>false</requireLicenseAcceptance>
    <projectSourceUrl>https://github.com/rbreu/beeref</projectSourceUrl>
    <bugTrackerUrl>https://github.com/rbreu/beeref/issues</bugTrackerUrl>
    <tags>art python graphics creative pyqt pyqt6</tags>
    <summary>BeeRef Reference Image Viewer </summary>
    <description>
	BeeRef lets you quickly arrange your reference images and view them while you create. Its minimal interface is designed not to get in the way of your creative process.
	</description>
  </metadata>
  <files>
    <file src="tools\**" target="tools" />
  </files>
</package>

chocolateyinstall.ps1 file

$ErrorActionPreference = 'Stop' # stop on all errors
$url = 'https://github.com/rbreu/beeref/releases/download/v0.3.2/BeeRef-0.3.2-windows.exe' # download url, 
$toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)\\BeeRef.exe"
$startMenuShortcut = "$($env:ProgramData)\Microsoft\Windows\Start Menu\Programs\BeeRef.lnk"
Get-ChocolateyWebFile $packageName $toolsDir $url
Install-ChocolateyFileAssociation ".bee" $toolsDir #associates the bee files
Install-ChocolateyShortcut $startMenuShortcut $toolsDir #makes a star menu shortcut

There is also this https://github.com/marketplace/actions/chocolatey-action that can be used too.

@goyalyashpal
Copy link

not specific to Chocolatey

the package manager i use doesn't even care about that. so, i'd say it is indeed specific to choco

@simeonradivoev
Copy link
Author

the exe isn't signed, and even with no package manager, you will get Windows complaining.

@goyalyashpal
Copy link

you will get Windows complaining.

it doesnt.

@simeonradivoev
Copy link
Author

u1IsdnWo17

@goyalyashpal
Copy link

goyalyashpal commented May 17, 2024

!u1IsdnWo17
- @ simeonradivoev at #101 (comment)

wezterm-gui_FKgl6PZV71.mp4

@simeonradivoev
Copy link
Author

simeonradivoev commented May 17, 2024

I don't know what to tell you, windows wants signed executables. You either:

  • an exception was added for Windows Defender Smart Screen
  • Scoop signed or added and exception to Windows Defender Smart Screen
  • Windows Defender Smart Screen is disabled

This is not normal behavior for Windows.
From what I can gather if signing is not an option the exe can always be submitted to Microsoft https://www.microsoft.com/en-us/wdsi/filesubmission
There might be a way to get around this in Chocolatey but I have not found it. As this is a portable application Chocolatey straight-up copies the exe to a folder. It's like you've downloaded the exe from git and ran it yourself.

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

No branches or pull requests

2 participants