1 Star 0 Fork 3.7K

mlnt/O2OA

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
build.xml 14.08 KB
一键复制 编辑 原始数据 按行查看 历史
tangxl 提交于 2020-04-24 11:13 . 修改打包产生是version.o2的路径
<?xml version="1.0" encoding="UTF-8"?>
<project basedir="." name="main" default="default">
<property name="VERSION" value="4.3.6" />
<property name="preName" value="o2server"/>
<property name="targetdir" value="target"/>
<target name="default" depends="md5code" />
<target name="md5code" depends="default_zip">
<checksum file="${preName}-${VERSION}-windows.zip" property="build_win.sha" algorithm="SHA-256" />
<length file="${preName}-${VERSION}-windows.zip" property="length_win"/>
<script language="javascript">
<![CDATA[
var length_win_bytes = project.getProperty("length_win");
var length_win_kbytes = Math.round((length_win_bytes / 1024) * Math.pow(10,2))/ Math.pow(10,2);
var length_win_mbytes = Math.round((length_win_kbytes / 1024) * Math.pow(10,2))/ Math.pow(10,2);
project.setNewProperty("length_win_mb", length_win_mbytes);
]]>
</script>
<checksum file="${preName}-${VERSION}-linux.zip" property="build_linux.sha" algorithm="SHA-256" />
<length file="${preName}-${VERSION}-linux.zip" property="length_linux"/>
<script language="javascript">
<![CDATA[
var length_linux_bytes = project.getProperty("length_linux");
var length_linux_kbytes = Math.round((length_linux_bytes / 1024) * Math.pow(10,2))/ Math.pow(10,2);
var length_linux_mbytes = Math.round((length_linux_kbytes / 1024) * Math.pow(10,2))/ Math.pow(10,2);
project.setNewProperty("length_linux_mb", length_linux_mbytes);
]]>
</script>
<checksum file="${preName}-${VERSION}-macos.zip" property="build_macos.sha" algorithm="SHA-256" />
<length file="${preName}-${VERSION}-macos.zip" property="length_macos"/>
<script language="javascript">
<![CDATA[
var length_macos_bytes = project.getProperty("length_macos");
var length_macos_kbytes = Math.round((length_macos_bytes / 1024) * Math.pow(10,2))/ Math.pow(10,2);
var length_macos_mbytes = Math.round((length_macos_kbytes / 1024) * Math.pow(10,2))/ Math.pow(10,2);
project.setNewProperty("length_macos_mb", length_macos_mbytes);
]]>
</script>
<checksum file="${preName}-${VERSION}-aix.zip" property="build_aix.sha" algorithm="SHA-256" />
<length file="${preName}-${VERSION}-aix.zip" property="length_aix"/>
<script language="javascript">
<![CDATA[
var length_aix_bytes = project.getProperty("length_aix");
var length_aix_kbytes = Math.round((length_aix_bytes / 1024) * Math.pow(10,2))/ Math.pow(10,2);
var length_aix_mbytes = Math.round((length_aix_kbytes / 1024) * Math.pow(10,2))/ Math.pow(10,2);
project.setNewProperty("length_aix_mb", length_aix_mbytes);
]]>
</script>
<checksum file="${preName}-${VERSION}-raspberrypi.zip" property="build_raspberrypi.sha" algorithm="SHA-256" />
<length file="${preName}-${VERSION}-raspberrypi.zip" property="length_raspberrypi"/>
<script language="javascript">
<![CDATA[
var length_raspberrypi_bytes = project.getProperty("length_raspberrypi");
var length_raspberrypi_kbytes = Math.round((length_raspberrypi_bytes / 1024) * Math.pow(10,2))/ Math.pow(10,2);
var length_raspberrypi_mbytes = Math.round((length_raspberrypi_kbytes / 1024) * Math.pow(10,2))/ Math.pow(10,2);
project.setNewProperty("length_raspberrypi_mb", length_raspberrypi_mbytes);
]]>
</script>
<checksum file="${preName}-${VERSION}-risc.zip" property="build_risc.sha" algorithm="SHA-256" />
<length file="${preName}-${VERSION}-risc.zip" property="length_risc"/>
<script language="javascript">
<![CDATA[
var length_risc_bytes = project.getProperty("length_risc");
var length_risc_kbytes = Math.round((length_risc_bytes / 1024) * Math.pow(10,2))/ Math.pow(10,2);
var length_risc_mbytes = Math.round((length_risc_kbytes / 1024) * Math.pow(10,2))/ Math.pow(10,2);
project.setNewProperty("length_risc_mb", length_risc_mbytes);
]]>
</script>
<checksum file="${preName}-${VERSION}-arm.zip" property="build_arm.sha" algorithm="SHA-256" />
<length file="${preName}-${VERSION}-arm.zip" property="length_arm"/>
<script language="javascript">
<![CDATA[
var length_arm_bytes = project.getProperty("length_arm");
var length_arm_kbytes = Math.round((length_arm_bytes / 1024) * Math.pow(10,2))/ Math.pow(10,2);
var length_arm_mbytes = Math.round((length_arm_kbytes / 1024) * Math.pow(10,2))/ Math.pow(10,2);
project.setNewProperty("length_arm_mb", length_arm_mbytes);
]]>
</script>
<tstamp>
<format property="TODAY" pattern="yyyy-MM-dd HH:mm:ss"/>
</tstamp>
<echo file="download_preview.jsonp">callback(
{
"windows": {
"system": "windows",
"name": "o2server-windows-${VERSION}",
"fileName": "o2server-${VERSION}-windows.zip",
"fileSize": "${length_win_mb}MB",
"updateTime": "${TODAY}",
"url": "/download/o2server-${VERSION}-windows.zip",
"sha256": "${build_win.sha}"
},
"linux": {
"system": "linux",
"name": "o2server-linux-${VERSION}",
"fileName": "o2server-${VERSION}-linux.zip",
"fileSize": "${length_linux_mb}MB",
"updateTime": "${TODAY}",
"url": "/download/o2server-${VERSION}-linux.zip",
"sha256": "${build_linux.sha}"
},
"macos": {
"system": "macos",
"name": "o2server-macos-${VERSION}",
"fileName": "o2server-${VERSION}-macos.zip",
"fileSize": "${length_macos_mb}MB",
"updateTime": "${TODAY}",
"url": "/download/o2server-${VERSION}-macos.zip",
"sha256": "${build_macos.sha}"
},
"aix": {
"system": "aix",
"name": "o2server-aix-${VERSION}",
"fileName": "o2server-${VERSION}-aix.zip",
"fileSize": "${length_aix_mb}MB",
"updateTime": "${TODAY}",
"url": "/download/o2server-${VERSION}-aix.zip",
"sha256": "${build_aix.sha}"
},
"raspberrypi": {
"system": "raspberrypi",
"name": "o2server-${VERSION}-raspberrypi.zip",
"fileName": "o2server-${VERSION}-raspberrypi.zip",
"fileSize": "${length_raspberrypi_mb}MB",
"updateTime": "${TODAY}",
"url": "/download/o2server-${VERSION}-raspberrypi.zip",
"sha256": "${build_raspberrypi.sha}"
},
"risc": {
"system": "risc",
"name": "o2server-${VERSION}-risc",
"fileName": "o2server-${VERSION}-risc.zip",
"fileSize": "${length_risc_mb}MB",
"updateTime": "${TODAY}",
"url": "/download/o2server-${VERSION}-risc.zip",
"sha256": "${build_risc.sha}"
},
"arm": {
"system": "arm",
"name": "o2server-${VERSION}-arm",
"fileName": "o2server-${VERSION}-arm.zip",
"fileSize": "${length_arm_mb}MB",
"updateTime": "${TODAY}",
"url": "/download/o2server-${VERSION}-arm.zip",
"sha256": "${build_arm.sha}"
},
"jvm_windows": {}
}
)</echo>
<echo file="download-pro.json">{
"title": "O2OA V${VERSION}",
"publishTime": "${TODAY}",
"windows": {
"system": "windows",
"name": "o2server-windows-${VERSION}",
"fileName": "o2server-${VERSION}-windows.zip",
"fileSize": "${length_win_mb}MB",
"updateTime": "${TODAY}",
"url": "/download/o2server-${VERSION}-windows.zip",
"sha256": "${build_win.sha}"
},
"linux": {
"system": "linux",
"name": "o2server-linux-${VERSION}",
"fileName": "o2server-${VERSION}-linux.zip",
"fileSize": "${length_linux_mb}MB",
"updateTime": "${TODAY}",
"url": "/download/o2server-${VERSION}-linux.zip",
"sha256": "${build_linux.sha}"
},
"macos": {
"system": "macos",
"name": "o2server-macos-${VERSION}",
"fileName": "o2server-${VERSION}-macos.zip",
"fileSize": "${length_macos_mb}MB",
"updateTime": "${TODAY}",
"url": "/download/o2server-${VERSION}-macos.zip",
"sha256": "${build_macos.sha}"
},
"aix": {
"system": "aix",
"name": "o2server-aix-${VERSION}",
"fileName": "o2server-${VERSION}-aix.zip",
"fileSize": "${length_aix_mb}MB",
"updateTime": "${TODAY}",
"url": "/download/o2server-${VERSION}-aix.zip",
"sha256": "${build_aix.sha}"
},
"raspberrypi": {
"system": "raspberrypi",
"name": "o2server-${VERSION}-raspberrypi.zip",
"fileName": "o2server-${VERSION}-raspberrypi.zip",
"fileSize": "${length_raspberrypi_mb}MB",
"updateTime": "${TODAY}",
"url": "/download/o2server-${VERSION}-raspberrypi.zip",
"sha256": "${build_raspberrypi.sha}"
},
"risc": {
"system": "risc",
"name": "o2server-${VERSION}-risc",
"fileName": "o2server-${VERSION}-risc.zip",
"fileSize": "${length_risc_mb}MB",
"updateTime": "${TODAY}",
"url": "/download/o2server-${VERSION}-risc.zip",
"sha256": "${build_risc.sha}"
},
"arm": {
"system": "arm",
"name": "o2server-${VERSION}-arm",
"fileName": "o2server-${VERSION}-arm.zip",
"fileSize": "${length_arm_mb}MB",
"updateTime": "${TODAY}",
"url": "/download/o2server-${VERSION}-arm.zip",
"sha256": "${build_arm.sha}"
},
"source":{
"name":"o2oa-master",
"updateTime":"${TODAY}",
"fileSize":"990MB",
"url":"https://github.com/o2oa/o2oa"
}
}</echo>
</target>
<target name="default_zip" depends="version_o2,zip_windows,zip_linux,zip_macos,zip_aix,zip_raspberrypi,zip_risc,zip_arm" />
<target name="version_o2">
<tstamp>
<format property="TODAY" pattern="yyyy-MM-dd HH:mm:ss"/>
</tstamp>
<echo file="${targetdir}/o2server/version.o2">{"version":"${VERSION}","date":"${TODAY}"}</echo>
</target>
<target name="zip_windows">
<zip encoding="utf-8" destfile="${preName}-${VERSION}-windows.zip" update="false">
<zipfileset dir="${targetdir}/o2server" filemode="777" dirmode="777" encoding="utf-8" prefix="o2server">
<include name="commons/"/>
<include name="configSample/"/>
<include name="localSample/"/>
<include name="servers/"/>
<include name="store/"/>
<include name="console.jar"/>
<include name="index.html"/>
<include name="version.o2"/>
<include name="console.jar"/>
<include name="jvm/windows/"/>
<include name="service_windows.bat"/>
<include name="start_windows.bat"/>
<include name="start_windows_debug.bat"/>
<include name="console_windows.bat"/>
<include name="stop_windows.bat"/>
</zipfileset>
</zip>
</target>
<target name="zip_linux">
<zip encoding="utf-8" destfile="${preName}-${VERSION}-linux.zip" update="false">
<zipfileset dir="${targetdir}/o2server" filemode="777" dirmode="777" encoding="utf-8" prefix="o2server">
<include name="commons/"/>
<include name="configSample/"/>
<include name="localSample/"/>
<include name="servers/"/>
<include name="store/"/>
<include name="console.jar"/>
<include name="index.html"/>
<include name="version.o2"/>
<include name="console.jar"/>
<include name="jvm/linux/"/>
<include name="start_linux.sh"/>
<include name="start_linux_debug.sh"/>
<include name="console_linux.sh"/>
<include name="stop_linux.sh"/>
</zipfileset>
</zip>
</target>
<target name="zip_macos">
<zip encoding="utf-8" destfile="${preName}-${VERSION}-macos.zip" update="false">
<zipfileset dir="${targetdir}/o2server" filemode="777" dirmode="777" encoding="utf-8" prefix="o2server">
<include name="commons/"/>
<include name="configSample/"/>
<include name="localSample/"/>
<include name="servers/"/>
<include name="store/"/>
<include name="console.jar"/>
<include name="index.html"/>
<include name="version.o2"/>
<include name="console.jar"/>
<include name="jvm/macos/"/>
<include name="start_macos.sh"/>
<include name="start_macos_debug.sh"/>
<include name="console_macos.sh"/>
<include name="stop_macos.sh"/>
</zipfileset>
</zip>
</target>
<target name="zip_aix">
<zip encoding="utf-8" destfile="${preName}-${VERSION}-aix.zip" update="false">
<zipfileset dir="${targetdir}/o2server" filemode="777" dirmode="777" encoding="utf-8" prefix="o2server">
<include name="commons/"/>
<include name="configSample/"/>
<include name="localSample/"/>
<include name="servers/"/>
<include name="store/"/>
<include name="console.jar"/>
<include name="index.html"/>
<include name="version.o2"/>
<include name="console.jar"/>
<include name="jvm/aix/"/>
<include name="start_aix.sh"/>
<include name="start_aix_debug.sh"/>
<include name="console_aix.sh"/>
<include name="stop_aix.sh"/>
</zipfileset>
</zip>
</target>
<target name="zip_raspberrypi">
<zip encoding="utf-8" destfile="${preName}-${VERSION}-raspberrypi.zip" update="false">
<zipfileset dir="${targetdir}/o2server" filemode="777" dirmode="777" encoding="utf-8" prefix="o2server">
<include name="commons/"/>
<include name="configSample/"/>
<include name="localSample/"/>
<include name="servers/"/>
<include name="store/"/>
<include name="console.jar"/>
<include name="index.html"/>
<include name="version.o2"/>
<include name="console.jar"/>
<include name="jvm/raspberrypi/"/>
<include name="start_raspberrypi.sh"/>
<include name="start_raspberrypi_debug.sh"/>
<include name="console_raspberrypi.sh"/>
<include name="stop_raspberrypi.sh"/>
</zipfileset>
</zip>
</target>
<target name="zip_risc">
<zip encoding="utf-8" destfile="${preName}-${VERSION}-risc.zip" update="false">
<zipfileset dir="${targetdir}/o2server" filemode="777" dirmode="777" encoding="utf-8" prefix="o2server">
<include name="commons/"/>
<include name="configSample/"/>
<include name="localSample/"/>
<include name="servers/"/>
<include name="store/"/>
<include name="console.jar"/>
<include name="index.html"/>
<include name="version.o2"/>
<include name="console.jar"/>
<include name="jvm/risc/"/>
<include name="start_risc.sh"/>
<include name="start_risc_debug.sh"/>
<include name="console_risc.sh"/>
<include name="stop_risc.sh"/>
</zipfileset>
</zip>
</target>
<target name="zip_arm">
<zip encoding="utf-8" destfile="${preName}-${VERSION}-arm.zip" update="false">
<zipfileset dir="${targetdir}/o2server" filemode="777" dirmode="777" encoding="utf-8" prefix="o2server">
<include name="commons/"/>
<include name="configSample/"/>
<include name="localSample/"/>
<include name="servers/"/>
<include name="store/"/>
<include name="console.jar"/>
<include name="index.html"/>
<include name="version.o2"/>
<include name="console.jar"/>
<include name="jvm/arm/"/>
<include name="start_arm.sh"/>
<include name="start_arm_debug.sh"/>
<include name="console_arm.sh"/>
<include name="stop_arm.sh"/>
</zipfileset>
</zip>
</target>
</project>
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/mlnt/O2OA.git
git@gitee.com:mlnt/O2OA.git
mlnt
O2OA
O2OA
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385