mirror of
https://github.com/tw93/Mole.git
synced 2026-02-05 21:58:01 +00:00
* feat: Add Windows package manager publishing infrastructure (#343) - Add comprehensive release build scripts: - build-release.ps1: Creates portable ZIP + SHA256 checksums - build-exe.ps1: Standalone executable builder (PS2EXE) - build-msi.ps1: MSI installer builder (WiX Toolset) - Add GitHub Actions workflow: - Automated builds on version tags - Runs tests before building - Auto-creates GitHub releases with artifacts - Add package manager manifests: - WinGet: Complete manifests ready for microsoft/winget-pkgs - Chocolatey: Full package with install/uninstall scripts - Scoop: JSON manifest ready for submission - Add comprehensive documentation: - RELEASE.md: Complete guide for building and publishing - Package-specific READMEs with submission instructions - ISSUE-343-SUMMARY.md: Quick reference and next steps Successfully tested: Built mole-1.0.0-x64.zip (5 MB) with SHA256 checksums Addresses #343 * chore: update contributors [skip ci] * fix: Support uppercase V and -windows suffix in release workflow * fix: Remove duplicate parameter definitions in clean, optimize, and purge commands - bin/clean.ps1: Remove duplicate System, GameMedia, DebugMode, Whitelist params - bin/optimize.ps1: Remove duplicate DebugMode param - bin/purge.ps1: Remove duplicate DebugMode and Paths params These duplicates were causing parser errors in tests. * fix: Update test regex to match --dry-run format in help text The help output shows --dry-run (kebab-case) but test was checking for DryRun (PascalCase). Updated regex to accept both formats. * fix: Handle Pester 5.x result object properties correctly Pester 5.x uses different property names (Passed.Count, Failed.Count) instead of PassedCount, FailedCount. Added fallback logic to support both formats. * fix: Simplify Pester result parsing with better fallback logic Since Pester already prints test results, just check for failures and assume success if we can't parse the result object. This handles different Pester versions more gracefully. * feat: Add MSI and EXE builds to release workflow - Install WiX Toolset for MSI creation - Install PS2EXE module for standalone EXE - Build all three formats: ZIP, MSI, EXE - MSI and EXE builds marked optional (continue-on-error) - Upload all artifacts to GitHub release - Update release notes with installation instructions for all formats - Add SHA256 verification instructions for each format * fix: Resolve MSI and EXE build failures MSI build fix: - Use UTF8 without BOM for temp WXS file to avoid XML parsing errors - WiX compiler requires clean UTF8 encoding without byte order mark EXE build fix: - Remove hashtable iteration that modified collection during enumeration - Exclude null iconFile parameter from ps2exe params instead of removing it - Prevents 'Collection was modified' exception * fix: Properly handle encoding and version format for MSI and EXE builds MSI fix: - Use System.IO.File.ReadAllText/WriteAllText for consistent UTF8 without BOM - Prevents XML parsing errors in WiX compiler EXE fix: - Extract numeric version only (strip '-windows' suffix) for ps2exe - ps2exe requires version in format n.n.n.n (numeric only) - Fallback to 1.0.0.0 if version parsing fails * fix: Use WriteAllBytes to ensure no BOM in MSI WXS file - Convert string to UTF8 bytes manually - Write bytes directly to file - This guarantees no byte order mark is added - Prevents WiX XML parsing error at position 7 * fix: Read WXS source as bytes to completely avoid BOM issues - Read source file as raw bytes - Convert bytes to string using UTF8Encoding without BOM - Replace version in string - Convert back to bytes and write - This completely avoids PowerShell's Get-Content BOM handling * chore: Simplify release workflow - remove MSI build, minimal release notes - Remove MSI build steps (has persistent BOM/encoding issues) - Remove WiX Toolset installation - Simplify release notes to bare minimum - Focus on ZIP and EXE artifacts only --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This commit is contained in:
48
packaging/README.md
Normal file
48
packaging/README.md
Normal file
@@ -0,0 +1,48 @@
|
||||
# Mole Package Manager Manifests
|
||||
|
||||
This directory contains templates and configurations for publishing Mole to various Windows package managers.
|
||||
|
||||
## Directory Structure
|
||||
|
||||
```
|
||||
packaging/
|
||||
├── winget/ # WinGet manifests
|
||||
├── chocolatey/ # Chocolatey package
|
||||
├── scoop/ # Scoop manifest
|
||||
└── README.md # This file
|
||||
```
|
||||
|
||||
## Quick Links
|
||||
|
||||
- **Main Release Guide:** [../RELEASE.md](../RELEASE.md)
|
||||
- **Issue #343:** https://github.com/bhadraagada/mole/issues/343
|
||||
- **Build Scripts:** [../scripts/](../scripts/)
|
||||
|
||||
## Package Manager Status
|
||||
|
||||
| Package Manager | Status | Priority | Documentation |
|
||||
|----------------|--------|----------|---------------|
|
||||
| **WinGet** | 🔴 Not Published | High | [winget/README.md](winget/README.md) |
|
||||
| **Chocolatey** | 🔴 Not Published | High | [chocolatey/README.md](chocolatey/README.md) |
|
||||
| **Scoop** | 🔴 Not Published | Medium | [scoop/README.md](scoop/README.md) |
|
||||
|
||||
## Publishing Order (Recommended)
|
||||
|
||||
1. **Create GitHub Release** - Upload ZIP and checksums
|
||||
2. **Scoop** - Easiest, fastest approval (~3-5 days)
|
||||
3. **WinGet** - Official Microsoft, widest reach (~1-2 weeks)
|
||||
4. **Chocolatey** - Popular with devs (~1-2 weeks)
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- GitHub release with ZIP file uploaded
|
||||
- SHA256 checksum available
|
||||
- Version tagged in git (e.g., v1.0.0)
|
||||
|
||||
## Getting Started
|
||||
|
||||
See [RELEASE.md](../RELEASE.md) for complete instructions on:
|
||||
- Building release artifacts
|
||||
- Testing locally
|
||||
- Submitting to each package manager
|
||||
- Automation with GitHub Actions
|
||||
131
packaging/chocolatey/README.md
Normal file
131
packaging/chocolatey/README.md
Normal file
@@ -0,0 +1,131 @@
|
||||
# Chocolatey Package for Mole
|
||||
|
||||
## Quick Submission Guide
|
||||
|
||||
### 1. Prerequisites
|
||||
- Chocolatey account at https://community.chocolatey.org/
|
||||
- API key from your account settings
|
||||
- GitHub release with ZIP file
|
||||
|
||||
### 2. Update Package Files
|
||||
|
||||
**mole.nuspec:**
|
||||
- Update `<version>1.0.0</version>`
|
||||
- Update `<releaseNotes>` URL
|
||||
|
||||
**tools/chocolateyinstall.ps1:**
|
||||
- Update `$version = '1.0.0'`
|
||||
- Update `$checksum64` with SHA256 from build
|
||||
|
||||
**tools/VERIFICATION.txt:**
|
||||
- Update all v1.0.0 references
|
||||
- Update checksum
|
||||
|
||||
### 3. Build Package Locally
|
||||
|
||||
```powershell
|
||||
# Navigate to chocolatey directory
|
||||
cd packaging\chocolatey
|
||||
|
||||
# Pack the package
|
||||
choco pack
|
||||
|
||||
# This creates: mole.1.0.0.nupkg
|
||||
```
|
||||
|
||||
### 4. Test Locally
|
||||
|
||||
```powershell
|
||||
# Install from local package
|
||||
choco install mole -source . -y
|
||||
|
||||
# Test functionality
|
||||
mole --version
|
||||
mole clean --dry-run
|
||||
|
||||
# Uninstall
|
||||
choco uninstall mole -y
|
||||
```
|
||||
|
||||
### 5. Publish to Chocolatey
|
||||
|
||||
```powershell
|
||||
# Set API key (one time)
|
||||
choco apikey --key YOUR_API_KEY --source https://push.chocolatey.org/
|
||||
|
||||
# Push package
|
||||
choco push mole.1.0.0.nupkg --source https://push.chocolatey.org/
|
||||
|
||||
# Package will enter moderation queue
|
||||
```
|
||||
|
||||
## Package Structure
|
||||
|
||||
```
|
||||
chocolatey/
|
||||
├── mole.nuspec # Package metadata
|
||||
└── tools/
|
||||
├── chocolateyinstall.ps1 # Installation script
|
||||
├── chocolateyuninstall.ps1 # Uninstallation script
|
||||
└── VERIFICATION.txt # Verification instructions
|
||||
```
|
||||
|
||||
## Moderation Process
|
||||
|
||||
1. **Submit**: Push package to Chocolatey
|
||||
2. **Auto-scan**: Automated virus/malware scan (~5 minutes)
|
||||
3. **Moderation**: Human review (~1-2 weeks for first package)
|
||||
4. **Approval**: Package becomes available
|
||||
5. **Trusted**: After 3+ approved packages, auto-moderation enabled
|
||||
|
||||
## Updating for New Releases
|
||||
|
||||
When releasing v1.0.1:
|
||||
|
||||
1. Update version in 3 files:
|
||||
- `mole.nuspec`: `<version>1.0.1</version>`
|
||||
- `tools/chocolateyinstall.ps1`: `$version = '1.0.1'`
|
||||
- `tools/VERIFICATION.txt`: All URLs and hash
|
||||
|
||||
2. Update checksums:
|
||||
- Get from `SHA256SUMS.txt`
|
||||
- Update in `chocolateyinstall.ps1` and `VERIFICATION.txt`
|
||||
|
||||
3. Build and push:
|
||||
```powershell
|
||||
choco pack
|
||||
choco push mole.1.0.1.nupkg --source https://push.chocolatey.org/
|
||||
```
|
||||
|
||||
## Testing Checklist
|
||||
|
||||
Before pushing:
|
||||
|
||||
- [ ] Package builds without errors (`choco pack`)
|
||||
- [ ] Local install works (`choco install mole -source .`)
|
||||
- [ ] Mole commands execute properly
|
||||
- [ ] PATH is added correctly
|
||||
- [ ] Uninstall cleans up properly
|
||||
- [ ] Checksums match GitHub release
|
||||
- [ ] URLs are correct and accessible
|
||||
|
||||
## Common Issues
|
||||
|
||||
### "Package rejected - URL not accessible"
|
||||
- Ensure GitHub release is public
|
||||
- Test download URL in browser
|
||||
|
||||
### "Checksum mismatch"
|
||||
- Regenerate checksum: `(Get-FileHash mole-1.0.0-x64.zip).Hash`
|
||||
- Update both install script and VERIFICATION.txt
|
||||
|
||||
### "Install script fails"
|
||||
- Test locally first
|
||||
- Check PowerShell syntax: `Test-Path tools\chocolateyinstall.ps1`
|
||||
|
||||
## Resources
|
||||
|
||||
- **Chocolatey Docs**: https://docs.chocolatey.org/en-us/create/create-packages
|
||||
- **Package Guidelines**: https://docs.chocolatey.org/en-us/create/create-packages#package-naming-guidelines
|
||||
- **Moderation Process**: https://docs.chocolatey.org/en-us/community-repository/moderation/
|
||||
- **Create Account**: https://community.chocolatey.org/account/Register
|
||||
37
packaging/chocolatey/mole.nuspec
Normal file
37
packaging/chocolatey/mole.nuspec
Normal file
@@ -0,0 +1,37 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<package xmlns="http://schemas.microsoft.com/packaging/2015/06/nuspec.xsd">
|
||||
<metadata>
|
||||
<!-- Required -->
|
||||
<id>mole</id>
|
||||
<version>1.0.0</version>
|
||||
<title>Mole</title>
|
||||
<authors>Mole Project</authors>
|
||||
<owners>bhadraagada</owners>
|
||||
<description>Deep clean and optimize your Windows system. All-in-one toolkit combining CCleaner, IObit Uninstaller, WinDirStat, and Task Manager functionality for comprehensive Windows system optimization and cleanup.</description>
|
||||
|
||||
<!-- URLs -->
|
||||
<projectUrl>https://github.com/bhadraagada/mole</projectUrl>
|
||||
<licenseUrl>https://github.com/bhadraagada/mole/blob/windows/LICENSE</licenseUrl>
|
||||
<projectSourceUrl>https://github.com/bhadraagada/mole</projectSourceUrl>
|
||||
<docsUrl>https://github.com/bhadraagada/mole/blob/windows/README.md</docsUrl>
|
||||
<bugTrackerUrl>https://github.com/bhadraagada/mole/issues</bugTrackerUrl>
|
||||
<packageSourceUrl>https://github.com/bhadraagada/mole/tree/windows/packaging/chocolatey</packageSourceUrl>
|
||||
|
||||
<!-- Optional -->
|
||||
<copyright>2026 Mole Project</copyright>
|
||||
<licenseAcceptanceRequired>false</licenseAcceptanceRequired>
|
||||
<requireLicenseAcceptance>false</requireLicenseAcceptance>
|
||||
<releaseNotes>https://github.com/bhadraagada/mole/releases/tag/v1.0.0</releaseNotes>
|
||||
<summary>Windows system cleanup and optimization tool</summary>
|
||||
|
||||
<!-- Tags -->
|
||||
<tags>cleanup optimizer maintenance disk-space uninstaller system-tools windows admin</tags>
|
||||
|
||||
<!-- Icon (optional, add if available) -->
|
||||
<!-- <iconUrl>https://github.com/bhadraagada/mole/raw/windows/icon.png</iconUrl> -->
|
||||
</metadata>
|
||||
|
||||
<files>
|
||||
<file src="tools\**" target="tools" />
|
||||
</files>
|
||||
</package>
|
||||
23
packaging/chocolatey/tools/VERIFICATION.txt
Normal file
23
packaging/chocolatey/tools/VERIFICATION.txt
Normal file
@@ -0,0 +1,23 @@
|
||||
VERIFICATION
|
||||
Verification is intended to assist the Chocolatey moderators and community
|
||||
in verifying that this package's contents are trustworthy.
|
||||
|
||||
Package can be verified like this:
|
||||
|
||||
1. Download the ZIP from GitHub releases:
|
||||
https://github.com/bhadraagada/mole/releases/download/v1.0.0/mole-1.0.0-x64.zip
|
||||
|
||||
2. Get SHA256 checksum:
|
||||
PowerShell: (Get-FileHash mole-1.0.0-x64.zip).Hash
|
||||
|
||||
3. Compare with expected hash:
|
||||
c5671df0196ddd8aa172845c537b47159e752d7555676a04c0d95a971f4a11d3
|
||||
|
||||
The SHA256SUMS.txt file is also available at:
|
||||
https://github.com/bhadraagada/mole/releases/download/v1.0.0/SHA256SUMS.txt
|
||||
|
||||
Source code is available at:
|
||||
https://github.com/bhadraagada/mole/tree/windows
|
||||
|
||||
Build instructions are in:
|
||||
https://github.com/bhadraagada/mole/blob/windows/RELEASE.md
|
||||
45
packaging/chocolatey/tools/chocolateyinstall.ps1
Normal file
45
packaging/chocolatey/tools/chocolateyinstall.ps1
Normal file
@@ -0,0 +1,45 @@
|
||||
$ErrorActionPreference = 'Stop'
|
||||
|
||||
$packageName = 'mole'
|
||||
$toolsDir = Split-Path -Parent $MyInvocation.MyCommand.Definition
|
||||
$version = '1.0.0'
|
||||
|
||||
# Download info
|
||||
$url64 = "https://github.com/bhadraagada/mole/releases/download/v$version/mole-$version-x64.zip"
|
||||
$checksum64 = 'c5671df0196ddd8aa172845c537b47159e752d7555676a04c0d95a971f4a11d3'
|
||||
$checksumType = 'sha256'
|
||||
|
||||
# Package parameters
|
||||
$packageArgs = @{
|
||||
packageName = $packageName
|
||||
unzipLocation = $toolsDir
|
||||
url64bit = $url64
|
||||
checksum64 = $checksum64
|
||||
checksumType64 = $checksumType
|
||||
}
|
||||
|
||||
# Install ZIP package
|
||||
Install-ChocolateyZipPackage @packageArgs
|
||||
|
||||
# Add to PATH
|
||||
$installDir = Get-ChildItem $toolsDir -Directory | Where-Object { $_.Name -like "mole-*" } | Select-Object -First 1
|
||||
if ($installDir) {
|
||||
$moleDir = $installDir.FullName
|
||||
Install-ChocolateyPath -PathToInstall $moleDir -PathType 'User'
|
||||
|
||||
Write-Host ""
|
||||
Write-Host "Mole has been installed successfully!" -ForegroundColor Green
|
||||
Write-Host ""
|
||||
Write-Host "Available commands:" -ForegroundColor Cyan
|
||||
Write-Host " mole clean - Deep system cleanup"
|
||||
Write-Host " mole uninstall - Remove unwanted apps"
|
||||
Write-Host " mole analyze - Disk space analysis"
|
||||
Write-Host " mole status - System health check"
|
||||
Write-Host " mole optimize - Rebuild caches"
|
||||
Write-Host " mole purge - Remove dev artifacts"
|
||||
Write-Host ""
|
||||
Write-Host "Run 'mole --help' for more information" -ForegroundColor Gray
|
||||
Write-Host ""
|
||||
} else {
|
||||
Write-Error "Installation directory not found"
|
||||
}
|
||||
20
packaging/chocolatey/tools/chocolateyuninstall.ps1
Normal file
20
packaging/chocolatey/tools/chocolateyuninstall.ps1
Normal file
@@ -0,0 +1,20 @@
|
||||
$ErrorActionPreference = 'Stop'
|
||||
|
||||
$packageName = 'mole'
|
||||
$toolsDir = Split-Path -Parent $MyInvocation.MyCommand.Definition
|
||||
|
||||
# Find installation directory
|
||||
$installDir = Get-ChildItem $toolsDir -Directory | Where-Object { $_.Name -like "mole-*" } | Select-Object -First 1
|
||||
|
||||
if ($installDir) {
|
||||
$moleDir = $installDir.FullName
|
||||
|
||||
# Remove from PATH
|
||||
Uninstall-ChocolateyPath -PathToUninstall $moleDir -PathType 'User'
|
||||
|
||||
Write-Host ""
|
||||
Write-Host "Mole has been uninstalled successfully" -ForegroundColor Green
|
||||
Write-Host ""
|
||||
} else {
|
||||
Write-Warning "Installation directory not found, but PATH will be cleaned up"
|
||||
}
|
||||
74
packaging/scoop/README.md
Normal file
74
packaging/scoop/README.md
Normal file
@@ -0,0 +1,74 @@
|
||||
# Scoop Package for Mole
|
||||
|
||||
## Quick Submission Guide
|
||||
|
||||
### 1. Prerequisites
|
||||
- GitHub release created with ZIP file
|
||||
- SHA256 hash from release build
|
||||
|
||||
### 2. Update Manifest
|
||||
Edit `mole.json`:
|
||||
- Update `version` to new version
|
||||
- Update `url` with correct download URL
|
||||
- Update `hash` with SHA256 from `SHA256SUMS.txt`
|
||||
|
||||
### 3. Submit to Scoop
|
||||
|
||||
```powershell
|
||||
# Fork ScoopInstaller/Main
|
||||
git clone https://github.com/YOUR_USERNAME/Main scoop-main
|
||||
cd scoop-main
|
||||
|
||||
# Copy manifest
|
||||
Copy-Item path\to\mole.json bucket\
|
||||
|
||||
# Commit and push
|
||||
git add bucket/mole.json
|
||||
git commit -m "mole: Add version 1.0.0"
|
||||
git push
|
||||
|
||||
# Create PR on GitHub
|
||||
# Go to: https://github.com/ScoopInstaller/Main/compare
|
||||
```
|
||||
|
||||
### 4. Test Locally Before Submitting
|
||||
|
||||
```powershell
|
||||
# Add local bucket
|
||||
scoop bucket add local path\to\packaging\scoop
|
||||
|
||||
# Install from local
|
||||
scoop install local/mole
|
||||
|
||||
# Test
|
||||
mole --version
|
||||
mole clean --dry-run
|
||||
|
||||
# Uninstall
|
||||
scoop uninstall mole
|
||||
```
|
||||
|
||||
## Manifest Fields Explained
|
||||
|
||||
- **version**: Release version (without 'v' prefix)
|
||||
- **url**: Direct download URL from GitHub releases
|
||||
- **hash**: SHA256 hash from build
|
||||
- **bin**: The main executable/script
|
||||
- **shortcuts**: Start menu shortcuts
|
||||
- **checkver**: Auto-detect new versions
|
||||
- **autoupdate**: Template for auto-updating
|
||||
|
||||
## Updating for New Releases
|
||||
|
||||
When releasing v1.0.1:
|
||||
|
||||
1. Update version: `"version": "1.0.1"`
|
||||
2. Update URL: `v1.0.0` → `v1.0.1`
|
||||
3. Update hash: Get from new `SHA256SUMS.txt`
|
||||
4. Submit PR with title: `mole: Update to version 1.0.1`
|
||||
|
||||
## Resources
|
||||
|
||||
- **Scoop Wiki**: https://github.com/ScoopInstaller/Main/wiki
|
||||
- **Manifest Format**: https://github.com/ScoopInstaller/Scoop/wiki/App-Manifests
|
||||
- **Contributing**: https://github.com/ScoopInstaller/Main/blob/master/.github/CONTRIBUTING.md
|
||||
33
packaging/scoop/mole.json
Normal file
33
packaging/scoop/mole.json
Normal file
@@ -0,0 +1,33 @@
|
||||
{
|
||||
"version": "1.0.0",
|
||||
"description": "Deep clean and optimize your Windows system. All-in-one toolkit for Windows maintenance.",
|
||||
"homepage": "https://github.com/bhadraagada/mole",
|
||||
"license": "MIT",
|
||||
"url": "https://github.com/bhadraagada/mole/releases/download/v1.0.0/mole-1.0.0-x64.zip",
|
||||
"hash": "c5671df0196ddd8aa172845c537b47159e752d7555676a04c0d95a971f4a11d3",
|
||||
"bin": "mole.ps1",
|
||||
"shortcuts": [
|
||||
[
|
||||
"mole.ps1",
|
||||
"Mole"
|
||||
]
|
||||
],
|
||||
"checkver": {
|
||||
"github": "https://github.com/bhadraagada/mole"
|
||||
},
|
||||
"autoupdate": {
|
||||
"url": "https://github.com/bhadraagada/mole/releases/download/v$version/mole-$version-x64.zip"
|
||||
},
|
||||
"notes": [
|
||||
"Mole has been installed successfully!",
|
||||
"Run 'mole' or 'mole.ps1' to get started.",
|
||||
"",
|
||||
"Available commands:",
|
||||
" mole clean - Deep system cleanup",
|
||||
" mole uninstall - Remove unwanted apps",
|
||||
" mole analyze - Disk space analysis",
|
||||
" mole status - System health check",
|
||||
" mole optimize - Rebuild caches",
|
||||
" mole purge - Remove dev artifacts"
|
||||
]
|
||||
}
|
||||
214
packaging/winget/README.md
Normal file
214
packaging/winget/README.md
Normal file
@@ -0,0 +1,214 @@
|
||||
# WinGet Package for Mole
|
||||
|
||||
## Quick Submission Guide
|
||||
|
||||
### 1. Prerequisites
|
||||
- GitHub account
|
||||
- GitHub release with ZIP file
|
||||
- `winget-create` tool (optional but recommended)
|
||||
|
||||
### 2. Install WinGet Create Tool (Recommended)
|
||||
|
||||
```powershell
|
||||
# Install via WinGet
|
||||
winget install Microsoft.WingetCreate
|
||||
|
||||
# Or download from GitHub
|
||||
# https://github.com/microsoft/winget-create/releases
|
||||
```
|
||||
|
||||
### 3a. Automated Submission (Recommended)
|
||||
|
||||
```powershell
|
||||
# For new package
|
||||
wingetcreate new `
|
||||
--urls https://github.com/bhadraagada/mole/releases/download/v1.0.0/mole-1.0.0-x64.zip `
|
||||
--version 1.0.0
|
||||
|
||||
# For updates (after first approval)
|
||||
wingetcreate update bhadraagada.mole `
|
||||
--urls https://github.com/bhadraagada/mole/releases/download/v1.0.0/mole-1.0.0-x64.zip `
|
||||
--version 1.0.0 `
|
||||
--submit
|
||||
```
|
||||
|
||||
### 3b. Manual Submission
|
||||
|
||||
1. **Fork microsoft/winget-pkgs**
|
||||
```powershell
|
||||
# On GitHub: Fork https://github.com/microsoft/winget-pkgs
|
||||
git clone https://github.com/YOUR_USERNAME/winget-pkgs
|
||||
cd winget-pkgs
|
||||
```
|
||||
|
||||
2. **Create manifest directory**
|
||||
```powershell
|
||||
mkdir -p manifests\b\bhadraagada\mole\1.0.0
|
||||
```
|
||||
|
||||
3. **Copy manifests**
|
||||
```powershell
|
||||
Copy-Item packaging\winget\*.yaml manifests\b\bhadraagada\mole\1.0.0\
|
||||
```
|
||||
|
||||
4. **Update checksums**
|
||||
- Edit `bhadraagada.mole.installer.yaml`
|
||||
- Update `InstallerSha256` with your build's SHA256
|
||||
- Update `InstallerUrl` with correct version
|
||||
|
||||
5. **Commit and push**
|
||||
```powershell
|
||||
git add manifests\b\bhadraagada\mole\
|
||||
git commit -m "New package: bhadraagada.mole version 1.0.0"
|
||||
git push
|
||||
```
|
||||
|
||||
6. **Create Pull Request**
|
||||
- Go to: https://github.com/microsoft/winget-pkgs/compare
|
||||
- Select your fork and branch
|
||||
- Create PR with title: `New package: bhadraagada.mole version 1.0.0`
|
||||
|
||||
## Manifest Files
|
||||
|
||||
WinGet requires 3 manifest files:
|
||||
|
||||
### 1. Version Manifest (bhadraagada.mole.yaml)
|
||||
- Package identifier
|
||||
- Version number
|
||||
- Default locale
|
||||
|
||||
### 2. Locale Manifest (bhadraagada.mole.locale.en-US.yaml)
|
||||
- Package metadata (name, description, publisher)
|
||||
- URLs (homepage, license, documentation)
|
||||
- Tags and categories
|
||||
- Release notes
|
||||
|
||||
### 3. Installer Manifest (bhadraagada.mole.installer.yaml)
|
||||
- Download URLs
|
||||
- SHA256 checksums
|
||||
- Installer type
|
||||
- Architecture
|
||||
- Minimum OS version
|
||||
|
||||
## Validation
|
||||
|
||||
Before submitting, validate manifests:
|
||||
|
||||
```powershell
|
||||
# Install WinGet validation tool
|
||||
winget install Microsoft.WingetCreate
|
||||
|
||||
# Validate manifests
|
||||
winget validate --manifest manifests\b\bhadraagada\mole\1.0.0
|
||||
```
|
||||
|
||||
## Review Process
|
||||
|
||||
1. **Auto-checks**: Automated validation runs immediately
|
||||
- Manifest format
|
||||
- URL accessibility
|
||||
- Checksum verification
|
||||
- Malware scan
|
||||
|
||||
2. **Human Review**: Maintainers review (~1-2 weeks)
|
||||
- First-time packages reviewed more carefully
|
||||
- Subsequent updates often auto-approved
|
||||
|
||||
3. **Approval**: Package becomes available via WinGet
|
||||
|
||||
## Updating for New Releases
|
||||
|
||||
When releasing v1.0.1:
|
||||
|
||||
```powershell
|
||||
# Option A: Using wingetcreate (easy)
|
||||
wingetcreate update bhadraagada.mole `
|
||||
--urls https://github.com/bhadraagada/mole/releases/download/v1.0.1/mole-1.0.1-x64.zip `
|
||||
--version 1.0.1 `
|
||||
--submit
|
||||
|
||||
# Option B: Manual
|
||||
# 1. Create new directory: manifests\b\bhadraagada\mole\1.0.1
|
||||
# 2. Copy and update manifests
|
||||
# 3. Submit PR with title: "Update: bhadraagada.mole version 1.0.1"
|
||||
```
|
||||
|
||||
## Testing Before Submission
|
||||
|
||||
Test installation locally:
|
||||
|
||||
```powershell
|
||||
# Add local source
|
||||
winget source add --name local file://C:\path\to\manifests
|
||||
|
||||
# Install from local
|
||||
winget install bhadraagada.mole --source local
|
||||
|
||||
# Test functionality
|
||||
mole --version
|
||||
|
||||
# Remove local source
|
||||
winget source remove local
|
||||
```
|
||||
|
||||
## Common Issues
|
||||
|
||||
### "URL not accessible"
|
||||
- Ensure GitHub release is public
|
||||
- Wait a few minutes after creating release
|
||||
- Test URL in browser
|
||||
|
||||
### "Checksum mismatch"
|
||||
- Regenerate: `(Get-FileHash mole-1.0.0-x64.zip).Hash`
|
||||
- Ensure lowercase in manifest
|
||||
- Verify no extra spaces
|
||||
|
||||
### "Manifest validation failed"
|
||||
- Run `winget validate --manifest path\to\manifest`
|
||||
- Check YAML indentation (use spaces, not tabs)
|
||||
- Ensure all required fields present
|
||||
|
||||
### "Installer type not supported"
|
||||
- Use `zip` with `NestedInstallerType: portable` for ZIP archives
|
||||
- Consider creating MSI for better integration
|
||||
|
||||
## Best Practices
|
||||
|
||||
1. **Use semantic versioning**: 1.0.0, 1.0.1, 1.1.0
|
||||
2. **Tag releases properly**: v1.0.0 (with 'v' prefix)
|
||||
3. **Keep manifests updated**: Update within days of releases
|
||||
4. **Add detailed descriptions**: Help users understand the tool
|
||||
5. **Include release notes**: Document changes clearly
|
||||
|
||||
## Migration to MSI (Optional Future Enhancement)
|
||||
|
||||
WinGet works better with MSI installers:
|
||||
|
||||
```yaml
|
||||
InstallerType: msi
|
||||
Installers:
|
||||
- Architecture: x64
|
||||
InstallerUrl: https://github.com/bhadraagada/mole/releases/download/v1.0.0/mole-1.0.0-x64.msi
|
||||
InstallerSha256: <MSI_SHA256>
|
||||
ProductCode: '{GUID-HERE}'
|
||||
```
|
||||
|
||||
Benefits:
|
||||
- Better Windows integration
|
||||
- Automatic PATH configuration
|
||||
- Add/Remove Programs integration
|
||||
- Silent installation support
|
||||
|
||||
## Resources
|
||||
|
||||
- **WinGet Repository**: https://github.com/microsoft/winget-pkgs
|
||||
- **Submission Guide**: https://github.com/microsoft/winget-pkgs/wiki/Submitting-Packages
|
||||
- **Manifest Schema**: https://github.com/microsoft/winget-cli/blob/master/schemas/JSON/manifests/v1.4.0/manifest.version.1.4.0.json
|
||||
- **WinGet Create**: https://github.com/microsoft/winget-create
|
||||
- **Validation**: https://github.com/microsoft/winget-cli
|
||||
|
||||
## Support
|
||||
|
||||
- **WinGet Issues**: https://github.com/microsoft/winget-cli/issues
|
||||
- **Package Issues**: https://github.com/microsoft/winget-pkgs/issues
|
||||
- **Discussions**: https://github.com/microsoft/winget-cli/discussions
|
||||
16
packaging/winget/bhadraagada.mole.installer.yaml
Normal file
16
packaging/winget/bhadraagada.mole.installer.yaml
Normal file
@@ -0,0 +1,16 @@
|
||||
PackageIdentifier: bhadraagada.mole
|
||||
PackageVersion: 1.0.0
|
||||
InstallerLocale: en-US
|
||||
MinimumOSVersion: 10.0.0.0
|
||||
InstallerType: zip
|
||||
NestedInstallerType: portable
|
||||
NestedInstallerFiles:
|
||||
- RelativeFilePath: mole.ps1
|
||||
PortableCommandAlias: mole
|
||||
Installers:
|
||||
- Architecture: x64
|
||||
InstallerUrl: https://github.com/bhadraagada/mole/releases/download/v1.0.0/mole-1.0.0-x64.zip
|
||||
InstallerSha256: c5671df0196ddd8aa172845c537b47159e752d7555676a04c0d95a971f4a11d3
|
||||
Scope: user
|
||||
ManifestType: installer
|
||||
ManifestVersion: 1.4.0
|
||||
47
packaging/winget/bhadraagada.mole.locale.en-US.yaml
Normal file
47
packaging/winget/bhadraagada.mole.locale.en-US.yaml
Normal file
@@ -0,0 +1,47 @@
|
||||
PackageIdentifier: bhadraagada.mole
|
||||
PackageVersion: 1.0.0
|
||||
PackageLocale: en-US
|
||||
Publisher: Mole Project
|
||||
PublisherUrl: https://github.com/bhadraagada
|
||||
PublisherSupportUrl: https://github.com/bhadraagada/mole/issues
|
||||
PackageName: Mole
|
||||
PackageUrl: https://github.com/bhadraagada/mole
|
||||
License: MIT
|
||||
LicenseUrl: https://github.com/bhadraagada/mole/blob/windows/LICENSE
|
||||
ShortDescription: Deep clean and optimize your Windows system
|
||||
Description: |
|
||||
Mole is an all-in-one toolkit for Windows system maintenance and optimization.
|
||||
It combines functionality similar to CCleaner, IObit Uninstaller, WinDirStat,
|
||||
and Task Manager into a single, powerful command-line tool.
|
||||
|
||||
Features:
|
||||
- Deep system cleanup (temp files, caches, logs)
|
||||
- Application uninstaller with leftover detection
|
||||
- Disk space analysis and visualization
|
||||
- System health monitoring
|
||||
- Cache optimization and rebuild
|
||||
- Development artifact cleanup
|
||||
|
||||
All operations include dry-run mode and whitelist protection to ensure safety.
|
||||
Moniker: mole
|
||||
Tags:
|
||||
- cleanup
|
||||
- optimizer
|
||||
- maintenance
|
||||
- disk-space
|
||||
- uninstaller
|
||||
- system-tools
|
||||
- cache-cleaner
|
||||
- temp-files
|
||||
ReleaseNotes: |
|
||||
Initial Windows release of Mole.
|
||||
|
||||
Features:
|
||||
- Complete system cleanup functionality
|
||||
- Smart app uninstaller
|
||||
- Interactive disk analyzer
|
||||
- Real-time system monitoring
|
||||
- Developer tools cleanup
|
||||
ReleaseNotesUrl: https://github.com/bhadraagada/mole/releases/tag/v1.0.0
|
||||
ManifestType: defaultLocale
|
||||
ManifestVersion: 1.4.0
|
||||
5
packaging/winget/bhadraagada.mole.yaml
Normal file
5
packaging/winget/bhadraagada.mole.yaml
Normal file
@@ -0,0 +1,5 @@
|
||||
PackageIdentifier: bhadraagada.mole
|
||||
PackageVersion: 1.0.0
|
||||
DefaultLocale: en-US
|
||||
ManifestType: version
|
||||
ManifestVersion: 1.4.0
|
||||
Reference in New Issue
Block a user