From 1923c8e50b78e1276a89843bfa5c6178c55a41f1 Mon Sep 17 00:00:00 2001 From: digitalgust Date: Mon, 14 Dec 2020 18:29:30 +0800 Subject: [PATCH] update build script --- binary/build_jar.bat | 17 +++++++++++------ binary/build_wini686.bat | 11 +++++++---- binary/build_winx64.bat | 13 ++++++++----- 3 files changed, 26 insertions(+), 15 deletions(-) diff --git a/binary/build_jar.bat b/binary/build_jar.bat index a1590b66..16e22af5 100755 --- a/binary/build_jar.bat +++ b/binary/build_jar.bat @@ -1,28 +1,33 @@ @echo off echo Requirement: jar javac +set JAR=jar +set JAVAC=javac mkdir lib mkdir libex -echo "build lib\minijvm_rt.jar" +echo build lib\minijvm_rt.jar call :build_jar minijvm_rt.jar ..\minijvm\java\src\main lib -echo "build libex\glfw_gui.jar" +echo build libex\glfw_gui.jar call :build_jar glfw_gui.jar ..\desktop\glfw_gui\java\src\main libex -echo "build libex\minijvm_test.jar" +echo build libex\minijvm_test.jar call :build_jar minijvm_test.jar ..\test\minijvm_test\src\main libex -exit + +echo completed. +pause +goto :eof :build_jar del /Q/S/F %3\%1 md classes dir /S /B %2\java\*.java > source.txt - javac -cp lib\*;libex\* -encoding "utf-8" -d classes @source.txt + %JAVAC% -cp lib\*;libex\* -encoding "utf-8" -d classes @source.txt xcopy /E %2\resource\* classes\ - jar cf %1 -C classes .\ + %JAR% cf %1 -C classes .\ del /Q/S source.txt rd /Q/S classes\ move /Y %1 %3\ diff --git a/binary/build_wini686.bat b/binary/build_wini686.bat index 02d87ed8..42f6aa62 100755 --- a/binary/build_wini686.bat +++ b/binary/build_wini686.bat @@ -7,12 +7,12 @@ set GCCHOME=D:\msys64\mingw32 rem ============================================================== -echo [INFO]Build require tdm-gcc , setup gcc home : %GCCHOME% +echo [INFO]Build require MinGW-w64 , setup gcc home : %GCCHOME% if exist %GCCHOME% ( - echo [INFO]tdm-gcc found + echo [INFO]gcc found ) else ( - echo [ERROR]tdm-gcc not found - echo [INFO]Please download tdm-gcc: https://jmeubank.github.io/tdm-gcc/ + echo [ERROR]gcc not found + echo [INFO]Please download tdm-gcc: http://mingw-w64.org/ echo [INFO]Change GCCHOME with installed directory goto :eof ) @@ -28,6 +28,9 @@ call :jvm_compile mini_jvm.exe ..\minijvm\c %TARGETDIR% echo [INFO]build libgui.dll call :gui_compile libgui.dll ..\desktop\glfw_gui\c %TARGETDIR% +echo completed. +pause + goto :eof rem ============================================================== :jvm_compile diff --git a/binary/build_winx64.bat b/binary/build_winx64.bat index abd57555..930b07e6 100755 --- a/binary/build_winx64.bat +++ b/binary/build_winx64.bat @@ -3,16 +3,16 @@ set GLFWDIR=win_x64 set TARGETDIR=win_x64 set LIBDIR=x86_64-w64-mingw32 -set GCCHOME=D:\TDM-GCC-64 +set GCCHOME=D:\msys64\mingw64 rem ============================================================== -echo [INFO]Build require tdm-gcc , setup gcc home : %GCCHOME% +echo [INFO]Build require MinGW-w64 , setup gcc home : %GCCHOME% if exist %GCCHOME% ( - echo [INFO]tdm-gcc found + echo [INFO]gcc found ) else ( - echo [ERROR]tdm-gcc not found - echo [INFO]Please download tdm-gcc: https://jmeubank.github.io/tdm-gcc/ + echo [ERROR]gcc not found + echo [INFO]Please download tdm-gcc: http://mingw-w64.org/ echo [INFO]Change GCCHOME with installed directory goto :eof ) @@ -28,6 +28,9 @@ call :jvm_compile mini_jvm.exe ..\minijvm\c %TARGETDIR% echo [INFO]build libgui.dll call :gui_compile libgui.dll ..\desktop\glfw_gui\c %TARGETDIR% +echo completed. +pause + goto :eof rem ============================================================== :jvm_compile