Skip to content
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
17 changes: 2 additions & 15 deletions .github/workflows/windows-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,11 @@ jobs:
uses: dtolnay/rust-toolchain@stable
- name: Build
run: cargo build --release --features=bundled
- name: Sign executables
run: |
& 'C:\Program Files (x86)\Windows Kits\10\bin\10.0.17763.0\x86\signtool.exe' sign /f "resources\certificates\smartcode-20211118-20241118.pfx" /p ${{ secrets.WIN_CERT_PASSWORD }} /v ".\target\release\stremio-service.exe"
& 'C:\Program Files (x86)\Windows Kits\10\bin\10.0.17763.0\x86\signtool.exe' sign /f "resources\certificates\smartcode-20211118-20241118.pfx" /p ${{ secrets.WIN_CERT_PASSWORD }} /v ".\resources\bin\windows\node.exe"
& 'C:\Program Files (x86)\Windows Kits\10\bin\10.0.17763.0\x86\signtool.exe' sign /f "resources\certificates\smartcode-20211118-20241118.pfx" /p ${{ secrets.WIN_CERT_PASSWORD }} /v ".\resources\bin\windows\ffmpeg.exe"
& 'C:\Program Files (x86)\Windows Kits\10\bin\10.0.17763.0\x86\signtool.exe' sign /f "resources\certificates\smartcode-20211118-20241118.pfx" /p ${{ secrets.WIN_CERT_PASSWORD }} /v ".\resources\bin\windows\ffprobe.exe"
- name: Zip release for windows
uses: vimtor/[email protected]
with:
files: resources/bin/windows/ffmpeg.exe resources/bin/windows/ffprobe.exe resources/bin/windows/stremio-runtime.exe target/release/stremio-service.exe resources/bin/windows/server.js LICENSE.md
dest: stremio-service-windows.zip
- name: Installer
run: |
& 'C:\Program Files (x86)\Inno Setup 6\ISCC.exe' '/Sstremiosign=$qC:\Program Files (x86)\Windows Kits\10\bin\10.0.17763.0\x86\signtool.exe$q sign /f $q${{ github.workspace }}\resources\certificates\smartcode-20211118-20241118.pfx$q /p ${{ secrets.WIN_CERT_PASSWORD }} /v $f' 'setup\StremioService.iss'

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
Expand All @@ -40,15 +31,12 @@ jobs:

- name: Upload to Amazon S3
run: |
aws s3 cp --acl public-read StremioServiceSetup.exe s3://stremio-artifacts/stremio-service/${{ github.ref_name }}/
aws s3 cp --acl public-read stremio-service-windows.zip s3://stremio-artifacts/stremio-service-unsigned/${{ github.ref_name }}/

- name: Generate RC descriptor
run: |
node ./generate_descriptor.js --wait-all --tag=${{ github.ref_name }}
- name: Get current date
id: date
run: echo "TODAY_DATE=$(date +'%d %b %Y')" >> $GITHUB_OUTPUT
- name: Upload dmg and zip file to release
- name: Upload zip file to release
uses: softprops/action-gh-release@v1
with:
# Use the same name as all releases!
Expand All @@ -58,4 +46,3 @@ jobs:
fail_on_unmatched_files: true
files: |
stremio-service-windows.zip
StremioServiceSetup.exe
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/target
.flatpak-builder
StremioServiceSetup.exe
StremioServiceSetup.exe
stremio-service-windows*
Binary file modified resources/bin/windows/avcodec-58.dll
Binary file not shown.
Binary file modified resources/bin/windows/avdevice-58.dll
Binary file not shown.
Binary file modified resources/bin/windows/avfilter-7.dll
Binary file not shown.
Binary file modified resources/bin/windows/avformat-58.dll
Binary file not shown.
Binary file modified resources/bin/windows/avutil-56.dll
Binary file not shown.
Binary file modified resources/bin/windows/ffmpeg.exe
Binary file not shown.
Binary file modified resources/bin/windows/ffprobe.exe
Binary file not shown.
Binary file modified resources/bin/windows/postproc-55.dll
Binary file not shown.
Binary file modified resources/bin/windows/swresample-3.dll
Binary file not shown.
Binary file modified resources/bin/windows/swscale-5.dll
Binary file not shown.
26 changes: 13 additions & 13 deletions setup/StremioService.iss
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#define MyAppShortName "StremioService"
#define MyAppExeName "stremio-service.exe"
#define MyAppRoot SourcePath + "..\"
#define MyAppBinLocation SourcePath + "..\target\release\"
#define MyAppBinLocation SourcePath + "..\stremio-service-windows\"
#define MyAppResBinLocation SourcePath + "..\resources\bin\windows\"
#define MyAppExeLocation MyAppBinLocation + MyAppExeName
#define MyAppVersion() GetVersionComponents(MyAppExeLocation, Local[0], Local[1], Local[2], Local[3]), \
Expand Down Expand Up @@ -148,20 +148,20 @@ Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"

[Files]
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
Source: "{#MyAppExeLocation}"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#MyAppExeLocation}"; DestDir: "{app}"; Flags: ignoreversion signonce
Source: "{#MyAppRoot}LICENSE.md"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#MyAppResBinLocation}ffmpeg.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#MyAppResBinLocation}ffprobe.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#MyAppResBinLocation}stremio-runtime.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#MyAppResBinLocation}ffmpeg.exe"; DestDir: "{app}"; Flags: ignoreversion signonce
Source: "{#MyAppResBinLocation}ffprobe.exe"; DestDir: "{app}"; Flags: ignoreversion signonce
Source: "{#MyAppResBinLocation}stremio-runtime.exe"; DestDir: "{app}"; Flags: ignoreversion signonce
Source: "{#MyAppResBinLocation}server.js"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#MyAppResBinLocation}avcodec-58.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#MyAppResBinLocation}avdevice-58.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#MyAppResBinLocation}avfilter-7.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#MyAppResBinLocation}avformat-58.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#MyAppResBinLocation}avutil-56.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#MyAppResBinLocation}postproc-55.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#MyAppResBinLocation}swresample-3.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#MyAppResBinLocation}swscale-5.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#MyAppResBinLocation}avcodec-58.dll"; DestDir: "{app}"; Flags: ignoreversion signonce
Source: "{#MyAppResBinLocation}avdevice-58.dll"; DestDir: "{app}"; Flags: ignoreversion signonce
Source: "{#MyAppResBinLocation}avfilter-7.dll"; DestDir: "{app}"; Flags: ignoreversion signonce
Source: "{#MyAppResBinLocation}avformat-58.dll"; DestDir: "{app}"; Flags: ignoreversion signonce
Source: "{#MyAppResBinLocation}avutil-56.dll"; DestDir: "{app}"; Flags: ignoreversion signonce
Source: "{#MyAppResBinLocation}postproc-55.dll"; DestDir: "{app}"; Flags: ignoreversion signonce
Source: "{#MyAppResBinLocation}swresample-3.dll"; DestDir: "{app}"; Flags: ignoreversion signonce
Source: "{#MyAppResBinLocation}swscale-5.dll"; DestDir: "{app}"; Flags: ignoreversion signonce

[Registry]

Expand Down
36 changes: 36 additions & 0 deletions sign.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
param (
[String]$pw = $( Read-Host "Password" )
)

if ($null -eq (Get-Command "signtool" -ErrorAction SilentlyContinue)) {
Write-Host "No VC vars found"
}

$thread = Start-ThreadJob -InputObject ($pw) -ScriptBlock {
$wshell = New-Object -ComObject wscript.shell;
$pw = "$($input)~"
while ($true) {
while ( -not $wshell.AppActivate("Token Logon")) {
Start-Sleep 1
}
Start-Sleep 1
$wshell.SendKeys($pw, $true)
Start-Sleep 1
}
}

# Get latest build from s3
Write-Host "Getting latest build from S3..."
$tag = $(git describe --tags --abbrev=0)
aws s3 cp s3://stremio-artifacts/stremio-service-unsigned/$tag/stremio-service-windows.zip .
if (Test-Path "stremio-service-windows") {
Remove-Item -Recurse -Force .\stremio-service-windows
}
Expand-Archive -Path .\stremio-service-windows.zip -DestinationPath .\stremio-service-windows

$env:package_version = (Select-String -Path .\CMakeLists.txt -Pattern '^project\(stremio VERSION "([^"]+)"\)').Matches.Groups[1].Value
Write-Host "Building the installer"
& 'C:\Program Files (x86)\Inno Setup 6\ISCC.exe' '/Sstremiosign=$qsigntool.exe$q sign /fd SHA256 /t http://timestamp.digicert.com /n $qSmart Code OOD$q $f' 'setup\StremioService.iss'

Stop-Job $thread
Write-Host "Done"
Loading