Skip to content

Commit

Permalink
refine
Browse files Browse the repository at this point in the history
  • Loading branch information
jumperchen committed Sep 1, 2023
1 parent 9048e41 commit cf67d00
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
9 changes: 5 additions & 4 deletions bin/genmd5sign
Original file line number Diff line number Diff line change
Expand Up @@ -77,21 +77,22 @@ function md5java {
if [ "$TERM" = "cygwin" ] || [ "$OSTYPE" = "cygwin" ] ; then
# need to parse with cygpath for correct path on cygwin/windows
# also need semi-colon instead of colon for java classpath
java -cp "$maindir/dist/lib/ext/commons-codec.jar;$maindir/dist/lib/ext/bsh.jar" bsh.Interpreter $(cygpath -mp $maindir/bin/md5java) $src
java -cp "$maindir/dist/lib/ext/bsh.jar" bsh.Interpreter $(cygpath -mp $maindir/bin/md5java) $src
elif [ "$OSTYPE" = "msys" ] ; then
# MinGW, git-bash
java -cp "$maindir/dist/lib/ext/commons-codec.jar;$maindir/dist/lib/ext/bsh.jar" bsh.Interpreter $maindir/bin/md5java $src
java -cp "$maindir/dist/lib/ext/bsh.jar" bsh.Interpreter $maindir/bin/md5java $src
else
java -cp "$maindir/dist/lib/ext/commons-codec.jar:$maindir/dist/lib/ext/bsh.jar" bsh.Interpreter $maindir/bin/md5java $src
java -cp "$maindir/dist/lib/ext/bsh.jar" bsh.Interpreter $maindir/bin/md5java $src
fi
}

export IFS=","
echo "Generate md5 sign"
for cls in $classes; do
echo "class => $cls"
clsdir=$(echo $cls | sed 's/\./\//g')
filemd5=`md5java "$debugdir/$clsdir.class"`
echo "class => $cls"
echo "output: $filemd5"
filemd5=`md5java "$filemd5$build"`
name=`md5java "$cls"`
# remove line break at the end for windows/cygwin compatility
Expand Down
10 changes: 7 additions & 3 deletions zk/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,13 @@ task gentime(type: Exec) {
commandLine './gentime', "$projectDir/codegen/resources/metainfo/zk/build"
}

task genmd5sign(type: Exec) {
workingDir "$rootDir/bin"
commandLine './genmd5sign', "$projectDir/codegen/resources/metainfo/zk/buildsign", "org.zkoss.zk.ui.sys.WebAppFactoryImpl,org.zkoss.zk.ui.http.WebManager,org.zkoss.zk.ui.sys.Registry", "$projectDir/build/classes/java/main", "$projectDir/codegen/resources/metainfo/zk/build", "$rootDir"
task genmd5sign() {
doLast {
exec {
workingDir "$rootDir/bin"
commandLine './genmd5sign', "$projectDir/codegen/resources/metainfo/zk/buildsign", "org.zkoss.zk.ui.sys.WebAppFactoryImpl,org.zkoss.zk.ui.http.WebManager,org.zkoss.zk.ui.sys.Registry", "$projectDir/build/classes/java/main", "$projectDir/codegen/resources/metainfo/zk/build", "$rootDir"
}
}
}
genmd5sign.dependsOn(gentime)
gentime.mustRunAfter(compileJava)
Expand Down

0 comments on commit cf67d00

Please sign in to comment.