diff --git a/README.md b/README.md
index e2199d5..6622ee1 100644
--- a/README.md
+++ b/README.md
@@ -46,6 +46,8 @@
➕ Easy Addon Install: Just use the install Button like stremio v4, no need to copy paste urls
💼 Portable Version: Fully portable version including WebView2.
⚙️ App Settings: Customize options like CloseOnExit, PauseOnMinimize, and PauseOnLostFocus and more.
+ 🔄 Built-in Autoupdate: Built-in autoupdater. No need to always download from GitHub.
+ 📦 Scoop and Chocolatey: Support for Scoop and Choco for ease of use.
@@ -67,7 +69,10 @@
scoop bucket add zarg https://github.com/zaarrg/scoop
scoop install stremio-desktop-v5
# Update
+ scoop update zarg
scoop update stremio-desktop-v5
+ # Uninstall
+ scoop uninstall stremio-desktop-v5
```
4. 🍫 **Chocolatey**
```shell
@@ -75,6 +80,8 @@
choco install stremio-desktop-v5 -y
# Update
choco upgrade stremio-desktop-v5 -y
+ # Uninstall
+ choco uninstall stremio-desktop --yes
```
diff --git a/build/build_checksums.js b/build/build_checksums.js
index a9b64da..9600e72 100644
--- a/build/build_checksums.js
+++ b/build/build_checksums.js
@@ -215,7 +215,7 @@ const [,, OPENSSL_BIN, GIT_TAG, SHELL_VERSION, SERVER_VERSION] = process.argv;
updateStremioNuspec(CHOCO_NUSPEC_PATH, SHELL_VERSION);
// 9) Update chocolateyinstall.ps1 URLs
- updateChocolateyInstall(CHOCO_INSTALL_PS1_PATH, GIT_TAG, SHELL_VERSION);
+ updateChocolateyInstall(CHOCO_INSTALL_PS1_PATH, GIT_TAG, SHELL_VERSION, exeHash_x64, exeHash_x86);
// 10) Update the Scoop manifest (stremio-desktop-v5.json)
updateScoopManifest(SCOOP_MANIFEST_PATH, GIT_TAG, SHELL_VERSION, exeHash_x64, exeHash_x86);
@@ -282,24 +282,33 @@ function updateStremioNuspec(nuspecPath, newVersion) {
}
// 9) Update chocolateyinstall.ps1 with new GIT_TAG + SHELL_VERSION in the URLs
-function updateChocolateyInstall(ps1Path, gitTag, newVersion) {
+function updateChocolateyInstall(ps1Path, gitTag, newVersion, hash64, hash86) {
checkFileExists(ps1Path, "chocolateyinstall.ps1");
let content = fs.readFileSync(ps1Path, "utf8");
- // Regex for the 64-bit block:
- const pattern64 = /(\[Environment\]::Is64BitOperatingSystem\)\s*\{\s*\$packageArgs\['url'\]\s*=\s*')([^']+)(')/m;
- content = content.replace(pattern64,
- `$1https://github.com/Zaarrg/stremio-desktop-v5/releases/download/${gitTag}/Stremio.${newVersion}-x64.exe$3`
- );
+ // We'll build a single block that covers both if/else in one go.
+ const newBlock = `
+if ([Environment]::Is64BitOperatingSystem) {
+ $packageArgs['url'] = 'https://github.com/Zaarrg/stremio-desktop-v5/releases/download/${gitTag}/Stremio.${newVersion}-x64.exe'
+ $packageArgs['checksum'] = '${hash64}'
+ $packageArgs['checksumType'] = 'sha256'
+} else {
+ $packageArgs['url'] = 'https://github.com/Zaarrg/stremio-desktop-v5/releases/download/${gitTag}/Stremio.${newVersion}-x86.exe'
+ $packageArgs['checksum'] = '${hash86}'
+ $packageArgs['checksumType'] = 'sha256'
+}
+`;
- // Regex for the 32-bit block:
- const pattern86 = /(\}\s*else\s*\{\s*\$packageArgs\['url'\]\s*=\s*')([^']+)(')/m;
- content = content.replace(pattern86,
- `$1https://github.com/Zaarrg/stremio-desktop-v5/releases/download/${gitTag}/Stremio.${newVersion}-x86.exe$3`
- );
+ // Regex to capture the entire if...else block (non-greedy):
+ // This should match from "if ([Environment]::Is64BitOperatingSystem) {"
+ // until the closing "}" of the else block.
+ const pattern = /if\s*\(\[Environment\]::Is64BitOperatingSystem\)\s*\{[\s\S]+?\}\s*else\s*\{[\s\S]+?\}/m;
+
+ // Replace the entire old block with newBlock
+ content = content.replace(pattern, newBlock.trim());
fs.writeFileSync(ps1Path, content, "utf8");
- console.log(`Updated chocolateyinstall.ps1 URLs to version ${newVersion}`);
+ console.log(`Updated chocolateyinstall.ps1 with new version=${newVersion}, hash64=${hash64}, hash86=${hash86}`);
}
// 10) Update the Scoop manifest stremio-desktop-v5.json
diff --git a/utils/chocolatey/stremio-desktop-v5.5.0.8.nupkg b/utils/chocolatey/stremio-desktop-v5.5.0.8.nupkg
index e499b26..2cee0e9 100644
Binary files a/utils/chocolatey/stremio-desktop-v5.5.0.8.nupkg and b/utils/chocolatey/stremio-desktop-v5.5.0.8.nupkg differ
diff --git a/utils/chocolatey/stremio.nuspec b/utils/chocolatey/stremio.nuspec
index 7a02ecf..7b9cad9 100644
--- a/utils/chocolatey/stremio.nuspec
+++ b/utils/chocolatey/stremio.nuspec
@@ -9,6 +9,11 @@
https://github.com/Zaarrg/stremio-desktop-v5
https://raw.githubusercontent.com/zaarrg/stremio-desktop-v5/webview-windows/images/stremio.png
Stremio Desktop v5 Community app with the latest Stremio web UI v5, built with WebView2
+ https://github.com/Zaarrg/stremio-desktop-v5
+ https://github.com/Zaarrg/stremio-desktop-v5/issues
+ https://github.com/Zaarrg/stremio-desktop-v5#-stremio-desktopcommunity
+ Stremio Community build using WebView2. Supports latest features. Always up to date with Stremio web v5. Full MPV player support like local files, hdr, dolby atmos and dv content.
+ See https://github.com/Zaarrg/stremio-desktop-v5/releases for changes.
stremio video streaming media
https://github.com/Zaarrg/stremio-desktop-v5/blob/master/LICENSE
false
diff --git a/utils/chocolatey/tools/chocolateyinstall.ps1 b/utils/chocolatey/tools/chocolateyinstall.ps1
index 4ea2309..f3eec36 100644
--- a/utils/chocolatey/tools/chocolateyinstall.ps1
+++ b/utils/chocolatey/tools/chocolateyinstall.ps1
@@ -1,16 +1,23 @@
$packageName = 'stremio-desktop-v5'
$toolsDir = Split-Path $MyInvocation.MyCommand.Definition
+
$packageArgs = @{
- packageName = $packageName
- fileType = 'exe'
- silentArgs = '/S'
- validExitCodes= @(0)
+ packageName = $packageName
+ fileType = 'exe'
+ silentArgs = '/S'
+ validExitCodes = @(0)
}
+
+
if ([Environment]::Is64BitOperatingSystem) {
- $packageArgs['url'] = 'https://github.com/Zaarrg/stremio-desktop-v5/releases/download/5.0.0-beta.8/Stremio.5.0.8-x64.exe'
+ $packageArgs['url'] = 'https://github.com/Zaarrg/stremio-desktop-v5/releases/download/5.0.0-beta.8/Stremio.5.0.8-x64.exe'
+ $packageArgs['checksum'] = 'a8228526cbbbffa1265b437109f6d570f31705bae71eb2be11192b02a0bff1ba'
+ $packageArgs['checksumType'] = 'sha256'
} else {
- $packageArgs['url'] = 'https://github.com/Zaarrg/stremio-desktop-v5/releases/download/5.0.0-beta.8/Stremio.5.0.8-x86.exe'
+ $packageArgs['url'] = 'https://github.com/Zaarrg/stremio-desktop-v5/releases/download/5.0.0-beta.8/Stremio.5.0.8-x86.exe'
+ $packageArgs['checksum'] = '84cca8fcc6635792e273af3220db505024c7f36aef4d8ae588ef895a5ff9fc3d'
+ $packageArgs['checksumType'] = 'sha256'
}
Install-ChocolateyPackage @packageArgs