-
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
6 changed files
with
106 additions
and
35 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
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,36 @@ | ||
@echo off | ||
|
||
REM Function to replace destination binary path in Makefile (Windows equivalent) | ||
setlocal | ||
set "file=Makefile.Release" | ||
set "string_to_replace=\\Hedgehog" | ||
set "replacement_string=/Hedgehog" | ||
|
||
REM Run qmake and make | ||
qmake | ||
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%". | ||
|
||
set "file=Makefile.Release" | ||
set "string_to_replace=Hedgehog\\" | ||
set "replacement_string=Hedgehog/" | ||
|
||
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 | ||
|
||
make | ||
|
||
REM Copy the final binary | ||
if "%~1"=="" ( | ||
copy "build\Hedgehog.exe" "Hedgehog.exe" | ||
) else ( | ||
copy "build\Hedgehog.exe" "Hedgehog-%~1.exe" | ||
) | ||
|
||
endlocal |
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
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