-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0503e85
commit 5810a00
Showing
4 changed files
with
73 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
@echo off | ||
echo Requirement: jar javac | ||
echo Requirement: jdk1.8 jar javac | ||
|
||
set JAR=jar | ||
set JAVAC=javac | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
@echo off | ||
echo Requirement: jdk1.8 jar javac | ||
|
||
set JAR=jar | ||
set JAVAC=javac | ||
|
||
mkdir assets | ||
mkdir assets\resfiles | ||
|
||
echo build assets\resfiles\minijvm_rt.jar | ||
call :build_jar minijvm_rt.jar ..\minijvm\java\src\main assets\resfiles | ||
|
||
echo build assets\resfiles\glfw_gui.jar | ||
call :build_jar glfm_gui.jar .\java\glfm_gui\src\main assets\resfiles | ||
|
||
echo build assets\resfiles\minijvm_test.jar | ||
call :build_jar ExApp.jar .\java\ExApp\src\main assets\resfiles | ||
|
||
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 assets\resfiles\*.jar -encoding "utf-8" -d classes @source.txt | ||
xcopy /E %2\resource\* classes\ | ||
%JAR% cf %1 -C classes .\ | ||
del /Q/S source.txt | ||
rd /Q/S classes\ | ||
move /Y %1 %3\ | ||
goto :eof |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
|
||
echo "Requirement: jdk1.8 jar javac " | ||
|
||
JAVAC=javac | ||
JAR=jar | ||
|
||
function build_jar(){ | ||
rm -rf $3/$1 | ||
mkdir classes | ||
find $2/java -name "*.java" >source.txt | ||
${JAVAC} -cp assets/resfiles/*.jar -encoding "utf-8" -d classes @source.txt | ||
cp -R $2/resource/* classes/ | ||
${JAR} cf $1 -C classes ./ | ||
rm -rf source.txt | ||
rm -rf classes | ||
mv $1 $3/ | ||
} | ||
|
||
mkdir lib | ||
mkdir libex | ||
|
||
echo "build assets/resfiles/minijvm_rt.jar" | ||
$(build_jar minijvm_rt.jar ../minijvm/java/src/main assets/resfiles) | ||
|
||
echo "build assets/resfiles/glfm_gui.jar" | ||
$(build_jar glfm_gui.jar ./java/glfm_gui/src/main assets/resfiles) | ||
|
||
echo "build assets/resfiles/ExApp.jar" | ||
$(build_jar ExApp.jar ./java/ExApp/src/main assets/resfiles) | ||
|
||
echo "completed" |