feat: implement package manager support for Windows and macOS, including Chocolatey and Homebrew configurations
Some checks are pending
Tests & Quality Checks / Test on Python 3.11 (push) Waiting to run
Tests & Quality Checks / Test on Python 3.12 (push) Waiting to run
Tests & Quality Checks / Test on Python 3.11-1 (push) Waiting to run
Tests & Quality Checks / Test on Python 3.12-1 (push) Waiting to run
Tests & Quality Checks / Test on Python 3.10 (push) Waiting to run
Tests & Quality Checks / Test on Python 3.11-2 (push) Waiting to run
Tests & Quality Checks / Test on Python 3.12-2 (push) Waiting to run
Tests & Quality Checks / Build Artifacts (push) Blocked by required conditions
Tests & Quality Checks / Build Artifacts-1 (push) Blocked by required conditions
Some checks are pending
Tests & Quality Checks / Test on Python 3.11 (push) Waiting to run
Tests & Quality Checks / Test on Python 3.12 (push) Waiting to run
Tests & Quality Checks / Test on Python 3.11-1 (push) Waiting to run
Tests & Quality Checks / Test on Python 3.12-1 (push) Waiting to run
Tests & Quality Checks / Test on Python 3.10 (push) Waiting to run
Tests & Quality Checks / Test on Python 3.11-2 (push) Waiting to run
Tests & Quality Checks / Test on Python 3.12-2 (push) Waiting to run
Tests & Quality Checks / Build Artifacts (push) Blocked by required conditions
Tests & Quality Checks / Build Artifacts-1 (push) Blocked by required conditions
This commit is contained in:
parent
1dcce081f1
commit
87884935c9
9 changed files with 758 additions and 10 deletions
47
build/chocolatey/tools/chocolateyInstall.ps1
Normal file
47
build/chocolatey/tools/chocolateyInstall.ps1
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
$ErrorActionPreference = 'Stop'
|
||||
|
||||
$PackageName = 'webdrop-bridge'
|
||||
$Version = '0.8.0'
|
||||
$Url = "https://git.him-tools.de/HIM-public/webdrop-bridge/releases/download/v$Version/WebDropBridge_Setup.msi"
|
||||
$Checksum = '' # Update with actual SHA256 checksum from release
|
||||
$ChecksumType = 'sha256'
|
||||
|
||||
# Create temporary directory for download
|
||||
$TempDir = Join-Path $env:TEMP "webdrop-bridge-$Version"
|
||||
New-Item -ItemType Directory -Path $TempDir -Force | Out-Null
|
||||
|
||||
try {
|
||||
# Download MSI installer
|
||||
Write-Host "Downloading WebDropBridge $Version MSI installer..."
|
||||
$InstallerPath = Join-Path $TempDir "WebDropBridge_Setup.msi"
|
||||
|
||||
Get-ChocolateyWebFile -PackageName $PackageName `
|
||||
-FileFullPath $InstallerPath `
|
||||
-Url $Url `
|
||||
-Checksum $Checksum `
|
||||
-ChecksumType $ChecksumType
|
||||
|
||||
# Install MSI
|
||||
Write-Host "Installing WebDropBridge..."
|
||||
$InstallArgs = @(
|
||||
'/i'
|
||||
"`"$InstallerPath`""
|
||||
'/quiet' # Silent installation
|
||||
'/norestart' # Don't restart immediately
|
||||
)
|
||||
|
||||
Invoke-ChocolateyInstall -PackageName $PackageName `
|
||||
-File 'msiexec.exe' `
|
||||
-FileArgs $InstallArgs `
|
||||
-ValidExitCodes @(0, 3010) # 0=success, 3010=restart needed
|
||||
|
||||
Write-Host "WebDropBridge installed successfully"
|
||||
} catch {
|
||||
Write-Error "Installation failed: $_"
|
||||
exit 1
|
||||
} finally {
|
||||
# Cleanup
|
||||
if (Test-Path $TempDir) {
|
||||
Remove-Item $TempDir -Recurse -Force -ErrorAction SilentlyContinue
|
||||
}
|
||||
}
|
||||
38
build/chocolatey/tools/chocolateyUninstall.ps1
Normal file
38
build/chocolatey/tools/chocolateyUninstall.ps1
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
$ErrorActionPreference = 'Stop'
|
||||
|
||||
$PackageName = 'webdrop-bridge'
|
||||
|
||||
try {
|
||||
# Find installed version
|
||||
$UninstallPath = Get-ChildItem HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall |
|
||||
Where-Object { $_.GetValue('DisplayName') -like '*WebDropBridge*' } |
|
||||
Select-Object -First 1
|
||||
|
||||
if ($UninstallPath) {
|
||||
$UninstallString = $UninstallPath.GetValue('UninstallString')
|
||||
|
||||
# Extract MSI Product ID from uninstall string
|
||||
if ($UninstallString -match '{[A-F0-9-]+}') {
|
||||
$ProductId = $matches[0]
|
||||
|
||||
Write-Host "Uninstalling WebDropBridge (Product ID: $ProductId)..."
|
||||
|
||||
$UninstallArgs = @(
|
||||
'/x'
|
||||
$ProductId
|
||||
'/quiet'
|
||||
'/norestart'
|
||||
)
|
||||
|
||||
& 'msiexec.exe' @UninstallArgs
|
||||
|
||||
Write-Host "WebDropBridge uninstalled successfully"
|
||||
} else {
|
||||
Write-Warning "Could not extract Product ID from uninstall string"
|
||||
}
|
||||
} else {
|
||||
Write-Warning "WebDropBridge is not installed"
|
||||
}
|
||||
} catch {
|
||||
Write-Error "Uninstall failed: $_"
|
||||
}
|
||||
28
build/chocolatey/webdrop-bridge.nuspec
Normal file
28
build/chocolatey/webdrop-bridge.nuspec
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<package xmlns="http://schemas.microsoft.com/packaging/2015/06/nuspec.xsd">
|
||||
<metadata>
|
||||
<id>webdrop-bridge</id>
|
||||
<version>0.8.0</version>
|
||||
<packageSourceUrl>https://git.him-tools.de/HIM-public/webdrop-bridge</packageSourceUrl>
|
||||
<owners>HIM-public</owners>
|
||||
<title>WebDrop Bridge</title>
|
||||
<authors>HIM-public</authors>
|
||||
<licenseUrl>https://git.him-tools.de/HIM-public/webdrop-bridge/blob/main/LICENSE</licenseUrl>
|
||||
<projectUrl>https://git.him-tools.de/HIM-public/webdrop-bridge</projectUrl>
|
||||
<bugTrackerUrl>https://git.him-tools.de/HIM-public/webdrop-bridge/issues</bugTrackerUrl>
|
||||
<description>
|
||||
Professional Qt-based desktop application for intelligent drag-and-drop file handling between web applications and desktop clients (InDesign, Word, Notepad++, etc.)
|
||||
|
||||
Converts text-based drag-and-drop operations from embedded web applications into native file operations recognized by professional desktop applications.
|
||||
</description>
|
||||
<summary>Intelligent drag-and-drop file bridge for web to desktop applications</summary>
|
||||
<releaseNotes>https://git.him-tools.de/HIM-public/webdrop-bridge/releases/tag/v0.8.0</releaseNotes>
|
||||
<tags>drag-drop file-transfer qt pyside6 desktop automation</tags>
|
||||
<dependencies>
|
||||
<dependency id="chocolatey" version="0.10.8" />
|
||||
</dependencies>
|
||||
</metadata>
|
||||
<files>
|
||||
<file src="tools\**" target="tools" />
|
||||
</files>
|
||||
</package>
|
||||
48
build/homebrew/webdrop-bridge.rb
Normal file
48
build/homebrew/webdrop-bridge.rb
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
class WebdropBridge < Formula
|
||||
desc "Intelligent drag-and-drop file bridge for web to desktop applications"
|
||||
homepage "https://git.him-tools.de/HIM-public/webdrop-bridge"
|
||||
version "0.8.0"
|
||||
|
||||
# ARM64 (Apple Silicon)
|
||||
on_arm do
|
||||
url "https://git.him-tools.de/HIM-public/webdrop-bridge/releases/download/v0.8.0/WebDropBridge_Setup.dmg"
|
||||
sha256 "" # Update with actual checksum
|
||||
end
|
||||
|
||||
# Intel x86_64
|
||||
on_intel do
|
||||
url "https://git.him-tools.de/HIM-public/webdrop-bridge/releases/download/v0.8.0/WebDropBridge_Setup.dmg"
|
||||
sha256 "" # Update with actual checksum (may be same as ARM64 if universal binary)
|
||||
end
|
||||
|
||||
license "MIT"
|
||||
|
||||
livecheck do
|
||||
url "https://git.him-tools.de/api/v1/repos/HIM-public/webdrop-bridge/releases/latest"
|
||||
strategy :json do |json|
|
||||
json["tag_name"]&.strip&.sub(/^v/, "")
|
||||
end
|
||||
end
|
||||
|
||||
app "WebDropBridge.app"
|
||||
|
||||
post_install do
|
||||
# Create user defaults directory if needed
|
||||
system "mkdir", "-p", "#{Dir.home}/.webdrop-bridge"
|
||||
end
|
||||
|
||||
def caveats
|
||||
<<~EOS
|
||||
WebDropBridge has been installed.
|
||||
|
||||
Configuration files are stored in: ~/.webdrop-bridge/
|
||||
Logs are written to: ~/.webdrop-bridge/logs/
|
||||
|
||||
To start the application:
|
||||
- Open Applications > WebDropBridge
|
||||
- Or run: open /Applications/WebDropBridge.app
|
||||
|
||||
For documentation: https://git.him-tools.de/HIM-public/webdrop-bridge
|
||||
EOS
|
||||
end
|
||||
end
|
||||
126
build/package-managers/README.md
Normal file
126
build/package-managers/README.md
Normal file
|
|
@ -0,0 +1,126 @@
|
|||
# Package Manager Distributions
|
||||
|
||||
This directory contains package manager configurations for distributing WebDropBridge across different platforms.
|
||||
|
||||
## Directory Structure
|
||||
|
||||
```
|
||||
build/
|
||||
├── chocolatey/ # Windows - Chocolatey/NuGet package
|
||||
│ ├── webdrop-bridge.nuspec # Package manifest
|
||||
│ └── tools/
|
||||
│ ├── chocolateyInstall.ps1 # Installation script
|
||||
│ └── chocolateyUninstall.ps1 # Uninstallation script
|
||||
│
|
||||
└── homebrew/ # macOS - Homebrew formula
|
||||
└── webdrop-bridge.rb # Homebrew formula
|
||||
```
|
||||
|
||||
## Quick Start
|
||||
|
||||
### Chocolatey Package (Windows)
|
||||
|
||||
1. **Build MSI installer**:
|
||||
```bash
|
||||
python build/scripts/build_windows.py --msi
|
||||
```
|
||||
|
||||
2. **Get SHA256 checksum**:
|
||||
```powershell
|
||||
certutil -hashfile build/dist/windows/WebDropBridge_Setup.msi SHA256
|
||||
```
|
||||
|
||||
3. **Update package files**:
|
||||
- `build/chocolatey/webdrop-bridge.nuspec` - update `<version>`
|
||||
- `build/chocolatey/tools/chocolateyInstall.ps1` - update `$Version` and `$Checksum`
|
||||
|
||||
4. **Package it** (requires Chocolatey CLI):
|
||||
```powershell
|
||||
cd build/chocolatey
|
||||
choco pack webdrop-bridge.nuspec
|
||||
```
|
||||
|
||||
5. **Publish** (requires Chocolatey API key):
|
||||
```powershell
|
||||
choco push webdrop-bridge.0.8.0.nupkg --api-key YOUR_KEY
|
||||
```
|
||||
|
||||
### Homebrew Formula (macOS)
|
||||
|
||||
1. **Build DMG installer**:
|
||||
```bash
|
||||
bash build/scripts/build_macos.sh
|
||||
```
|
||||
|
||||
2. **Get SHA256 checksum**:
|
||||
```bash
|
||||
shasum -a 256 build/dist/macos/WebDropBridge_Setup.dmg
|
||||
```
|
||||
|
||||
3. **Update formula**:
|
||||
- `build/homebrew/webdrop-bridge.rb` - update `version` and `sha256`
|
||||
|
||||
4. **Test locally**:
|
||||
```bash
|
||||
brew audit --formula build/homebrew/webdrop-bridge.rb
|
||||
brew install build/homebrew/webdrop-bridge.rb
|
||||
```
|
||||
|
||||
5. **Publish** (create Forgejo tap or submit to official Homebrew):
|
||||
- Option A: Create `homebrew-webdrop-bridge` tap on Forgejo
|
||||
- Option B: Submit to `homebrew/casks` on GitHub
|
||||
|
||||
## Publishing Strategy
|
||||
|
||||
### Recommended Approach for HIM
|
||||
|
||||
1. **Chocolatey**:
|
||||
- Host in internal Artifactory/Azure Artifacts NuGet repository
|
||||
- OR submit to Chocolatey community (chocolatey.org)
|
||||
- Users: `choco install webdrop-bridge`
|
||||
|
||||
2. **Homebrew**:
|
||||
- Create custom tap: `HIM-public/homebrew-webdrop-bridge` on Forgejo
|
||||
- Users add tap: `brew tap HIM-public/webdrop-bridge https://git.him-tools.de/...`
|
||||
- Users: `brew install webdrop-bridge`
|
||||
|
||||
3. **Fallback**:
|
||||
- Direct wget/downloads from Forgejo releases
|
||||
- Built-in auto-update system in app
|
||||
|
||||
## Release Checklist
|
||||
|
||||
When releasing version X.Y.Z:
|
||||
|
||||
- [ ] Build Windows MSI: `python build/scripts/build_windows.py --msi`
|
||||
- [ ] Build macOS DMG: `bash build/scripts/build_macos.sh`
|
||||
- [ ] Calculate checksums (certutil / shasum)
|
||||
- [ ] Create Forgejo release with installers
|
||||
- [ ] Update `build/chocolatey/webdrop-bridge.nuspec` version
|
||||
- [ ] Update `build/chocolatey/tools/chocolateyInstall.ps1` version & checksum
|
||||
- [ ] Update `build/homebrew/webdrop-bridge.rb` version & checksum
|
||||
- [ ] Test Chocolatey package locally
|
||||
- [ ] Test Homebrew formula locally
|
||||
- [ ] Publish to package managers
|
||||
|
||||
## User Installation Commands
|
||||
|
||||
After publishing:
|
||||
|
||||
```powershell
|
||||
# Windows
|
||||
choco install webdrop-bridge
|
||||
```
|
||||
|
||||
```bash
|
||||
# macOS
|
||||
brew tap HIM-public/webdrop-bridge https://git.him-tools.de/HIM-public/homebrew-webdrop-bridge.git
|
||||
brew install webdrop-bridge
|
||||
```
|
||||
|
||||
## References
|
||||
|
||||
- [Full Documentation](../../docs/PACKAGE_MANAGER_SUPPORT.md)
|
||||
- [Chocolatey Docs](https://docs.chocolatey.org/)
|
||||
- [Homebrew Docs](https://docs.brew.sh/)
|
||||
- [Forgejo API](https://docs.gitea.com/api/1.22/)
|
||||
Loading…
Add table
Add a link
Reference in a new issue