mirror of
https://github.com/NinjaCheetah/WiiPy.git
synced 2025-04-26 13:21:01 -04:00
Add Build.ps1 to replicate Makefile functionality on Windows
This commit is contained in:
parent
2733b70e18
commit
71450b5204
32
Build.ps1
Normal file
32
Build.ps1
Normal file
@ -0,0 +1,32 @@
|
||||
# Build.ps1 for WiiPy
|
||||
|
||||
# Default option is to run build, like a Makefile
|
||||
param(
|
||||
[string]$Task = "build"
|
||||
)
|
||||
|
||||
$buildWiiPy = {
|
||||
Write-Host "Building WiiPy..."
|
||||
python -m nuitka --show-progress --assume-yes-for-downloads --onefile wiipy.py --onefile-tempdir-spec="{CACHE_DIR}/NinjaCheetah/WiiPy"
|
||||
}
|
||||
|
||||
$cleanWiiPy = {
|
||||
Write-Host "Cleaning..."
|
||||
Remove-Item -Recurse -Force wiipy.exe, ./wiipy.build/, ./wiipy.dist/, ./wiipy.onefile-build/
|
||||
}
|
||||
|
||||
switch ($Task.ToLower()) {
|
||||
"build" {
|
||||
& $buildWiiPy
|
||||
break
|
||||
}
|
||||
"clean" {
|
||||
& $cleanWiiPy
|
||||
break
|
||||
}
|
||||
default {
|
||||
Write-Host "Unknown task: $Task" -ForegroundColor Red
|
||||
Write-Host "Available tasks: build, clean"
|
||||
break
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user