Skip to content

Commit

Permalink
remove registry
Browse files Browse the repository at this point in the history
  • Loading branch information
DevChu committed Oct 6, 2023
1 parent 1c68bb4 commit 989bb21
Show file tree
Hide file tree
Showing 12 changed files with 3 additions and 463 deletions.
99 changes: 0 additions & 99 deletions bin/genmd5sign

This file was deleted.

102 changes: 0 additions & 102 deletions bin/md5java

This file was deleted.

17 changes: 1 addition & 16 deletions build
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ if [ "$1" = "" ] || [ "$1" = "lessc" ] || [ "$1" = "checkstyle" ] ; then
fi

#-- parsing cmd
cmdList=" bd br cd cr ud ur doc jsrc build.debug build.release clean clean.debug clean.release utest.debug utest.release javadoc jsdoc zipjs lessc tsmin dev help checkstyle "
cmdList=" bd br cd cr ud ur doc jsrc build.debug build.release clean clean.debug clean.release utest.debug utest.release javadoc jsdoc zipjs lessc tsmin help checkstyle "
if [ \( $# != 0 \) -a \( "${cmdList#* $1 }" != "$cmdList" \) ] ; then
cmd=$1
shift
Expand Down Expand Up @@ -493,20 +493,6 @@ function invoke_ant
else
gentime=$(grep '^time=' format)
gentime=${gentime#time=}
signdir=$(grep '^signdir=' format)
signdir=${signdir#signdir=}
signclasses=$(grep '^signclasses=' format)
signclasses=${signclasses#signclasses=}
if [ "$gentime" = "" ] && [ "$signdir" != "" ] && [ "$cmd" = "build" ] ; then
buildstamp=$(grep '^buildstamp=' format)
buildstamp=${buildstamp#buildstamp=}
if [ ! -f $maindir/zk/codegen/$buildstamp ] ; then
echo "zk's build stamp is not found, please build zk first"
exit -1
fi
else
buildstamp=$gentime
fi
CLASSPATH="$DCP" ANT_OPTS=-Xmx160M ant $verbose $class_test \
$doall -Dformat="$format" -Ddeploy="$deploy" \
-Dcheckstyle.java="$checkstyleJava" -Dcheckstyle.js="$checkstyleJs" \
Expand All @@ -527,7 +513,6 @@ function invoke_ant
-Dshare.javadoc.dir="$javadocdir" \
-Djavadoc.class.path="$DCP" -Dapp.name=$app $unziplist \
-Droot.context=$rootContext -Dgentime=$gentime \
-Dsigndir=$signdir -Dsignclasses=$signclasses -Dbuildstamp=$buildstamp \
$dfnList -buildfile $maindir/build.xml $1
fi

Expand Down
24 changes: 1 addition & 23 deletions build.target.xml
Original file line number Diff line number Diff line change
Expand Up @@ -137,18 +137,6 @@ if="deploy.tomcat.required">
<target name="deploy" depends="deploy.lib, deploy.osgi, deploy.tomcat">
</target>

<target name="dev" depends="config, gentime">
<delete file="${zkcmldir}/zkex/${codegen.archive.dir}/metainfo/zk/buildsign" verbose="true" failonerror="false" />
<exec executable="bash" dir="." failonerror="true">
<arg value="${bin.dir}/genmd5sign"/>
<arg value="${codegen.dir}/${signdir}"/>
<arg value="${signclasses}"/>
<arg value="${out.dir}/classes"/>
<arg value="${maindir}/zk/${codegen.dir}/${buildstamp}"/>
<arg value="${maindir}"/>
</exec>
</target>

<!-- ===== -->
<!-- BUILD -->
<!-- ===== -->
Expand Down Expand Up @@ -201,7 +189,7 @@ if="deploy.tomcat.required">
<arg value="--dest=${codegen.archive.dir}/${zipjs}"/>
</exec>
</target>
<target name="build.jar" depends="lessc, zipjs, gentime, genmd5sign, compile" if="build.jar.required">
<target name="build.jar" depends="lessc, zipjs, gentime, compile" if="build.jar.required">
<available file="${srcpv.dir}" property="jar.srcpv.dir" value="${srcpv.dir}"/>
<property name="jar.srcpv.dir" value="${codegen.archive.dir}"/><!-- could be any existent directory -->

Expand Down Expand Up @@ -261,16 +249,6 @@ if="deploy.tomcat.required">
<arg value="${codegen.dir}/${gentime}"/>
</exec>
</target>
<target name="genmd5sign" depends="config" if="genmd5sign.required">
<exec executable="bash" dir="." failonerror="true">
<arg value="${bin.dir}/genmd5sign"/>
<arg value="${codegen.dir}/${signdir}"/>
<arg value="${signclasses}"/>
<arg value="${out.dir}"/>
<arg value="${maindir}/zk/${codegen.dir}/${buildstamp}"/>
<arg value="${maindir}"/>
</exec>
</target>

<target name="build.war" depends="compile" if="build.war.required">
<mkdir dir="${out.dir}"/>
Expand Down
6 changes: 0 additions & 6 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -112,12 +112,6 @@ Copyright (C) 2002 Potix Corporation. All Rights Reserved.
</not>
</condition>

<condition property="genmd5sign.required">
<not>
<equals arg1="${signdir}" arg2=""/>
</not>
</condition>

<!-- deploy -->
<condition property="deploy.lib.required">
<equals arg1="${deploy}" arg2="lib"/>
Expand Down
13 changes: 0 additions & 13 deletions zhtml/src/org/zkoss/zhtml/impl/PageRenderer.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import org.zkoss.zk.ui.Executions;
import org.zkoss.zk.ui.Page;
import org.zkoss.zk.ui.UiException;
import org.zkoss.zk.ui.WebApp;
import org.zkoss.zk.ui.sys.Attributes;
import org.zkoss.zk.ui.sys.ComponentCtrl;
import org.zkoss.zk.ui.sys.ExecutionsCtrl;
Expand Down Expand Up @@ -156,14 +155,8 @@ public static void afterRenderHtml(Execution exec, Page page, Writer out, Object

final TagRenderContext rc = (TagRenderContext) param;
String rcs = rc.complete();
WebApp webApp = exec.getDesktop().getWebApp();

if (rcs.length() > 0) {
Object notice = webApp.getAttribute("org.zkoss.zk.ui.client.notice");
if (notice instanceof String) {
rcs += '\n' + ((String) notice);
}

if (out instanceof StringWriter) {
final StringBuffer buf = ((StringWriter) out).getBuffer();
int j = buf.lastIndexOf("</body>");
Expand All @@ -179,12 +172,6 @@ public static void afterRenderHtml(Execution exec, Page page, Writer out, Object
}

write(out, HtmlPageRenders.outHeaderZkTags(exec, page));
if (rcs.length() == 0) {
Object notice = webApp.getAttribute("org.zkoss.zk.ui.client.notice");
if (notice instanceof String) {
out.write((String) notice);
}
}
writeln(out, HtmlPageRenders.outUnavailable(exec));
afterRenderTag(exec, param);
}
Expand Down
4 changes: 1 addition & 3 deletions zk/format
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
jar
time=archive/metainfo/zk/build
signdir=archive/metainfo/zk/buildsign
signclasses=org.zkoss.zk.ui.sys.WebAppFactoryImpl,org.zkoss.zk.ui.http.WebManager,org.zkoss.zk.ui.sys.Registry
time=archive/metainfo/zk/build
4 changes: 0 additions & 4 deletions zk/src/org/zkoss/zk/ui/http/SimpleWebApp.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@
import org.zkoss.zk.ui.ext.ScopeListener;
import org.zkoss.zk.ui.impl.AbstractWebApp;
import org.zkoss.zk.ui.impl.ScopeListeners;
import org.zkoss.zk.ui.sys.Registry;
import org.zkoss.zk.ui.sys.WebAppFactoryImpl;
import org.zkoss.zk.ui.util.Configuration;

/**
Expand All @@ -56,8 +54,6 @@ public void init(Object context, Configuration config) {
throw new IllegalArgumentException("context");
_ctx = (ServletContext) context;
super.init(context, config);

Registry.sign(this, Registry.class, WebManager.class, WebAppFactoryImpl.class);
}

private final Map<String, Object> _attrs = new AttributesMap() {
Expand Down
4 changes: 0 additions & 4 deletions zk/src/org/zkoss/zk/ui/http/WebManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,11 @@
import org.zkoss.zk.ui.sys.ConfigParser;
import org.zkoss.zk.ui.sys.DesktopCtrl;
import org.zkoss.zk.ui.sys.ExecutionsCtrl;
import org.zkoss.zk.ui.sys.Registry;
import org.zkoss.zk.ui.sys.RequestInfo;
import org.zkoss.zk.ui.sys.SessionsCtrl;
import org.zkoss.zk.ui.sys.UiFactory;
import org.zkoss.zk.ui.sys.WebAppCtrl;
import org.zkoss.zk.ui.sys.WebAppFactory;
import org.zkoss.zk.ui.sys.WebAppFactoryImpl;
import org.zkoss.zk.ui.sys.WebAppsCtrl;
import org.zkoss.zk.ui.util.Configuration;

Expand Down Expand Up @@ -284,8 +282,6 @@ public WebManager(ServletContext ctx, String updateURI, String resourceURI) {
}
}
}

Registry.sign(_wapp, Registry.class, WebManager.class, WebAppFactoryImpl.class);
}

private void checkAndAddExtendlet(String ext, Extendlet extlet) {
Expand Down
Loading

0 comments on commit 989bb21

Please sign in to comment.