set windows-shell := ["powershell.exe", "-NoLogo", "-Command"]

all: build install run

alls: build install-standalone run-standalone

all2: build install install-standalone run2

allu: build install-unity

build:
    dotnet build -c Release

install:
    cp -Force "artifacts/bin/Imperium/release/giosuel.Imperium.dll" \
        "C:\Users\user\AppData\Roaming\com.kesomannen.gale\lethal-company\profiles\Dev-Imperium\BepInEx\plugins\giosuel-Imperium\giosuel.Imperium.dll"

install-standalone:
    mkdir -Force "D:\Games\Lethal Company\v81_7738331233766615287_imperium\BepInEx\plugins\giosuel-Imperium"
    cp -Force "artifacts/bin/Imperium/release/giosuel.Imperium.dll" \
        "D:\Games\Lethal Company\v81_7738331233766615287_imperium\BepInEx\plugins\giosuel-Imperium\giosuel.Imperium.dll"

install-unity:
    cp -Force "artifacts/bin/Imperium/release/giosuel.Imperium.dll" \
        "D:\Code\LethalCompany\DecompiledUnityProjects\LethalCompanyV81\Lethal Company\BepInEx\plugins\giosuel-Imperium\giosuel.Imperium.dll"

run:
    &"C:\Program Files (x86)\Steam\steam.exe" "-applaunch" "1966720" "--doorstop-enabled" "true" "--doorstop-target-assembly" "C:\Users\user\AppData\Roaming\com.kesomannen.gale\lethal-company\profiles\Dev-Imperium\BepInEx\core\BepInEx.Preloader.dll"

run-standalone:
    &"D:\Games\Lethal Company\v81_7738331233766615287_imperium\Lethal Company.exe" --doorstop-enable true --doorstop-target "D:\Games\Lethal Company\v81_7738331233766615287_imperium\BepInEx\core\BepInEx.Preloader.dll"

run2:
    just run-standalone
    sleep 5
    just run-standalone

break:
    cp -Force "D:\Code\LethalCompany\Mods\Imperium\savefiles\steps 10 modified save file on v73\config\giosuel.Imperium.cfg" "C:\Users\user\AppData\Roaming\com.kesomannen.gale\lethal-company\profiles\Dev-Imperium\BepInEx\config\giosuel.Imperium.cfg"

package:
    ./package.ps1
