mirror of
https://github.com/litruv/PNGTuber-Plus.git
synced 2026-07-24 02:26:02 +10:00
templates
This commit is contained in:
61
.github/workflows/build-windows.yml
vendored
61
.github/workflows/build-windows.yml
vendored
@@ -30,36 +30,49 @@ jobs:
|
|||||||
Write-Host "Project file exists: $(Test-Path 'project.godot')"
|
Write-Host "Project file exists: $(Test-Path 'project.godot')"
|
||||||
Get-ChildItem -Path . -Filter "*.cfg" | Select-Object Name
|
Get-ChildItem -Path . -Filter "*.cfg" | Select-Object Name
|
||||||
|
|
||||||
|
- name: Cache Export Templates
|
||||||
|
uses: actions/cache@v4
|
||||||
|
id: cache-templates
|
||||||
|
with:
|
||||||
|
path: C:\WINDOWS\ServiceProfiles\NetworkService\AppData\Roaming\Godot\export_templates\4.4.1.stable
|
||||||
|
key: godot-templates-4.4.1-stable-v1
|
||||||
|
|
||||||
- name: Setup Export Templates and Tools
|
- name: Setup Export Templates and Tools
|
||||||
|
if: steps.cache-templates.outputs.cache-hit != 'true'
|
||||||
run: |
|
run: |
|
||||||
# Setup export templates
|
# Setup export templates
|
||||||
$templateDir = "C:\WINDOWS\ServiceProfiles\NetworkService\AppData\Roaming\Godot\export_templates\4.4.1.stable"
|
$templateDir = "C:\WINDOWS\ServiceProfiles\NetworkService\AppData\Roaming\Godot\export_templates\4.4.1.stable"
|
||||||
Write-Host "Checking for export templates at: $templateDir"
|
Write-Host "Creating export template directory..."
|
||||||
|
New-Item -ItemType Directory -Force -Path $templateDir
|
||||||
|
|
||||||
if (-not (Test-Path $templateDir)) {
|
Write-Host "Downloading export templates..."
|
||||||
Write-Host "Creating export template directory..."
|
Invoke-WebRequest -Uri "https://github.com/godotengine/godot/releases/download/4.4.1-stable/Godot_v4.4.1-stable_export_templates.tpz" -OutFile "templates.tpz"
|
||||||
New-Item -ItemType Directory -Force -Path $templateDir
|
|
||||||
|
Write-Host "Renaming .tpz to .zip for extraction..."
|
||||||
Write-Host "Downloading export templates..."
|
Rename-Item "templates.tpz" "templates.zip"
|
||||||
Invoke-WebRequest -Uri "https://downloads.tuxfamily.org/godotengine/4.4.1/Godot_v4.4.1-stable_export_templates.tpz" -OutFile "templates.tpz"
|
|
||||||
|
Write-Host "Extracting templates..."
|
||||||
Write-Host "Extracting templates..."
|
Expand-Archive -Path "templates.zip" -DestinationPath "temp_templates" -Force
|
||||||
Expand-Archive -Path "templates.tpz" -DestinationPath "temp_templates" -Force
|
|
||||||
|
Write-Host "Copying templates to correct location..."
|
||||||
Write-Host "Copying templates..."
|
Copy-Item -Path "temp_templates\templates\*" -Destination $templateDir -Recurse -Force
|
||||||
Copy-Item -Path "temp_templates\templates\*" -Destination $templateDir -Recurse -Force
|
|
||||||
|
Write-Host "Cleaning up..."
|
||||||
Write-Host "Cleaning up..."
|
Remove-Item -Path "temp_templates" -Recurse -Force
|
||||||
Remove-Item -Path "temp_templates" -Recurse -Force
|
Remove-Item -Path "templates.zip" -Force
|
||||||
Remove-Item -Path "templates.tpz" -Force
|
|
||||||
|
Write-Host "Export templates installed to: $templateDir"
|
||||||
Write-Host "Export templates installed to: $templateDir"
|
|
||||||
Write-Host "Template directory contents:"
|
- name: Verify Templates
|
||||||
Get-ChildItem -Path $templateDir | Select-Object Name
|
run: |
|
||||||
|
$templateDir = "C:\WINDOWS\ServiceProfiles\NetworkService\AppData\Roaming\Godot\export_templates\4.4.1.stable"
|
||||||
|
Write-Host "Checking for export templates at: $templateDir"
|
||||||
|
if (Test-Path $templateDir) {
|
||||||
|
Write-Host "Export templates found. Contents:"
|
||||||
|
Get-ChildItem -Path $templateDir | Select-Object Name, Length | Format-Table
|
||||||
} else {
|
} else {
|
||||||
Write-Host "Export templates already exist at: $templateDir"
|
Write-Host "ERROR: Export templates not found!"
|
||||||
Write-Host "Template directory contents:"
|
exit 1
|
||||||
Get-ChildItem -Path $templateDir | Select-Object Name
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Check if rcedit is available (it's already in the project)
|
# Check if rcedit is available (it's already in the project)
|
||||||
|
|||||||
@@ -17,14 +17,15 @@ if not exist "%TEMPLATE_DIR%" (
|
|||||||
rem Download templates if the export-pack didn't work
|
rem Download templates if the export-pack didn't work
|
||||||
if not exist "%TEMPLATE_DIR%" (
|
if not exist "%TEMPLATE_DIR%" (
|
||||||
echo Downloading export templates...
|
echo Downloading export templates...
|
||||||
powershell -Command "& {Invoke-WebRequest -Uri 'https://downloads.tuxfamily.org/godotengine/4.4.1/Godot_v4.4.1-stable_export_templates.tpz' -OutFile 'templates.tpz'}"
|
powershell -Command "& {Invoke-WebRequest -Uri 'https://github.com/godotengine/godot/releases/download/4.4.1-stable/Godot_v4.4.1-stable_export_templates.tpz' -OutFile 'templates.tpz'}"
|
||||||
|
|
||||||
rem Extract templates
|
rem Rename and extract templates
|
||||||
powershell -Command "& {Expand-Archive -Path 'templates.tpz' -DestinationPath 'temp_templates' -Force}"
|
powershell -Command "& {Rename-Item 'templates.tpz' 'templates.zip'}"
|
||||||
|
powershell -Command "& {Expand-Archive -Path 'templates.zip' -DestinationPath 'temp_templates' -Force}"
|
||||||
if not exist "%APPDATA%\Godot\export_templates" mkdir "%APPDATA%\Godot\export_templates"
|
if not exist "%APPDATA%\Godot\export_templates" mkdir "%APPDATA%\Godot\export_templates"
|
||||||
move "temp_templates\templates" "%TEMPLATE_DIR%"
|
move "temp_templates\templates" "%TEMPLATE_DIR%"
|
||||||
rmdir /s /q "temp_templates"
|
rmdir /s /q "temp_templates"
|
||||||
del "templates.tpz"
|
del "templates.zip"
|
||||||
echo Export templates installed.
|
echo Export templates installed.
|
||||||
)
|
)
|
||||||
) else (
|
) else (
|
||||||
|
|||||||
Reference in New Issue
Block a user