mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-11 11:47:09 +02:00
Create .mm source blanks for macOS modules.
This commit is contained in:
parent
b648548001
commit
8c97e915ec
1 changed files with 11 additions and 7 deletions
|
@ -67,26 +67,30 @@ exit /b %errorlevel%
|
|||
set "CommandPath=%1"
|
||||
set "CommandPathUnix=!CommandPath:\=/!"
|
||||
set "CommandPathWin=!CommandPath:/=\!"
|
||||
|
||||
if "!CommandPathUnix:~-4!" == "_mac" (
|
||||
set "CommandExt=mm"
|
||||
) else (
|
||||
set "CommandExt=cpp"
|
||||
)
|
||||
if "!CommandPathUnix!" == "" (
|
||||
echo Provide source path.
|
||||
exit /b 1
|
||||
) else if exist "SourceFiles\!CommandPathWin!.cpp" (
|
||||
) else if exist "SourceFiles\!CommandPathWin!.!CommandExt!" (
|
||||
echo This source already exists.
|
||||
exit /b 1
|
||||
)
|
||||
echo Generating source !CommandPathUnix!.cpp..
|
||||
mkdir "SourceFiles\!CommandPathWin!.cpp"
|
||||
rmdir "SourceFiles\!CommandPathWin!.cpp"
|
||||
echo Generating source !CommandPathUnix!.!CommandExt!..
|
||||
mkdir "SourceFiles\!CommandPathWin!.!CommandExt!"
|
||||
rmdir "SourceFiles\!CommandPathWin!.!CommandExt!"
|
||||
|
||||
call :write_comment !CommandPathWin!.cpp
|
||||
call :write_comment !CommandPathWin!.!CommandExt!
|
||||
set "quote="""
|
||||
set "quote=!quote:~0,1!"
|
||||
set "source1=#include !quote!!CommandPathUnix!.h!quote!"
|
||||
(
|
||||
echo !source1!
|
||||
echo.
|
||||
)>> "SourceFiles\!CommandPathWin!.cpp"
|
||||
)>> "SourceFiles\!CommandPathWin!.!CommandExt!"
|
||||
exit /b
|
||||
)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue