.
This commit is contained in:
parent
86aa0f856c
commit
0801ceee6a
310 changed files with 6712 additions and 418 deletions
75
.justfile
75
.justfile
|
|
@ -1,19 +1,62 @@
|
|||
# Scry build recipes
|
||||
# Scry development commands
|
||||
# Android SDK paths
|
||||
|
||||
# Default recipe - show available commands
|
||||
default:
|
||||
@just --list
|
||||
android_sdk := env_var('LOCALAPPDATA') / "Android/Sdk"
|
||||
adb := android_sdk / "platform-tools/adb.exe"
|
||||
emulator := android_sdk / "emulator/emulator.exe"
|
||||
camera_virtual := "-camera-back virtualscene -virtualscene-poster wall=\"" + (justfile_directory() / "TestImages/reference_alpha/serra_angel.jpg") + "\""
|
||||
camera_webcam := "-camera-back webcam0 -camera-front webcam0"
|
||||
|
||||
# Build both standard and embedded versions for all platforms
|
||||
build apk="delver.apk":
|
||||
rm -rf dist
|
||||
dotnet publish -c Release -r win-x64 -o dist/win-x64/standard
|
||||
dotnet publish -c Release -r win-x64 -p:EmbeddedApk={{apk}} -o dist/win-x64/embedded
|
||||
dotnet publish -c Release -r linux-x64 -o dist/linux-x64/standard
|
||||
dotnet publish -c Release -r linux-x64 -p:EmbeddedApk={{apk}} -o dist/linux-x64/embedded
|
||||
dotnet publish -c Release -r osx-x64 -o dist/osx-x64/standard
|
||||
dotnet publish -c Release -r osx-x64 -p:EmbeddedApk={{apk}} -o dist/osx-x64/embedded
|
||||
emu camera="virtual":
|
||||
{{ emulator }} -avd Pixel_6 {{ if camera == "virtual" { camera_virtual } else { camera_webcam } }} -gpu host &
|
||||
|
||||
# Clean build artifacts
|
||||
clean:
|
||||
rm -rf bin obj dist
|
||||
# Kill the running emulator
|
||||
emu-kill:
|
||||
{{ adb }} emu kill
|
||||
|
||||
# Wait for emulator to fully boot
|
||||
emu-wait:
|
||||
@echo "Waiting for emulator to boot..."
|
||||
@while [ "$({{ adb }} shell getprop sys.boot_completed 2>/dev/null)" != "1" ]; do sleep 1; done
|
||||
@echo "Emulator ready"
|
||||
|
||||
# Build a project
|
||||
build project="src/Scry.App" target="net10.0-android":
|
||||
@echo "Building {{ project }}..."
|
||||
dotnet build {{ project }} -f {{ target }} -c Debug
|
||||
@echo "Build complete"
|
||||
|
||||
# Publish a project (creates distributable)
|
||||
publish project="src/Scry.App" target="net10.0-android":
|
||||
@echo "Publishing {{ project }} (this takes a while)..."
|
||||
dotnet publish {{ project }} -f {{ target }} -c Release
|
||||
@echo "Publish complete"
|
||||
|
||||
# Install APK to emulator/device
|
||||
install:
|
||||
{{ adb }} install -r src/Scry.App/bin/Release/net10.0-android/publish/land.charm.scry-Signed.apk
|
||||
|
||||
# Launch the app on emulator/device
|
||||
launch:
|
||||
{{ adb }} shell am start -n land.charm.scry/crc64fb23cc0d511b0157.MainActivity
|
||||
|
||||
# Publish, install, and launch
|
||||
run: (publish "src/Scry.App") install launch
|
||||
|
||||
# View app crash logs
|
||||
logs:
|
||||
{{ adb }} logcat -d | grep -iE "land.charm.scry|scry|mono|dotnet" | tail -80
|
||||
|
||||
# Run tests
|
||||
test:
|
||||
dotnet test test/Scry.Tests
|
||||
|
||||
# Generate the card hash database from Scryfall
|
||||
gen-db *args: (build "tools/DbGenerator" "net10.0")
|
||||
@echo "Running Database generator (this takes a while)..."
|
||||
dotnet run --project tools/DbGenerator --no-build -- src/Scry.App/Resources/Raw/card_hashes.db {{ args }}
|
||||
@echo "Completed generating the database"
|
||||
|
||||
# Full workflow: start emulator, wait, run with hot reload
|
||||
dev: emu emu-wait
|
||||
dotnet watch --project src/Scry.App -f net10.0-android
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue