-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
59 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
@echo off | ||
|
||
REM Function to replace destination binary path in Makefile (Windows equivalent) | ||
setlocal | ||
set "file=Makefile" | ||
set "string_to_replace=Hedgehog.app\\Contents\\MacOS\\" | ||
set "replacement_string=" | ||
|
||
REM Use PowerShell to replace the string | ||
powershell -Command "(Get-Content %file%) -replace '%string_to_replace%', '%replacement_string%' | Set-Content %file%" | ||
echo Replaced "%string_to_replace%" with "%replacement_string%" in "%file%". | ||
|
||
REM Clean previous builds | ||
if exist build rmdir /S /Q build | ||
mkdir build | ||
|
||
REM Run qmake and make | ||
qmake | ||
nmake | ||
|
||
REM Copy the final binary | ||
if "%~1"=="" ( | ||
copy "build\Hedgehog.exe" "Hedgehog.exe" | ||
) else ( | ||
copy "build\Hedgehog.exe" "Hedgehog-%~1.exe" | ||
) | ||
|
||
endlocal |