11 Commits

Author SHA1 Message Date
4039e70d0c Copy to C:\build to avoid path length limits
All checks were successful
Build and Release / build (push) Successful in 9h0m10s
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-04 10:56:07 -05:00
28c6cad153 Add SourceDir to ISS and set TEMP for ISCC
All checks were successful
Build and Release / build (push) Successful in 8h0m19s
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-04 10:52:11 -05:00
dda6bf1002 Try cmd shell with working-directory for ISCC
All checks were successful
Build and Release / build (push) Successful in 9h0m11s
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-04 10:29:56 -05:00
821f119547 Add verbose output to ISCC for debugging
All checks were successful
Build and Release / build (push) Successful in 8h0m9s
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-04 10:05:04 -05:00
a33430faa0 Use Push-Location and Start-Process for ISCC
All checks were successful
Build and Release / build (push) Successful in 9h0m11s
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-04 10:01:45 -05:00
401d717adf Add debug output and create installer dir before ISCC
All checks were successful
Build and Release / build (push) Successful in 8h0m10s
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-04 09:57:48 -05:00
cfac39a838 Fix Inno Setup path issue - use PowerShell Set-Location
All checks were successful
Build and Release / build (push) Successful in 9h0m9s
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-04 08:20:38 -05:00
a408b0fd27 Add debug step to check build output
All checks were successful
Build and Release / build (push) Successful in 8h0m10s
2026-01-04 08:16:26 -05:00
4aba0049f5 Use cd instead of working-directory for Inno Setup
All checks were successful
Build and Release / build (push) Successful in 8h0m9s
2026-01-04 08:10:17 -05:00
7ad87a1398 Fix Inno Setup paths
All checks were successful
Build and Release / build (push) Successful in 9h0m15s
2026-01-04 07:57:27 -05:00
db9930f3b6 Add Inno Setup installer
- Add MonitorControl.iss script
- Installer adds to Start Menu
- Optional: desktop shortcut and startup with Windows
- Update workflow to build installer

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-04 01:48:10 -05:00
3 changed files with 93 additions and 12 deletions

View File

@@ -23,12 +23,51 @@ jobs:
- name: Build Release
run: dotnet build --configuration Release --no-restore
- name: Publish
run: dotnet publish DellMonitorControl/DellMonitorControl.csproj -c Release -o ./publish --self-contained false
- name: Create ZIP archive
run: Compress-Archive -Path ./publish/* -DestinationPath ./MonitorControl-${{ gitea.ref_name }}.zip
- name: Update version in ISS
shell: powershell
run: |
$version = "${{ gitea.ref_name }}".TrimStart("v")
$issPath = "DellMonitorControl/MonitorControl.iss"
(Get-Content $issPath) -replace '#define MyAppVersion ".*"', "#define MyAppVersion `"$version`"" | Set-Content $issPath
- name: List build output
shell: cmd
run: |
echo "Current directory:"
cd
echo "DellMonitorControl contents:"
dir DellMonitorControl
echo "DellMonitorControl\bin contents:"
dir DellMonitorControl\bin
echo "DellMonitorControl\bin\Release contents:"
dir DellMonitorControl\bin\Release
echo "DellMonitorControl\bin\Release\net9.0-windows contents:"
dir DellMonitorControl\bin\Release\net9.0-windows
- name: Build Installer
shell: cmd
run: |
echo Copying to short path to avoid path length issues...
mkdir C:\build 2>nul
xcopy /E /I /Y DellMonitorControl C:\build\app
echo.
echo Working from C:\build\app
cd /d C:\build\app
echo Current directory:
cd
echo.
set TEMP=C:\build\temp
set TMP=C:\build\temp
mkdir C:\build\temp 2>nul
mkdir installer 2>nul
echo.
echo Running Inno Setup...
"C:\Program Files (x86)\Inno Setup 6\ISCC.exe" MonitorControl.iss
echo.
echo ISCC exit code: %ERRORLEVEL%
echo.
echo Installer directory contents:
dir installer
- name: Create Release
shell: powershell
@@ -36,6 +75,7 @@ jobs:
GITEA_TOKEN: ${{ secrets.RELEASE_TOKEN }}
run: |
$tag = "${{ gitea.ref_name }}"
$version = $tag.TrimStart("v")
$repo = "misc/ControlMyMonitorManagement"
$baseUrl = "https://git.marketally.com/api/v1"
@@ -51,7 +91,7 @@ jobs:
$body = @{
tag_name = $tag
name = "Monitor Control $tag"
body = "## Monitor Control $tag`n`n### Installation`n1. Download the ZIP file`n2. Extract to a folder`n3. Run DellMonitorControl.exe`n`n### Requirements`n- Windows 10/11`n- .NET 9.0 Runtime"
body = "## Monitor Control $tag`n`n### Installation`nDownload and run the installer.`n`n### Features`n- System tray monitor control`n- Brightness/Contrast adjustment`n- Input source switching`n- Quick-switch toolbar`n`n### Requirements`n- Windows 10/11`n- .NET 9.0 Runtime"
} | ConvertTo-Json
$release = Invoke-RestMethod -Uri "$baseUrl/repos/$repo/releases" -Method Post -Headers @{"Authorization"="token $env:GITEA_TOKEN"; "Content-Type"="application/json"} -Body $body
@@ -59,11 +99,11 @@ jobs:
Write-Host "Release created with ID: $releaseId"
}
# Upload asset using curl (more reliable for file uploads)
$filePath = "./MonitorControl-$tag.zip"
$fileName = "MonitorControl-$tag.zip"
# Upload installer
$filePath = "C:\build\app\installer\MonitorControl-Setup-$version.exe"
$fileName = "MonitorControl-Setup-$version.exe"
Write-Host "Uploading $fileName..."
curl.exe -X POST -H "Authorization: token $env:GITEA_TOKEN" -F "attachment=@$filePath" "$baseUrl/repos/$repo/releases/$releaseId/assets?name=$fileName"
Write-Host "Asset uploaded successfully"
Write-Host "Installer uploaded successfully"

4
.gitignore vendored
View File

@@ -365,5 +365,5 @@ FodyWeavers.xsd
# Claude Code
.claude/
# Windows special files
nul
# Inno Setup output
DellMonitorControl/installer/

View File

@@ -0,0 +1,41 @@
#define MyAppName "Monitor Control"
#define MyAppVersion "1.0.0"
#define MyAppPublisher "Dang"
#define MyAppExeName "DellMonitorControl.exe"
#define SourcePath "bin\Release\net9.0-windows"
[Setup]
SourceDir=.
AppId={{8F3E4A2B-1C5D-4E6F-9A8B-7C2D1E3F4A5B}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
AppPublisher={#MyAppPublisher}
DefaultDirName={autopf}\{#MyAppName}
DefaultGroupName={#MyAppName}
AllowNoIcons=yes
OutputDir=installer
OutputBaseFilename=MonitorControl-Setup-{#MyAppVersion}
Compression=lzma
SolidCompression=yes
WizardStyle=modern
PrivilegesRequired=admin
UninstallDisplayIcon={app}\{#MyAppExeName}
[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
Name: "startupicon"; Description: "Start with Windows"; GroupDescription: "Startup:"
[Files]
Source: "bin\Release\net9.0-windows\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
[Icons]
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
Name: "{group}\Uninstall {#MyAppName}"; Filename: "{uninstallexe}"
Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
Name: "{userstartup}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: startupicon
[Run]
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent