Giter Club home page Giter Club logo

drewnaylor / guinget Goto Github PK

View Code? Open in Web Editor NEW
135.0 7.0 3.0 3 MB

Unofficial GUI for Microsoft's Windows Package Manager (winget). Kinda like Synaptic, but for Windows. Not associated with either Microsoft or the Synaptic project, and Microsoft does not endorse this software.

License: Apache License 2.0

Visual Basic .NET 76.93% Batchfile 3.27% Inno Setup 19.81%
winget windows package-management windows-forms gui windows-package-manager dotnet-framework

guinget's People

Contributors

drewnaylor avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

guinget's Issues

"Show in winget" may be a good idea for the package context menu.

This would help in case there aren't easily-accessible manifest files, such as if the Store source is being shown. It could also help if the user wants to double-check something for a particular package. Clicking "Show in winget" will run cmd /k winget show (PackageId) -v (PackageVersion). May need to turn off multi-select for this; will have to check Synaptic for that. Probably wouldn't make sense to allow multi-select for this anyway, since most people probably wouldn't mark multiple packages at once.

Allow the database and the manifest repo URLs to be changed, at least in the config file.

This will allow people to point it to another package list in case the default one changes or goes down. I want multiple sources to be supported eventually, but this would be a good first step. Preferably this would be in a file like sources.txt in the winget-frontends folder to allow for multiple sources, but for now the config file is an easy place to put it.

Bug: Can't install packages like crystaldiskmark as "-e" isn't passed to winget.

The -e is very important in this case, as it specifies to get that exact package name. This is happening because there are two crystaldiskmark packages and it gets confused. There will soon be a bugfix update (likely 0.1.0.1) to provide the -e to winget so it works correctly and doesn't complain while being nonfunctional if installing one of these packages.

A possible way to get manifest details using the SQLite database file.

I'd like it to be so that the SQLite database is read for package ID and version, and afterward look for a manifest in the local cache with that ID and version. Opening each manifest to check ID and version may be the fastest way to reliably do this, which will ensure we don't run into an issue where a package ID has a dot where it shouldn't.

If a source such as the Store source doesn't have an easily-accessible manifest zip file, something else that could be done is to run winget source update, then once it's done run winget show (PackageID) -v (PackageVersion) and use this output for the package details textbox. This output could also be used for the Description column until next application start, though that will probably require text interpretation like seeing where there's "Description: " preceded by a CrLf (since it would be a good idea to turn all Cr and Lf characters into CrLf to make things easier) and take the substring until the first CrLf (we're going to replace the other characters as I said before).

(Copied from #34)

Add a button to close the sidebar to its top-right corner.

This way the user can close it if they don't want it open. Could be helpful on smaller screens such as phones if guinget works on Windows 10 on ARM. There should also be a checkbox under View such as View>Sidebar so the sidebar can be shown or hidden on startup. This checkbox gets unchecked if the user closes the sidebar with that button, and it won't open the next time the app is started, either.

Allow software selection to be exported to a file.

This is kinda like how Mintbackup exports the software list. A good idea would be to allow this to be re-imported to select packages to install. An option to export as a batch file in addition to just a plain list in a text file would be a good idea as well.

Start moving to a sources list file by loading the sources and their URLs from a YAML file in libguinget's resources instead of it being hardcoded.

As the title says, we'll start by loading the sources from a manifest in the Resources instead of them being fully hardcoded. Eventually this will allow moving to loading from a file that can be easily modified by the user and accessible to other winget front-ends that decide to use it.

This sources file can be something like,

source
  # Source ID used to differentiate between 
  # sources. Will be used in place of the "-display-name:"
  # field if that one's not available.
  id: "winget"
    # Specify whether this source should be updated and loaded.
    -active-source: "True"
    # What's shown in the "refresh cache" 
    # window. Maybe it would be a good idea to also 
    # display whether we're updating the database or 
    # the manifests at the current time. This could 
    # also be used in a sources manager program.
    -display-name: "Microsoft/winget-pkgs"
    # URLs that the manifest archive and database
    # are downloaded from.
    -manifest-archive-url: "https://github.com/Microsoft/winget-pkgs"
    -database-url: "(insert database URL here)"
    # Can't use the display name to determine the 
    # cache root directories, so we'll specify them. 
    # Getting this from the URL automatically 
    # would be a good idea.
    -manifest-archive-cache-dir-root: "winget-pkgs"
    -database-cache-dir-root: "winget-db"
    # While unlikely, it's possible that other 
    # databases could have a different filename 
    # for itself, so this is just in case.
    -database-file-name: "Index.db"
    # Some repos have all the manifests in the 
    # root rather than a subfolder, such as the 
    # mirror repo on GitHub. By default, we'll look 
    # under the "manifests" subfolder, though.
    -manifests-in-root: "False"
    -manifest-path-subfolder: "\manifests\"

source
  id: "msstore"
    # Etc.

Additionally, this will have to have a field to determine whether manifests are discovered based on package ID and version from the database (default for winget-pkgs/winget-db), or whether it has to grab the manifests from the Internet based on a path from the pathparts table (which would have to be used for the Store source). The Store database has pathparts all in one string, so that should be easy as long as it stays that way. Update: the Store source is now REST-based, rather than using a database.

Edit: The default winget source also has pathparts all in one string now too (actually, I don't think it does, and I was just confused and looking at the wrong thing), so I can just add support for using pathparts manifests from the Internet instead of having to download and extract the full repo all at once. For this to work, I'll have to save each manifest in the cache so that we don't use up the user's bandwidth too much. Not sure about how to get all the manifests with this, though.
Maybe this won't work, as I still need to figure out how to get the parent values to put the paths together properly. For example, this is the manifest for the Yukino package as shown in the top of the ids table: https://winget.azureedge.net/cache/manifests/z/ZYROUGE/Yukino/1.0.9-beta.0/9f4b-ZYROUGE.Yukino.yaml
Edit again: I think I figured it out. You get the manifest filename from the manifests table's pathpart column, then you look at the pathparts table. Look at the manifest filename row's parent column value, and go to that rowid column number. Prepend a forward-slash (/) before the manifest filename, then put in the value in that row's pathpart column. Keep looking at the parent column value and going to that rowid number and prepending the slash and the pathpart column's value until you get to the parent value saying a rowid value of 1. Then you'll go to rowid column value 1, which is just "manifests", and that's actually the subfolder in the /cache/ directory on Microsoft's server, or the "manifests" folder in the GitHub repo. That row has a parent of NULL, but I don't currently know how to deal with a null value, but once that's hit, we have the path to that specific manifest and can move on after appending it to the source URL.
Pathparts just give you the full manifests now

Manifest validation window layout ideas.

The window should be resizable, and the output textbox should change its size to match the window. The file textbox next to the browse button should also change its size. Buttons should remain the same size.

Maybe do something like this for the output:

> winget validate "C:\0.1.0.1.yaml"
Validation complete.

The "validation complete" is winget's output, and the line above it is what's passed to winget, which in this case is just an example.

If there are any issues, they'd be displayed in the textbox and it would be easy to copy-and-paste them or read all of them rather than using a messagebox.

There could be a textbox with a browse button next to it, and probably below the browse button would be the "Validate" button.

Perhaps there could be a close button at the bottom, rather than having people use the X button.

Allow user to choose whether to run installers interactively or hidden by default instead of what it usually does.

What it usually does is it just shows progress and runs automatically. In some situations like VLC and LibreOffice, the user may want to install interactively.

Probably should have interactive installation as an option in addition to the default at minimum, then maybe later add an option to hide progress.

Interactive installation uses -i and fully-silent uses -h.

Maybe these could be the radio buttons for it:
Groupbox header: "Installer visibility"

  • Install silently with progress (winget install "package"; default)
  • Install silently without progress (winget install "package" -h)
  • Install interactively (winget install "package" -i)

Add info on package details textbox to v0.1-prealpha1 changelog.

Forgot to do this earlier. Probably should mention that you can resize the textbox's splitview area, too. Maybe mention the detail columns currently available as well.

Saying that each version of a package is listed as if it were a separate package for now until a window to force installing a specific version (like Synaptic) is ready is a good idea.

Show all available versions in a dropdown in the datagridview, and have this default to the latest version as specified by the SQLite index.

This should make it easier to transition to allowing specific versions to be selected for installation from a Properties window while also working with the current method of copying package details into the Confirm changes window.

Getting the details from the database should be able to be done by combining the package ID and package version tables together to determine the latest one.

Once that's done, the previous versions can be determined by getting the folder for the latest version's Yaml file and ignoring the file itself, just getting all the files in that folder and putting their versions in the dropdown.

Getting details from each Yaml file can be done by combining the version number with the path and ".yaml". If the yaml file can't be found, the package ID/name should be added to the front of it, as the yaml manifest may be one that conforms to Microsoft's manifest spec v0.2 (which requires the package name/ID at the front).

Save selections when marking packages to install so that refreshing the cache doesn't remove the user's selections.

This could be stored in a yaml file. Something like this maybe:

-Package
    - PkgId: (id)
    - Version: (marked version)
    - Action: (selected action)

If the user chooses to "Do nothing", the package's entry will be removed from the list. Could be useful to create a command-line application for this, one with the following example commands:
cli-guinget-mark.exe --action "Install" --pkgid "7zip.7zip" --version "19.0.0". The "Do nothing" action would be "Unmark".

If the user refreshes the cache or accidentally closes guinget, we'll load their selections from this file. As it is, refreshing the cache de-selects any package that's been marked for changes, and that's not really good.

Got this idea from apt-mark, though I don't really know how apt-mark works with regards to marking packages.

Organize some menus like Octopi.

For example:

  • File
    • Refresh cache (Ctrl+R)
    • (separator)
    • Install package from manifest...
    • (separator)
    • Exit
  • Tools
    • Sources editor...
    • (separator)
    • Options...

Most of the rest of the menus will be more like Synaptic, though.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.