forgot about service account running it instead

This commit is contained in:
2025-07-19 19:52:28 +10:00
parent 003dcc7cf9
commit 742efc4cf5
5 changed files with 130 additions and 2 deletions

View File

@@ -30,9 +30,12 @@ jobs:
Write-Host "Project file exists: $(Test-Path 'project.godot')"
Get-ChildItem -Path . -Filter "*.cfg" | Select-Object Name
- name: Setup Export Templates
- name: Setup Export Templates and Tools
run: |
# Setup export templates
$templateDir = "C:\WINDOWS\ServiceProfiles\NetworkService\AppData\Roaming\Godot\export_templates\4.4.1.stable"
Write-Host "Checking for export templates at: $templateDir"
if (-not (Test-Path $templateDir)) {
Write-Host "Creating export template directory..."
New-Item -ItemType Directory -Force -Path $templateDir
@@ -42,17 +45,35 @@ jobs:
Write-Host "Extracting templates..."
Expand-Archive -Path "templates.tpz" -DestinationPath "temp_templates" -Force
Write-Host "Copying templates..."
Copy-Item -Path "temp_templates\templates\*" -Destination $templateDir -Recurse -Force
Write-Host "Cleaning up..."
Remove-Item -Path "temp_templates" -Recurse -Force
Remove-Item -Path "templates.tpz" -Force
Write-Host "Export templates installed to: $templateDir"
Write-Host "Template directory contents:"
Get-ChildItem -Path $templateDir | Select-Object Name
} else {
Write-Host "Export templates already exist at: $templateDir"
Write-Host "Template directory contents:"
Get-ChildItem -Path $templateDir | Select-Object Name
}
# Check if rcedit is available (it's already in the project)
Write-Host "Checking for rcedit..."
if (Test-Path "rcedit-x64.exe") {
Write-Host "rcedit found in project directory"
} else {
Write-Host "rcedit not found - downloading..."
Invoke-WebRequest -Uri "https://github.com/electron/rcedit/releases/latest/download/rcedit-x64.exe" -OutFile "rcedit-x64.exe"
Write-Host "rcedit downloaded"
}
- name: Windows Build
run: .\build-windows.bat
run: .\build-windows-ci.bat
shell: cmd
- name: Check Build Output

40
build-windows-ci.bat Normal file
View File

@@ -0,0 +1,40 @@
@echo off
setlocal
echo Building PNGTuber Plus for Windows (CI Environment)...
rem Create build directory
if not exist "build\windows" mkdir "build\windows"
rem Templates should already be installed by the GitHub Actions workflow
set TEMPLATE_DIR=C:\WINDOWS\ServiceProfiles\NetworkService\AppData\Roaming\Godot\export_templates\4.4.1.stable
echo Checking for export templates at: %TEMPLATE_DIR%
if exist "%TEMPLATE_DIR%" (
echo Export templates found.
dir "%TEMPLATE_DIR%"
) else (
echo ERROR: Export templates not found at %TEMPLATE_DIR%
echo This should have been handled by the GitHub Actions setup step.
exit /b 1
)
rem Build the project
echo Running Godot export...
"D:\Godot\Godot_v4.4.1-stable_win64.exe" --headless --export-release "Windows Desktop" "build\windows\PNGTuber-Plus.exe"
if %ERRORLEVEL% EQU 0 (
echo.
echo Build completed successfully!
echo Output: build\windows\PNGTuber-Plus.exe
if exist "build\windows\PNGTuber-Plus.exe" (
echo File size:
dir "build\windows\PNGTuber-Plus.exe"
)
echo.
) else (
echo.
echo Build failed with error code %ERRORLEVEL%
echo.
exit /b %ERRORLEVEL%
)

View File

@@ -369,3 +369,70 @@ ssh_remote_deploy/cleanup_script="#!/usr/bin/env bash
kill $(pgrep -x -f \"{temp_dir}/{exe_name}.app/Contents/MacOS/{exe_name} {cmd_args}\")
rm -rf \"{temp_dir}\""
application/min_macos_version="10.12"
[preset.3]
name="Windows Desktop 2"
platform="Windows Desktop"
runnable=false
advanced_options=false
dedicated_server=false
custom_features=""
export_filter="all_resources"
include_filter=""
exclude_filter=""
export_path=""
patches=PackedStringArray()
encryption_include_filters=""
encryption_exclude_filters=""
seed=0
encrypt_pck=false
encrypt_directory=false
script_export_mode=2
[preset.3.options]
custom_template/debug=""
custom_template/release=""
debug/export_console_wrapper=1
binary_format/embed_pck=false
texture_format/s3tc_bptc=true
texture_format/etc2_astc=false
binary_format/architecture="x86_64"
codesign/enable=false
codesign/timestamp=true
codesign/timestamp_server_url=""
codesign/digest_algorithm=1
codesign/description=""
codesign/custom_options=PackedStringArray()
application/modify_resources=true
application/icon=""
application/console_wrapper_icon=""
application/icon_interpolation=4
application/file_version=""
application/product_version=""
application/company_name=""
application/product_name=""
application/file_description=""
application/copyright=""
application/trademarks=""
application/export_angle=0
application/export_d3d12=0
application/d3d12_agility_sdk_multiarch=true
ssh_remote_deploy/enabled=false
ssh_remote_deploy/host="user@host_ip"
ssh_remote_deploy/port="22"
ssh_remote_deploy/extra_args_ssh=""
ssh_remote_deploy/extra_args_scp=""
ssh_remote_deploy/run_script="Expand-Archive -LiteralPath '{temp_dir}\\{archive_name}' -DestinationPath '{temp_dir}'
$action = New-ScheduledTaskAction -Execute '{temp_dir}\\{exe_name}' -Argument '{cmd_args}'
$trigger = New-ScheduledTaskTrigger -Once -At 00:00
$settings = New-ScheduledTaskSettingsSet -AllowStartIfOnBatteries -DontStopIfGoingOnBatteries
$task = New-ScheduledTask -Action $action -Trigger $trigger -Settings $settings
Register-ScheduledTask godot_remote_debug -InputObject $task -Force:$true
Start-ScheduledTask -TaskName godot_remote_debug
while (Get-ScheduledTask -TaskName godot_remote_debug | ? State -eq running) { Start-Sleep -Milliseconds 100 }
Unregister-ScheduledTask -TaskName godot_remote_debug -Confirm:$false -ErrorAction:SilentlyContinue"
ssh_remote_deploy/cleanup_script="Stop-ScheduledTask -TaskName godot_remote_debug -ErrorAction:SilentlyContinue
Unregister-ScheduledTask -TaskName godot_remote_debug -Confirm:$false -ErrorAction:SilentlyContinue
Remove-Item -Recurse -Force '{temp_dir}'"