Skip to content

Commit

Permalink
details
Browse files Browse the repository at this point in the history
  • Loading branch information
marticliment committed Oct 6, 2022
1 parent dc6ce4d commit 910bb1b
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 13 deletions.
10 changes: 5 additions & 5 deletions WingetUI.iss
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ SolidCompression=yes
WizardStyle=classic
WizardImageFile=Y:\WingetUI-Store\INSTALLER.BMP
DisableWelcomePage=no
UsePreviousTasks=no
UsePreviousTasks=yes


[Languages]
Expand All @@ -50,11 +50,11 @@ begin
Exec('taskkill.exe', '/f /im ' + '"' + FileName + '"', '', SW_HIDE,
ewWaitUntilTerminated, ResultCode);
end;
[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "Desktop icon"; Flags: unchecked
Name: "ignorescoop"; Description: "Keep scoop as it is (best when updating WingetUI)"; GroupDescription: "Scoop Package Manager"; Flags: exclusive
Name: "installscoop"; Description: "Enable and install scoop (and its dependencies)"; GroupDescription: "Scoop Package Manager"; Flags: unchecked exclusive
Name: "disablescoop"; Description: "Disable scoop (recommended if you don't know what is happening)"; GroupDescription: "Scoop Package Manager"; Flags: unchecked exclusive
Name: "installscoop"; Description: "Enable and install scoop (for advanced users)"; GroupDescription: "Scoop Package Manager"; Flags: exclusive
Name: "disablescoop"; Description: "Do not install scoop (recommended)"; GroupDescription: "Scoop Package Manager"; Flags: exclusive unchecked

[Registry]
Root: HKCU; Subkey: "SOFTWARE\Microsoft\Windows\CurrentVersion\Run"; ValueType: string; ValueName: "WingetUI"; ValueData: """{app}\WingetUI.exe"" --daemon"; Flags: uninsdeletevalue
Expand All @@ -79,5 +79,5 @@ Filename: "{app}\remove-old.cmd"; Flags: runhidden
Filename: "{app}\install_scoop.cmd"; Flags: runhidden; Tasks: installscoop
Filename: "{app}\disable_scoop.cmd"; Flags: runhidden; Tasks: disablescoop
Filename: "{app}\vcredist.exe"; Flags: runhidden; Parameters: "/install /passive /norestart"
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall;

34 changes: 26 additions & 8 deletions wingetui/uiSections.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,15 +332,21 @@ def importPackages(self):
def finishLoadingIfNeeded(self, store: str) -> None:
if(store == "winget"):
self.countLabel.setText("Found packages: "+str(self.packageList.topLevelItemCount())+", not finished yet...")
self.packageList.label.setText(self.countLabel.text())
if self.packageList.topLevelItemCount() == 0:
self.packageList.label.setText(self.countLabel.text())
else:
self.packageList.label.setText("")
self.wingetLoaded = True
self.reloadButton.setEnabled(True)
self.filter()
self.searchButton.setEnabled(True)
self.query.setEnabled(True)
elif(store == "scoop"):
self.countLabel.setText("Found packages: "+str(self.packageList.topLevelItemCount())+", not finished yet...")
self.packageList.label.setText(self.countLabel.text())
if self.packageList.topLevelItemCount() == 0:
self.packageList.label.setText(self.countLabel.text())
else:
self.packageList.label.setText("")
self.scoopLoaded = True
self.reloadButton.setEnabled(True)
self.filter()
Expand Down Expand Up @@ -836,7 +842,10 @@ def updatelist(selff = None):
def finishLoadingIfNeeded(self, store: str) -> None:
if(store == "winget"):
self.countLabel.setText("Available updates: "+str(self.packageList.topLevelItemCount())+", not finished yet...")
self.packageList.label.setText(self.countLabel.text())
if self.packageList.topLevelItemCount() == 0:
self.packageList.label.setText(self.countLabel.text())
else:
self.packageList.label.setText("")
globals.trayMenuUpdatesList.menuAction().setText(f"{self.packageList.topLevelItemCount()} updates found")
self.wingetLoaded = True
self.reloadButton.setEnabled(True)
Expand All @@ -846,7 +855,10 @@ def finishLoadingIfNeeded(self, store: str) -> None:
elif(store == "scoop"):
self.countLabel.setText("Available updates: "+str(self.packageList.topLevelItemCount())+", not finished yet...")
globals.trayMenuUpdatesList.menuAction().setText(f"{self.packageList.topLevelItemCount()} updates found")
self.packageList.label.setText(self.countLabel.text())
if self.packageList.topLevelItemCount() == 0:
self.packageList.label.setText(self.countLabel.text())
else:
self.packageList.label.setText("")
self.scoopLoaded = True
self.filter()
self.reloadButton.setEnabled(True)
Expand Down Expand Up @@ -1428,7 +1440,10 @@ def openInfo(self, title: str, id: str, store: str, packageItem: TreeWidgetItemW
def finishLoadingIfNeeded(self, store: str) -> None:
if(store == "winget"):
self.countLabel.setText("Found packages: "+str(self.packageList.topLevelItemCount())+", not finished yet...")
self.packageList.label.setText(self.countLabel.text())
if self.packageList.topLevelItemCount() == 0:
self.packageList.label.setText(self.countLabel.text())
else:
self.packageList.label.setText("")
globals.trayMenuInstalledList.setTitle(f"{self.packageList.topLevelItemCount()} packages found")
self.wingetLoaded = True
self.reloadButton.setEnabled(True)
Expand All @@ -1437,7 +1452,10 @@ def finishLoadingIfNeeded(self, store: str) -> None:
self.query.setEnabled(True)
elif(store == "scoop"):
self.countLabel.setText("Found packages: "+str(self.packageList.topLevelItemCount())+", not finished yet...")
self.packageList.label.setText(self.countLabel.text())
if self.packageList.topLevelItemCount() == 0:
self.packageList.label.setText(self.countLabel.text())
else:
self.packageList.label.setText("")
globals.trayMenuInstalledList.setTitle(f"{self.packageList.topLevelItemCount()} packages found")
self.scoopLoaded = True
self.reloadButton.setEnabled(True)
Expand Down Expand Up @@ -1904,10 +1922,10 @@ def __init__(self, parent = None):
button.setFixedHeight(30)
button.clicked.connect(lambda: self.scoopRemoveExtraBucket())
l.addWidget(button)
button = QPushButton("Ensure scoop is properly installed")
button = QPushButton("Install scoop")
#button.setFixedWidth(350)
button.setFixedHeight(30)
button.clicked.connect(lambda: os.startfile(os.path.join(realpath, "resources/install_scoop.cmd")))
button.clicked.connect(lambda: (setSettings("DisableScoop", False), disableScoop.setChecked(False), os.startfile(os.path.join(realpath, "resources/install_scoop.cmd"))))
l.addWidget(button)
l.setContentsMargins(0, 0, 0, 0)
self.layout.addLayout(l)
Expand Down

0 comments on commit 910bb1b

Please sign in to comment.