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

Winget package #402

Open
majkinetor opened this issue May 7, 2023 · 19 comments
Open

Winget package #402

majkinetor opened this issue May 7, 2023 · 19 comments
Assignees
Labels
general-build/ci Build/CI work general-supportive Involves supportive infrastructure or tools
Milestone

Comments

@majkinetor
Copy link
Member

majkinetor commented May 7, 2023

I should do a winget package (and get oportunity to learn more about it). One of the reasons is that chocolatey package for 1RM is submited a month ago and still not approved (and Chocolatey is becoming more and more hostale toward FOSS users).

@majkinetor majkinetor added the meta-enhancement Enhacement of existing feature label May 7, 2023
@majkinetor majkinetor assigned VShawn and majkinetor and unassigned VShawn May 7, 2023
@majkinetor majkinetor added meta-feature New feature general-build/ci Build/CI work and removed meta-feature New feature meta-enhancement Enhacement of existing feature labels May 7, 2023
@majkinetor majkinetor added this to the NEXT milestone May 7, 2023
@majkinetor majkinetor added general-supportive Involves supportive infrastructure or tools and removed meta-feature New feature labels May 7, 2023
@majkinetor
Copy link
Member Author

Unfortunatelly, winget doesn't support apps that do not have installers. So installer needs to be done to support it.

The supported installers are listed here.

ZIP installerrs are added recently, but they are mostly single files. I found one that is larger archive - yazu. This means winget will simply unpack archive to default or desired location.

Choco package has a PowerShell script that can do anything, which I used to restart running process and create desktop icon. This will not be possible here. Neverthless, I am happy its now possible, so I will give it a try and see how it goes. If nothing else, we will make installer.

/cc @VShawn .

@VShawn
Copy link
Member

VShawn commented May 14, 2023

appx and msix can be built by the installer project in the solution, but i didn't figure out how to build them by a script.

@majkinetor
Copy link
Member Author

Here is the zip spec

@majkinetor
Copy link
Member Author

majkinetor commented May 19, 2023

Progress so far.

winget doesn't support dependencies yet so one most install manually dotnet desktop runtime:

winget install Microsoft.DotNet.DesktopRuntime.6  --accept-source-agreements --accept-package-agreements

After trying my manifest it extracted it in Temp folder but failed to open it. On double click it offers MS Store, but if run from command line it executes:

Animation

Anyway, this installer manifest passes:

PackageIdentifier: 1Remote.1Remote
PackageVersion: 1.0.0.3
Dependencies:
  PackageDependencies:
  - PackageIdentifier: Microsoft.DotNet.DesktopRuntime.6
Installers:
- InstallerUrl: https://github.com/1Remote/1Remote/releases/download/Nightly/1Remote-1.0.0.0-beta.03-net6-x64-nightly-20230513-3ba04d.zip
  Architecture: x64
  InstallerType: zip
  NestedInstallerType: portable
  NestedInstallerFiles:
  - RelativeFilePath: 1Remote.exe
  InstallerSha256: EF3508A3FFEF1627655ACE920AC5DDD2A80ABEFE2A2B6547430C2145EDCFB23D
ManifestType: installer
ManifestVersion: 1.4.0

Once published, one installs this using the following command:

winget install Microsoft.DotNet.DesktopRuntime.6  --accept-source-agreements --accept-package-agreements
winget install 1Remote --location c:\tools\1Remote

Without location, default location is %LOCALAPPDATA%\Microsoft\WinGet\Packages\1Remote.1Remote__DefaultSource which is amazingly bad. Symbolic link is created tho at %LOCALAPPDATA%\Microsoft\WinGet\Links\1Remote.exe which if run fails because SQLite dll can't be found :)

So, to recap:

  1. Location must be used
  2. Desktop runtime will be probably automatically installed somewhere in the future when dependencies do work (currently mockup is available as winget experimental feature)
  3. If we change portable to exe winget calls 1Remote.exe after extraction, and it could pass silent install parameters that we could use to create desktop icon and/or run the app in the background.
  4. MS Store search wont happen outside the Sandbox, I tested on my local machine

Animation

Here is the zip with the full manifest for now: winget.zip. PR to the https://github.com/microsoft/winget-pkgs is required for each version. I should create new version of AU to work with winget protocol to automate this.

@majkinetor
Copy link
Member Author

FYI 1remote chocolatey package is finally approved, I automated nightly release there.

Regarding winget release, I am going to do this:

  1. Create winget repo under 1remote organization.
  2. Change CI so that it automatically pushes new version there
  3. Document how to add our Github repo as a source

Then, I am thinking, we should change the "installer" - provide silent install options without installer itself that will add desktop icon and maybe some other stuff from first run screen and use that within winget package.

When we are happy with this, I will finally push to MS winget packages, but I intend to keep our repo updated indefinitelly.

@VShawn, if you have any thoughts about this, lay it out.

@VShawn
Copy link
Member

VShawn commented May 26, 2023

chocolatey package is finally approved

good to hear but why it took so long?

silent install options without installer itself

what you mean of this? I may have misunderstood your meaning, it would be good to provide a reference program that implements this type of installation method.

And do we need to write our own installer to implement this installation?

@majkinetor
Copy link
Member Author

good to hear but why it took so long?

First version of the package takes much longer. Afterwards packages are approved quicker. Latest version is already approved.

I mean you don't have to be installer to have installer options. You can just implement them inside main app. For example, creating a desktop or start menu icon could be done any time. There are number of tools that do this.

To be friendlier on users, we could add some of those, callable via arguments, and use that in winget.

@Xhanti
Copy link

Xhanti commented Oct 18, 2023

Hi @majkinetor does the winget installer still work or still in testing?
I wanted to install 1Remote and try it out, got this
image
I was hopping the winget install method would get me around this

@majkinetor
Copy link
Member Author

Nah, it turned out that I have a problem with winget even now due to its non-existing scripting features.

For the record, we added installer parameters BUT, winget will use temporary copy of 1remote and it will install itself on temporary location.... What needs to be done is to add new installer parameter to 1Remote - path - that will instruct it to copy and setup itself at that path, not at its current path.

As an example, everything has this:

install

Copies Everything.exe and uninstall.exe to the new location. Creates an uninstall entry in Programs and Features if uninstall.exe is present. Executes the copied Everything.exe with the install options specified in -install-options.

@majkinetor
Copy link
Member Author

I wanted to install 1Remote and try it out, got this

Screenshot says PRemote, not 1Remote. Have you try to download it from the nightly release (use last entry, currently 1Remote-1.0.0.0-beta.06-net6-x64-nightly-20231007-3f0d50.zip) and check it out ?

@Xhanti
Copy link

Xhanti commented Oct 18, 2023

Hi @majkinetor ,
thank you for the quick response.

I got it from here:
image

image

Is that the right place to get the installer?

@majkinetor
Copy link
Member Author

No, I left you link, you take nightly.

This is the latest 1remote at this moment:

https://github.com/1Remote/1Remote/releases/download/Nightly/1Remote-1.0.0.0-beta.06-net6-x64-nightly-20231007-3f0d50.zip

@Xhanti
Copy link

Xhanti commented Oct 19, 2023

Hi @majkinetor ,

Is there anyway to get a signed version of this app? I am not allowed to install unsigned binaries on this machine

@majkinetor
Copy link
Member Author

Don't know what @VShawn thinks, but as far as I know that requires money and a lot of dedication. Maybe I am wrong but I think its a big hassle.

@VShawn
Copy link
Member

VShawn commented Oct 20, 2023

Yes, I don't intend to provide a signed package, but since it's an open-source software, you can download the source code, compile it, and sign it yourself:)

@Xhanti
Copy link

Xhanti commented Oct 20, 2023

That's not a bad suggestion at all. Thank you 🙏🏾

@majkinetor
Copy link
Member Author

Just as an information, regarding signing, there is one free that some popular open source software use:

https://about.signpath.io/product/open-source

@Xhanti
Copy link

Xhanti commented Nov 26, 2023

That sounds like a great option. If you guys are open to me working on that (getting the build system ready, if it's not) I can definitely chip in

@VShawn
Copy link
Member

VShawn commented Nov 26, 2023

If you guys are open to me working on that (getting the build system ready, if it's not) I can definitely chip

Of course, everyone is welcome to contribute to 1Remote.

Just as an information, regarding signing, there is one free that some popular open source software use

I registered and quickly browsed through it, but I haven't fully grasped how to make it work. And one thing to note is how to retrieve the secrets stored on GitHub in the signpath.io CI system?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
general-build/ci Build/CI work general-supportive Involves supportive infrastructure or tools
Projects
None yet
Development

No branches or pull requests

3 participants