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

Implementation of Open with UniGetUI + unigetui:// deep link #2686

Merged
merged 15 commits into from
Aug 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions InstallerExtras/CustomMessages.iss
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ RegInst=Perform a regular installation
RegStartMmenuIcon=Create a shortcut on the Start menu
RegDesktopIcon=Create a shortcut on the Desktop
ChocoInstall=Install Chocolatey
PackageBundleName=UniGetUI package bundle

; Armenian
Armenian.InstallType=Տեղադրման տեսակը
Expand All @@ -18,6 +19,7 @@ Armenian.RegInst=Կատարել սովորական տեղադրում
Armenian.RegStartMmenuIcon=Ստեղծեք դյուրանցում Start ընտրացանկում
Armenian.RegDesktopIcon=Ստեղծեք դյուրանցում աշխատասեղանի վրա
Armenian.ChocoInstall=Ինստալացնել Chocolatey
Armenian.PackageBundleName=UniGetUI փաթեթի փաթեթ

; BrazilianPortuguese
BrazilianPortuguese.InstallType=Tipo de instalação
Expand All @@ -27,6 +29,7 @@ BrazilianPortuguese.RegInst=Realizar uma instalação regular
BrazilianPortuguese.RegStartMmenuIcon=Criar um atalho no menu Iniciar
BrazilianPortuguese.RegDesktopIcon=Criar um atalho na área de trabalh
BrazilianPortuguese.ChocoInstall=Instalar Chocolatey
BrazilianPortuguese.PackageBundleName=Coleção de pacotes UniGetUI

; Catalan
Catalan.InstallType=Tipus d'instal·lació
Expand All @@ -36,6 +39,7 @@ Catalan.RegInst=Feu una instal·lació regular
Catalan.RegStartMmenuIcon=Creeu una drecera al menú Inici
Catalan.RegDesktopIcon=Creeu una drecera a l'Escriptori
Catalan.ChocoInstall=Instal·lar Chocolatey
Catalan.PackageBundleName=Col·lecció de paquets de l'UniGetUI

; Corsican
Corsican.InstallType=Tipu d'installazione
Expand All @@ -45,6 +49,7 @@ Corsican.RegInst=Eseguite una installazione regulare
Corsican.RegStartMmenuIcon=Create una scorciatoia nant'à u menu Start
Corsican.RegDesktopIcon=Create una scorciatoia nant'à u Desktop
Corsican.ChocoInstall=Stallà Chocolatey
Corsican.PackageBundleName=Raccolta di pacchetti UniGetUI

; Czech
Czech.InstallType=Typ instalace
Expand All @@ -54,6 +59,7 @@ Czech.RegInst=Proveďte běžnou instalaci
Czech.RegStartMmenuIcon=Vytvořte zástupce v nabídce Start
Czech.RegDesktopIcon=Vytvořte zástupce na ploše
Czech.ChocoInstall=Nainstalovat Chocolatey
Czech.PackageBundleName=Kolekce balíčků UniGetUI

; Danish
Danish.InstallType=Installationstype
Expand All @@ -63,6 +69,7 @@ Danish.RegInst=Udfør en almindelig installation
Danish.RegStartMmenuIcon=Opret en genvej på Start-menuen
Danish.RegDesktopIcon=Opret en genvej på skrivebordet
Danish.ChocoInstall=Installer Chocolatey
Danish.PackageBundleName=Samling af UniGetUI-pakker

; Dutch
Dutch.InstallType=Installatietype
Expand All @@ -72,6 +79,7 @@ Dutch.RegInst=Voer een normale installatie uit
Dutch.RegStartMmenuIcon=Maak een snelkoppeling in het Startmenu
Dutch.RegDesktopIcon=Maak een snelkoppeling op het bureaublad
Dutch.ChocoInstall=Installeer Chocolatey
Dutch.PackageBundleName=Verzameling UniGetUI-pakketten

; Finnish
Finnish.InstallType=Asennustyyppi
Expand All @@ -81,6 +89,7 @@ Finnish.RegInst=Suorita tavallinen asennus
Finnish.RegStartMmenuIcon=Luo pikakuvake Käynnistä-valikkoon
Finnish.RegDesktopIcon=Luo pikakuvake työpöydälle
Finnish.ChocoInstall=Asenna Chocolatey
Finnish.PackageBundleName=Kokoelma UniGetUI-paketteja

; French
French.InstallType=Type d'installation
Expand All @@ -90,6 +99,7 @@ French.RegInst=Effectuer une installation normale
French.RegStartMmenuIcon=Créer un raccourci dans le menu Démarrer
French.RegDesktopIcon=Créer un raccourci sur le bureau
French.ChocoInstall=Installer Chocolatey
French.PackageBundleName=Collection de packages UniGetUI

; German
German.InstallType=Installationstyp
Expand All @@ -99,6 +109,7 @@ German.RegInst=Führe eine normale Installation durch
German.RegStartMmenuIcon=Erstelle eine Verknüpfung im Startmenü
German.RegDesktopIcon=Erstelle eine Verknüpfung auf dem Desktop
German.ChocoInstall=Chocolatey installieren
German.PackageBundleName=Sammlung von UniGetUI-Paketen

; Hebrew
Hebrew.InstallType=סוג התקנה
Expand All @@ -108,6 +119,7 @@ Hebrew.RegInst=בצע התקנה רגילה
Hebrew.RegStartMmenuIcon=צור קיצור דרך בתפריט התחל
Hebrew.RegDesktopIcon=צור קיצור דרך בשולחן העבודה
Hebrew.ChocoInstall=להתקין את Chocolatey
Hebrew.PackageBundleName=אוסף חבילות UniGetUI

; Icelandic
Icelandic.InstallType=Uppsetningargerð
Expand All @@ -117,6 +129,7 @@ Icelandic.RegInst=Framkvæma reglulega uppsetningu
Icelandic.RegStartMmenuIcon=Búa til flýtileið á Start valmyndinni
Icelandic.RegDesktopIcon=Búa til flýtileið á skjáborðinu
Icelandic.ChocoInstall=Setja upp Chocolatey
Icelandic.PackageBundleName=Safn af UniGetUI pakka

; Italian
Italian.InstallType=Tipo di installazione
Expand All @@ -126,6 +139,7 @@ Italian.RegInst=Esegui installazione normale
Italian.RegStartMmenuIcon=Crea una scorciatoia nel menu Start
Italian.RegDesktopIcon=Crea una scorciatoia sul Desktop
Italian.ChocoInstall=Installa Chocolatey
Italian.PackageBundleName=Raccolta di pacchetti UniGetUI

; Japanese
Japanese.InstallType=インストールの種類
Expand All @@ -135,6 +149,7 @@ Japanese.RegInst=通常のインストールを実行します
Japanese.RegStartMmenuIcon=スタート メニューにショートカットを作成する
Japanese.RegDesktopIcon=デスクトップにショートカットを作成する
Japanese.ChocoInstall=Chocolatey をインストールする
Japanese.PackageBundleName=UniGetUI パッケージのコレクション

; Korean
Korean.InstallType=설치 유형
Expand All @@ -144,6 +159,7 @@ Korean.RegInst=일반 설치 수행
Korean.RegStartMmenuIcon=시작 메뉴에 바로가기 만들기
Korean.RegDesktopIcon=바탕화면에 바로가기 생성
Korean.ChocoInstall=초콜릿 설치
Korean.PackageBundleName=UniGetUI 패키지 컬렉션

; Norwegian
Norwegian.InstallType=Installasjonstype
Expand All @@ -153,6 +169,7 @@ Norwegian.RegInst=Utfør en vanlig installasjon
Norwegian.RegStartMmenuIcon=Lag en snarvei på Start-menyen
Norwegian.RegDesktopIcon=Lag en snarvei på skrivebordet
Norwegian.ChocoInstall=Installer Chocolatey
Norwegian.PackageBundleName=Samling av UniGetUI-pakker

; Polish
Polish.InstallType=Typ instalacji
Expand All @@ -162,6 +179,7 @@ Polish.RegInst=Przeprowadź zwykłą instalację
Polish.RegStartMmenuIcon=Utwórz skrót w menu Start
Polish.RegDesktopIcon=Utwórz skrót na pulpicie
Polish.ChocoInstall=Zainstaluj Chocolatey
Polish.PackageBundleName=Kolekcja pakietów UniGetUI

; Portuguese
Portuguese.InstallType=Tipo de instalação
Expand All @@ -171,6 +189,7 @@ Portuguese.RegInst=Execute uma instalação regular
Portuguese.RegStartMmenuIcon=Criar um atalho no menu Iniciar
Portuguese.RegDesktopIcon=Criar um atalho na área de trabalho
Portuguese.ChocoInstall=Instalar o Chocolatey
Portuguese.PackageBundleName=Coleção de pacotes UniGetUI

; Russian
Russian.InstallType=Тип установки
Expand All @@ -180,6 +199,7 @@ Russian.RegInst=Выполнить обычную установку
Russian.RegStartMmenuIcon=Создать ярлык в меню «Пуск»
Russian.RegDesktopIcon=Создать ярлык на рабочем столе
Russian.ChocoInstall=Установить Chocolatey
Russian.PackageBundleName=

; Slovenian
Slovenian.InstallType=Vrsta namestitve
Expand All @@ -189,6 +209,7 @@ Slovenian.RegInst=Izvedite običajno namestitev
Slovenian.RegStartMmenuIcon=Ustvarite bližnjico v meniju Start
Slovenian.RegDesktopIcon=Ustvarite bližnjico na namizju
Slovenian.ChocoInstall=Namesti Chocolatey
Slovenian.PackageBundleName=Коллекция пакетов UniGetUI

; Spanish
Spanish.InstallType=Tipo de instalación
Expand All @@ -198,6 +219,7 @@ Spanish.RegInst=Realizar una instalación regular
Spanish.RegStartMmenuIcon=Crear un acceso directo en el menú Inicio
Spanish.RegDesktopIcon=Crear un atajo en el escritorio
Spanish.ChocoInstall=Instalar Chocolatey
Spanish.PackageBundleName=Coleción de paquetes del UniGetUI

; Turkish
Turkish.InstallType=Yükleme türü
Expand All @@ -207,6 +229,7 @@ Turkish.RegInst=Normal bir kurulum gerçekleştir
Turkish.RegStartMmenuIcon=Başlat menüsünde bir kısayol oluştur
Turkish.RegDesktopIcon=Masaüstünde bir kısayol oluştur
Turkish.ChocoInstall=Chocolatey'i yükleyin
Turkish.PackageBundleName=UniGetUI paketlerinin toplanması

; Ukrainian
Ukrainian.InstallType=Тип інсталяції
Expand All @@ -216,3 +239,4 @@ Ukrainian.RegInst=Виконайте звичайну установку
Ukrainian.RegStartMmenuIcon=Створити ярлик у меню «Пуск».
Ukrainian.RegDesktopIcon=Створити ярлик на робочому столі
Ukrainian.ChocoInstall=Встановити Chocolatey
Ukrainian.PackageBundleName=Колекція пакетів UniGetUI
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ To translate UniGetUI to other languages or to update an old translation, please
| <img src='https://flagcdn.com/ad.svg' width=20> &nbsp; Catalan - Català | 100% | [marticliment](https://github.com/marticliment) |
| <img src='https://flagcdn.com/cz.svg' width=20> &nbsp; Czech - Čeština | 98% | [mlisko](https://github.com/mlisko), [panther7](https://github.com/panther7), [xtorlukas](https://github.com/xtorlukas) |
| <img src='https://flagcdn.com/dk.svg' width=20> &nbsp; Danish - Dansk | 74% | [AAUCrisp](https://github.com/AAUCrisp), [mikkolukas](https://github.com/mikkolukas), [yrjarv](https://github.com/yrjarv) |
| <img src='https://flagcdn.com/de.svg' width=20> &nbsp; German - Deutsch | 98% | [1270o1](https://github.com/1270o1), [alxhu-dev](https://github.com/alxhu-dev), [CanePlayz](https://github.com/CanePlayz), [Datacra5H](https://github.com/Datacra5H), [ebnater](https://github.com/ebnater), [michaelmairegger](https://github.com/michaelmairegger), [Seeloewen](https://github.com/Seeloewen), [yrjarv](https://github.com/yrjarv) |
| <img src='https://flagcdn.com/de.svg' width=20> &nbsp; German - Deutsch | 100% | [1270o1](https://github.com/1270o1), [alxhu-dev](https://github.com/alxhu-dev), [CanePlayz](https://github.com/CanePlayz), [Datacra5H](https://github.com/Datacra5H), [ebnater](https://github.com/ebnater), [michaelmairegger](https://github.com/michaelmairegger), [Seeloewen](https://github.com/Seeloewen), [yrjarv](https://github.com/yrjarv) |
| <img src='https://flagcdn.com/gr.svg' width=20> &nbsp; Greek - Ελληνικά | 97% | [antwnhsx](https://github.com/antwnhsx), [thunderstrike116](https://github.com/thunderstrike116), [wobblerrrgg](https://github.com/wobblerrrgg) |
| <img src='https://flagcdn.com/ee.svg' width=20> &nbsp; Estonian - Eesti | 18% | [artjom3729](https://github.com/artjom3729) |
| <img src='https://flagcdn.com/gb.svg' width=20> &nbsp; English - English | 100% | [marticliment](https://github.com/marticliment), [ppvnf](https://github.com/ppvnf) |
Expand All @@ -137,11 +137,11 @@ To translate UniGetUI to other languages or to update an old translation, please
| <img src='https://flagcdn.com/id.svg' width=20> &nbsp; Indonesian - Bahasa Indonesia | 82% | [arthackrc](https://github.com/arthackrc), [joenior](https://github.com/joenior) |
| <img src='https://flagcdn.com/jp.svg' width=20> &nbsp; Japanese - 日本語 | 92% | [nob-swik](https://github.com/nob-swik), sho9029, [tacostea](https://github.com/tacostea), Yuki Takase |
| <img src='https://flagcdn.com/kr.svg' width=20> &nbsp; Korean - 한국어 | 83% | [minbert](https://github.com/minbert), [shblue21](https://github.com/shblue21), [VenusGirl](https://github.com/VenusGirl) |
| <img src='https://flagcdn.com/lt.svg' width=20> &nbsp; Lithuanian - Lietuvių | 72% | [dziugas1959](https://github.com/dziugas1959), Džiugas Januševičius |
| <img src='https://flagcdn.com/lt.svg' width=20> &nbsp; Lithuanian - Lietuvių | 75% | [dziugas1959](https://github.com/dziugas1959), Džiugas Januševičius |
| <img src='https://flagcdn.com/mk.svg' width=20> &nbsp; Macedonian - Македонски | 62% | LordDeatHunter |
| <img src='https://flagcdn.com/no.svg' width=20> &nbsp; Norwegian (bokmål) | 98% | [yrjarv](https://github.com/yrjarv) |
| <img src='https://flagcdn.com/no.svg' width=20> &nbsp; Norwegian (nynorsk) | 98% | [yrjarv](https://github.com/yrjarv) |
| <img src='https://flagcdn.com/nl.svg' width=20> &nbsp; Dutch - Nederlands | 98% | [abbydiode](https://github.com/abbydiode), [CateyeNL](https://github.com/CateyeNL), [Stephan-P](https://github.com/Stephan-P) |
| <img src='https://flagcdn.com/nl.svg' width=20> &nbsp; Dutch - Nederlands | 100% | [abbydiode](https://github.com/abbydiode), [CateyeNL](https://github.com/CateyeNL), [Stephan-P](https://github.com/Stephan-P) |
| <img src='https://flagcdn.com/pl.svg' width=20> &nbsp; Polish - Polski | 98% | [KamilZielinski](https://github.com/KamilZielinski), [kwiateusz](https://github.com/kwiateusz), [RegularGvy13](https://github.com/RegularGvy13), [ThePhaseless](https://github.com/ThePhaseless) |
| <img src='https://flagcdn.com/br.svg' width=20> &nbsp; Portuguese (Brazil) | 98% | [maisondasilva](https://github.com/maisondasilva), [ppvnf](https://github.com/ppvnf), [Rodrigo-Matsuura](https://github.com/Rodrigo-Matsuura), [thiagojramos](https://github.com/thiagojramos), [wanderleihuttel](https://github.com/wanderleihuttel) |
| <img src='https://flagcdn.com/pt.svg' width=20> &nbsp; Portuguese (Portugal) | 98% | [PoetaGA](https://github.com/PoetaGA), [Tiago_Ferreira](https://github.com/Tiago_Ferreira) |
Expand All @@ -162,7 +162,7 @@ To translate UniGetUI to other languages or to update an old translation, please
| <img src='https://flagcdn.com/cn.svg' width=20> &nbsp; Simplified Chinese (China) | 100% | Aaron Liu, adfnekc, [arthurfsy2](https://github.com/arthurfsy2), [bai0012](https://github.com/bai0012), BUGP Association, ciaran, CnYeSheng, Cololi, [dongfengweixiao](https://github.com/dongfengweixiao), [FloatStream](https://github.com/FloatStream), [seanyu0](https://github.com/seanyu0), [Sigechaishijie](https://github.com/Sigechaishijie), [SpaceTimee](https://github.com/SpaceTimee), Yisme |
| <img src='https://flagcdn.com/tw.svg' width=20> &nbsp; Traditional Chinese (Taiwan) | 93% | Aaron Liu, CnYeSheng, Cololi, [Henryliu880922](https://github.com/Henryliu880922), [yrctw](https://github.com/yrctw) |

Last updated: Sat Aug 31 00:12:02 2024
Last updated: Sat Aug 31 23:37:24 2024
<!-- END Autogenerated translations -->


Expand Down
13 changes: 13 additions & 0 deletions UniGetUI.iss
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,19 @@ Name: "regularinstall\chocoinstall"; Description: "{cm:ChocoInstall}"; GroupDesc
[Registry]
Root: HKCU; Subkey: "SOFTWARE\Microsoft\Windows\CurrentVersion\Run"; ValueType: string; ValueName: "WingetUI"; ValueData: """{app}\UniGetUI.exe"" --daemon"; Flags: uninsdeletevalue; Tasks: regularinstall

// Register the unigetui:// deep link
Root: HKA; Subkey: "Software\Classes\unigetui"; ValueType: "string"; ValueData: "URL:UniGetUI Protocol"; Flags: uninsdeletekey
Root: HKA; Subkey: "Software\Classes\unigetui"; ValueType: "string"; ValueName: "URL Protocol"; ValueData: ""
Root: HKA; Subkey: "Software\Classes\unigetui\DefaultIcon"; ValueType: "string"; ValueData: "{app}\{#MyAppExeName},0"
Root: HKA; Subkey: "Software\Classes\unigetui\shell\open\command"; ValueType: "string"; ValueData: """{app}\{#MyAppExeName}"" ""%1"""

// Register the .ubundle file type
Root: HKA; Subkey: "Software\Classes\.ubundle"; ValueType: string; ValueData: "UniGetUI.PackageBundle"; Flags: uninsdeletekey
Root: HKA; Subkey: "Software\Classes\UniGetUI.PackageBundle"; ValueType: string; ValueData: {cm:PackageBundleName}; Flags: uninsdeletekey
Root: HKA; Subkey: "Software\Classes\UniGetUI.PackageBundle\DefaultIcon"; ValueType: string; ValueData: "{app}\{#MyAppExeName},0"; Flags: uninsdeletekey
Root: HKA; Subkey: "Software\Classes\UniGetUI.PackageBundle\shell\open\command"; ValueType: string; ValueData: """{app}\{#MyAppExeName}"" ""%1"""; Flags: uninsdeletekey


[Files]
Source: "unigetui_bin\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion; BeforeInstall: TripleKill('WingetUI.exe', 'UniGetUI.exe', 'choco.exe');
Source: "unigetui_bin\*"; DestDir: "{app}"; Flags: createallsubdirs ignoreversion recursesubdirs;
Expand Down
36 changes: 36 additions & 0 deletions src/UniGetUI.Core.Classes.Tests/ObservableQueueTests.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
namespace UniGetUI.Core.Classes.Tests;

public class ObservableQueueTests
{
[Fact]
public void TestObservableQueue()
{
var queue = new ObservableQueue<int>();

List<int> enqueuedElements = new();
List<int> dequeuedElements = new();

queue.ItemEnqueued += (s, e) => enqueuedElements.Add(e.Item);
queue.ItemDequeued += (s, e) => dequeuedElements.Add(e.Item);

queue.Enqueue(1);
queue.Enqueue(2);
Assert.Equal(1, queue.Dequeue());
queue.Enqueue(4);
queue.Enqueue(3);

Assert.Equal(2, queue.Dequeue());
Assert.Equal(4, queue.Dequeue());

Assert.Equal(4, enqueuedElements.Count);
Assert.Equal(1, enqueuedElements[0]);
Assert.Equal(2, enqueuedElements[1]);
Assert.Equal(4, enqueuedElements[2]);
Assert.Equal(3, enqueuedElements[3]);

Assert.Equal(3, dequeuedElements.Count);
Assert.Equal(1, dequeuedElements[0]);
Assert.Equal(2, dequeuedElements[1]);
Assert.Equal(4, dequeuedElements[2]);
}
}
25 changes: 25 additions & 0 deletions src/UniGetUI.Core.Classes/ObservableQueue.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
namespace UniGetUI.Core.Classes;

public class ObservableQueue<T> : Queue<T>
{
public class EventArgs(T item)
{
public readonly T Item = item;
}

public event EventHandler<EventArgs>? ItemEnqueued;
public event EventHandler<EventArgs>? ItemDequeued;

public new void Enqueue(T item)
{
base.Enqueue(item);
ItemEnqueued?.Invoke(this, new EventArgs(item));
}

public new T Dequeue()
{
T item = base.Dequeue();
ItemDequeued?.Invoke(this, new EventArgs(item));
return item;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"bn": "82%",
"cs": "98%",
"da": "74%",
"de": "98%",
"el": "97%",
"es": "98%",
"et": "18%",
Expand All @@ -21,7 +20,7 @@
"ja": "92%",
"kn": "0%",
"ko": "83%",
"lt": "74%",
"lt": "75%",
"mk": "62%",
"nb": "98%",
"nn": "98%",
Expand Down
Loading
Loading