Skip to content

Commit

Permalink
fix: 修复Windows下build_opt.h中末尾没有空格可能会报错的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
HalfSweet committed Nov 10, 2023
1 parent 53ad933 commit 4be2084
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions system/extras/prebuild.bat
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ set BOARD_PLATFORM_PATH=%3

if not exist "%BUILD_PATH%\sketch" mkdir "%BUILD_PATH%\sketch"
if not exist "%BUILD_SOURCE_PATH%\build_opt.h" (
echo -e "-fmacro-prefix-map=\"%BOARD_PLATFORM_PATH:\=\\%\"=." > "%BUILD_PATH%\sketch\build.opt"
echo "\n-fmacro-prefix-map=\"%BOARD_PLATFORM_PATH:\=\\%\"=." > "%BUILD_PATH%\sketch\build.opt"
) else (
copy "%BUILD_SOURCE_PATH%\build_opt.h" "%BUILD_PATH%\sketch\build.opt"
echo -e "-fmacro-prefix-map=\"%BOARD_PLATFORM_PATH:\=\\%\"=." >> "%BUILD_PATH%\sketch\build.opt"
echo. >> "%BUILD_PATH%\sketch\build.opt"
echo "-fmacro-prefix-map=\"%BOARD_PLATFORM_PATH:\=\\%\"=." >> "%BUILD_PATH%\sketch\build.opt"
)
echo #include ^<SrcWrapper.h^> > "%BUILD_PATH%\sketch\SrcWrapper.cpp"

0 comments on commit 4be2084

Please sign in to comment.