From 4096854d8ba4978119885bd498e47c6e6dca37d3 Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Sat, 1 Apr 2023 15:02:51 +0200 Subject: [PATCH] Allow running Keil natively --- compile.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/compile.sh b/compile.sh index e34fffe..4dbe7da 100755 --- a/compile.sh +++ b/compile.sh @@ -218,7 +218,14 @@ then logFile="$(mktemp)"; - WINEDEBUG=-all,fixme+event xvfb-run bash -c "dwm & wine \"C:\Keil_v5\UV4\UV4.exe\" -j0 -b \"$projectFile\" -t \"$targetName\" -l \"$logFile\""; + if is_truthy "${NATIVE_WINDOWS}" + then + echo "Running on windows natively!"; + PROJECT_FILE="$projectFile" LOG_FILE="$logFile" WSLENV="PROJECT_FILE/p:LOG_FILE/p" cmd.exe /c "C:\Keil_v5\UV4\UV4.exe" -j0 -b "%PROJECT_FILE%" -t "$targetName" -l "%LOG_FILE%"; + else + WINEDEBUG=-all,fixme+event xvfb-run bash -c "dwm & wine \"C:\Keil_v5\UV4\UV4.exe\" -j0 -b \"$projectFile\" -t \"$targetName\" -l \"$logFile\""; + fi; + mv -f "$tempFile" "$projectFile"; errorPatterns=()