3 Star 16 Fork 2

zhenrong-wang / hpc-now

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
make_windows.bat 2.83 KB
一键复制 编辑 原始数据 按行查看 历史
:: Copyright (C) 2022-present Shanghai HPC-NOW Technologies Co., Ltd.
:: This code is distributed under the license: MIT License
:: Originally written by Zhenrong WANG
:: mailto: zhenrongwang@live.com | wangzhenrong@hpc-now.com
@echo off
for /f tokens^=2^ delims^=^" %%a in ('findstr CORE_VERSION_CODE .\\hpcopr\\now_macros.h') do set hpcopr_version_code=%%a
for /f tokens^=2^ delims^=^" %%a in ('findstr INSTALLER_VERSION_CODE .\\installer\\installer.h') do set installer_version_code=%%a
:help
if "%~1"=="" (
echo [ -INFO- ] Please specify an option: 'build', 'delete', or 'clear'
echo ^| build - ^(re^)build the binaries
echo ^| delete - delete the previous binaries
echo ^| clear - remove the 'build' folder and binaries in it
echo [ -DONE- ] Exit now.
exit /b 1
) else if "%~1"=="build" (
echo [ START: ] Building the binaries now ...
echo [ -INFO- ] Please build hpcmgr with GNU/Linux, not Windows.
mkdir .\build > nul 2>&1
echo [ -INFO- ] Deleting previously built binaries ^(if exist^)...
del /s /q /f .\build\* > nul
echo [ -INFO- ] Bulding new binaries with the gcc ...
gcc .\hpcopr\*.c -Wall -lpthread -lWs2_32 -o .\build\hpcopr-win-%hpcopr_version_code%.exe
gcc -c .\hpcopr\general_funcs.c -Wall -o .\installer\gfuncs.o
gcc -c .\hpcopr\opr_crypto.c -Wall -o .\installer\ocrypto.o
gcc -c .\hpcopr\cluster_general_funcs.c -Wall -o .\installer\cgfuncs.o
gcc -c .\hpcopr\time_process.c -Wall -o .\installer\tproc.o
gcc -c .\hpcopr\general_print_info.c -Wall -o .\installer\gprint.o
gcc -c .\hpcopr\now_md5.c -Wall -o .\installer\md5.o
gcc -c .\hpcopr\now_sha256.c -Wall -o .\installer\sha256.o
ar -rc .\installer\libnow.a .\installer\gfuncs.o .\installer\ocrypto.o .\installer\cgfuncs.o .\installer\tproc.o .\installer\md5.o .\installer\gprint.o .\installer\sha256.o
gcc .\installer\installer.c .\installer\libnow.a -lnetapi32 -lpthread -lWs2_32 -Wall -o .\build\installer-win-%installer_version_code%.exe
gcc .\now-crypto\now-crypto-v3-aes.c -Wall -Ofast -o .\build\now-crypto-aes-win.exe
del /f /s /q .\installer\*.a > nul
del /f /s /q .\installer\*.o > nul
) else if "%~1"=="delete" (
echo [ START: ] Deleting the binaries now ...
del /s /q /f .\build\* > nul
) else if "%~1"=="clear" (
echo [ START: ] Deleting the binaries now ...
del /s /q /f .\build\* > nul
echo [ START: ] Removing the build folder now ...
rd /s /q .\build > nul
) else (
echo [ -INFO- ] Please specify an option: 'build', 'delete', or 'clear'
echo ^| build - ^(re^)build the binaries
echo ^| delete - delete the previous binaries
echo ^| clear - remove the 'build' folder and binaries in it
echo [ -DONE- ] Exit now.
exit /b 1
)
echo [ -DONE- ] Please check the console output for building results.
exit /b 1
C
1
https://gitee.com/zhenrong-wang/hpc-now.git
git@gitee.com:zhenrong-wang/hpc-now.git
zhenrong-wang
hpc-now
hpc-now
master

搜索帮助