git-svn-id: https://svn.microneil.com/svn/PKG-SNF4CGP-WIN/trunk@24 7d91e7c8-5a61-404e-b06a-95855fde9112master
setlocal | setlocal | ||||
del SNFClient.exe SNF2Check.exe SNF4CGP.exe | del SNFClient.exe SNF2Check.exe SNF4CGP.exe | ||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL% | |||||
set path=c:\MinGW\bin;%path% | set path=c:\MinGW\bin;%path% | ||||
set CXX=c++ | set CXX=c++ | ||||
set LIB=c:\MinGW\lib\libws2_32.a | set LIB=c:\MinGW\lib\libws2_32.a | ||||
set LDFLAGS=%LDFLAGS% %LIB% -static | set LDFLAGS=%LDFLAGS% %LIB% -static | ||||
%CXX% source\SNFClient\*.cpp source\CodeDweller\*.cpp source\SNFMulti\*.cpp %CXXFLAGS% -o SNFClient.exe %LDFLAGS% | %CXX% source\SNFClient\*.cpp source\CodeDweller\*.cpp source\SNFMulti\*.cpp %CXXFLAGS% -o SNFClient.exe %LDFLAGS% | ||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL% | |||||
%CXX% source\SNF2Check\*.cpp source\CodeDweller\*.cpp source\SNFMulti\*.cpp %CXXFLAGS% -o SNF2Check.exe %LDFLAGS% | %CXX% source\SNF2Check\*.cpp source\CodeDweller\*.cpp source\SNFMulti\*.cpp %CXXFLAGS% -o SNF2Check.exe %LDFLAGS% | ||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL% | |||||
%CXX% source\SNF4CGP\*.cpp source\CodeDweller\*.cpp source\SNFMulti\*.cpp %CXXFLAGS% -o SNF4CGP.exe %LDFLAGS% | %CXX% source\SNF4CGP\*.cpp source\CodeDweller\*.cpp source\SNFMulti\*.cpp %CXXFLAGS% -o SNF4CGP.exe %LDFLAGS% | ||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL% |
setlocal | setlocal | ||||
del SNFClient.exe SNF2Check.exe SNF4CGP.exe | del SNFClient.exe SNF2Check.exe SNF4CGP.exe | ||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL% | |||||
set path=c:\MinGW-64\bin;%path% | set path=c:\MinGW-64\bin;%path% | ||||
set CXX=x86_64-pc-mingw32-c++ | set CXX=x86_64-pc-mingw32-c++ | ||||
set LIB=c:\MinGW-64\x86_64-pc-mingw32\lib64\libws2_32.a | set LIB=c:\MinGW-64\x86_64-pc-mingw32\lib64\libws2_32.a | ||||
set LDFLAGS=%LDFLAGS% %LIB% -static | set LDFLAGS=%LDFLAGS% %LIB% -static | ||||
%CXX% source\SNFClient\*.cpp source\CodeDweller\*.cpp source\SNFMulti\*.cpp %CXXFLAGS% -o SNFClient.exe %LDFLAGS% | %CXX% source\SNFClient\*.cpp source\CodeDweller\*.cpp source\SNFMulti\*.cpp %CXXFLAGS% -o SNFClient.exe %LDFLAGS% | ||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL% | |||||
%CXX% source\SNF2Check\*.cpp source\CodeDweller\*.cpp source\SNFMulti\*.cpp %CXXFLAGS% -o SNF2Check.exe %LDFLAGS% | %CXX% source\SNF2Check\*.cpp source\CodeDweller\*.cpp source\SNFMulti\*.cpp %CXXFLAGS% -o SNF2Check.exe %LDFLAGS% | ||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL% | |||||
%CXX% source\SNF4CGP\*.cpp source\CodeDweller\*.cpp source\SNFMulti\*.cpp %CXXFLAGS% -o SNF4CGP.exe %LDFLAGS% | %CXX% source\SNF4CGP\*.cpp source\CodeDweller\*.cpp source\SNFMulti\*.cpp %CXXFLAGS% -o SNF4CGP.exe %LDFLAGS% | ||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL% |
REM Command file to create the 64-bit SNF4CGP module for Windows. | |||||
REM Command file to create the 32-bit SNF4CGP module for Windows. | |||||
REM | REM | ||||
REM Copyright (c) 2013 ARM Research Corporation | REM Copyright (c) 2013 ARM Research Corporation | ||||
setlocal | |||||
BuildExeX32.cmd | |||||
CreateModule.cmd | |||||
call BuildExeX32.cmd | |||||
IF %ERRORLEVEL% NEQ 0 ( | |||||
ECHO Error from BuildExeX32.cmd | |||||
EXIT /B %ERRORLEVEL% | |||||
) | |||||
call CreateModule.cmd | |||||
IF %ERRORLEVEL% NEQ 0 ( | |||||
ECHO Error from CreateModule.cmd | |||||
EXIT /B %ERRORLEVEL% | |||||
) |
REM Command file to create the 64-bit SNF4CGP module for Windows. | |||||
REM | |||||
REM Copyright (c) 2013 ARM Research Corporation | |||||
call BuildExeX64.cmd | |||||
IF %ERRORLEVEL% NEQ 0 ( | |||||
ECHO Error from BuildExeX64.cmd | |||||
EXIT /B %ERRORLEVEL% | |||||
) | |||||
call CreateModule.cmd | |||||
IF %ERRORLEVEL% NEQ 0 ( | |||||
ECHO Error from CreateModule.cmd | |||||
EXIT /B %ERRORLEVEL% | |||||
) |
set MOD_ZIPFILE=CGPSNF-MODULE.zip | set MOD_ZIPFILE=CGPSNF-MODULE.zip | ||||
DEL %MOD_ZIPFILE% | DEL %MOD_ZIPFILE% | ||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL% | |||||
RMDIR /S /Q %TEMP_DIR% | RMDIR /S /Q %TEMP_DIR% | ||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL% | |||||
MKDIR %TEMP_DIR% | MKDIR %TEMP_DIR% | ||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL% | |||||
MKDIR %MOD_PATH% | MKDIR %MOD_PATH% | ||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL% | |||||
MKDIR %MOD_PATH%\hold | MKDIR %MOD_PATH%\hold | ||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL% | |||||
MKDIR %MOD_PATH%\Doc | MKDIR %MOD_PATH%\Doc | ||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL% | |||||
COPY SNF4CGP.exe %MOD_PATH%\CGPSNF.exe | COPY SNF4CGP.exe %MOD_PATH%\CGPSNF.exe | ||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL% | |||||
COPY SNFClient.exe %MOD_PATH% | COPY SNFClient.exe %MOD_PATH% | ||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL% | |||||
COPY SNF2Check.exe %MOD_PATH% | COPY SNF2Check.exe %MOD_PATH% | ||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL% | |||||
COPY curl.exe %MOD_PATH% | COPY curl.exe %MOD_PATH% | ||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL% | |||||
COPY Scripts\getRulebase.cmd.sample %MOD_PATH% | COPY Scripts\getRulebase.cmd.sample %MOD_PATH% | ||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL% | |||||
COPY test_files\*.txt %MOD_PATH% | COPY test_files\*.txt %MOD_PATH% | ||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL% | |||||
COPY test_files\cleanmsg.txt %MOD_PATH% | COPY test_files\cleanmsg.txt %MOD_PATH% | ||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL% | |||||
COPY config_files\*.sample %MOD_PATH% | COPY config_files\*.sample %MOD_PATH% | ||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL% | |||||
COPY Doc\*.* %MOD_PATH%\Doc | COPY Doc\*.* %MOD_PATH%\Doc | ||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL% | |||||
CD %TEMP_DIR% | CD %TEMP_DIR% | ||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL% | |||||
7z a -tzip ..\%MOD_ZIPFILE% %MOD_DIR%\ | 7z a -tzip ..\%MOD_ZIPFILE% %MOD_DIR%\ | ||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL% | |||||
CD .. | CD .. | ||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL% | |||||
RMDIR /S /Q %TEMP_DIR% | RMDIR /S /Q %TEMP_DIR% | ||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL% |