microsoft / winget-pkgs

The Microsoft community Windows Package Manager manifest repository
MIT License
8.78k stars 4.59k forks source link

[Package Issue]: Xournal++.Xournal++ #185672

Closed Lonniebiz closed 1 month ago

Lonniebiz commented 1 month ago

Please confirm these before moving forward

Category of the issue

Installation issue.

Brief description of your issue

The Xournal++ package on winget does not support installation with the --scope machine option. When attempting to install Xournal++ for all users using this option, the installation fails with an error code (e.g., 3221225477). Consequently, the installation only works for the currently logged-in user, which complicates deployment in environments where Xournal++ needs to be accessible system-wide for multiple users.

Details are here: https://github.com/xournalpp/xournalpp/issues/5983

Steps to reproduce

  1. Open an elevated PowerShell session (as Administrator) on a Windows workstation.

  2. Run the following command:

winget install Xournal++.Xournal++ --scope machine --source winget

  1. Observe that the installation fails with an error code (e.g., 3221225477) and does not install Xournal++ for all users on the machine.

Actual behavior

The installation fails when using the --scope machine option, returning an error code (3221225477). Xournal++ is only installed for the currently logged-in user rather than system-wide. This requires additional manual steps, such as manually creating shortcuts and adding registry entries, to make the application accessible for all users.

Expected behavior

The command:

winget install Xournal++.Xournal++ --scope machine --source winget

should install Xournal++ system-wide for all users, similar to other applications installed via winget with the --scope machine option. The software should be placed in the C:\Program Files directory, and shortcuts should be automatically created in the Start Menu for all users.

Environment

Windows Package Manager v1.8.1911 Windows: Windows.Desktop v10.0.19045.5011 System Architecture: X64 Package: Microsoft.DesktopAppInstaller v1.23.1911.0

Screenshots and Logs

A detailed workaround can be found here: https://github.com/xournalpp/xournalpp/issues/5983

similar-issues-ai[bot] commented 1 month ago

We've found some similar issues:

If any of the above are duplicates, please consider closing this issue out and adding additional context in the original issue.

Note: You can give me feedback by 👍 or 👎 this comment.

vikingnope commented 1 month ago

Kindly change the title to [Package Issue]: Xournal++.Xournal++

Lonniebiz commented 1 month ago

It isn't clear to me that #185861 addresses the issue of --scope machine not working for the Xournal++.Xournal++ package, which is the primary focus of this issue.

vikingnope commented 1 month ago

One weird thing is that the program only has an option to install for the whole system:

Image

So my fix of including the /CURRENTUSER command will not work for --scope user. This needs to be fixed by the developer themselves first, after the new installer is created we can update the manifest accordingly

Lonniebiz commented 1 month ago

@vikingnope:

It does install the program, where any user that navigates the file system to C:\Program Files\Xournal++\bin\xournalpp.exe can indeed launch Xournal++, but these same users will not find Xournal++ within their start menu after logging in. Nor will they see Xournal++ as a program they can open a PDF file with; Its not listed via: right-click > open with).

So, you're right, it does install the program where a user could use it if they knew how to find it. The whole point of this issue, is that installing with the --scope machine argument, should add Application Launchers to all user's start menus and application search.

See the "Additional Context" section here: https://github.com/xournalpp/xournalpp/issues/5983 for the powershell scripts I used to accomplish these unfinished installer tasks on each workstation.

vikingnope commented 1 month ago

Oh ok, let me change this a bit then

I think my PR should now fix this