Сообщений: 127
Тем: 33
Зарегистрирован: Apr 2011
После того как перенес все скрипты из папки Scripts в ядро при загрузке сервера непонятная ошибка :_smile_:
Раскажите что тут
Сообщений: 1,326
Тем: 10
Зарегистрирован: Apr 2010
Репутация:
2,078
Вы же переносили, вот вы и расскажете, нафига вы вызываете ant-овскую либу?
Сообщений: 127
Тем: 33
Зарегистрирован: Apr 2011
Azagthtot Написал:Вы же переносили, вот вы и расскажете, нафига вы вызываете ant-овскую либу?
не понял
Сообщений: 1,759
Тем: 13
Зарегистрирован: May 2011
Репутация:
3,205
а откуда серверу знать, что вы засунули java файлы в jar библиотеку?
допишите код, чтобы они во время загрузки сервера вконце подгружались, делов то...
Сообщений: 127
Тем: 33
Зарегистрирован: Apr 2011
linliss Написал:а откуда серверу знать, что вы засунули java файлы в jar библиотеку?
допишите код, чтобы они во время загрузки сервера вконце подгружались, делов то...
я перенес половину скриптов и все норм работало, потом перенес остольные каторые остались и теперь эта фишка.
Сообщений: 127
Тем: 33
Зарегистрирован: Apr 2011
Azagthtot Написал:Вы не понимаете что делаете? Может тогда лучше не делать, а то вдруг что случится?
У вас вызывается javac task из ant.jar.
Как и почему - это вам виднее должно быть.
Как вызывается если все норм было ничего лишнего не дописывал и тд просто перенес оставшиеся ява файлы в ядро.
Вот Build сервера
сервер
<?xml version="1.0" encoding="UTF-8"?>
<project name="L2_Open" default="dist" basedir=".">
<description> Boston, MA
02111-1307, USA.
</description>
<property name="src" location="java"/>
<property name="lib" location="lib"/>
<property name="build" location="build"/>
<property name="build.classes" location="${build}/classes"/>
<property name="build.scripts" location="${build}/scripts"/>
<property name="build.dist" location="${build}/dist"/>
<property name="build.dist.login" location="${build.dist}/login"/>
<property name="build.dist.game" location="${build.dist}/gameserver"/>
<path id="classpath">
<fileset dir="${lib}">
<include name="*.jar"/>
</fileset>
</path>
<target name="clean"
description="Remove the output directories">
<delete dir="${build.dist}"/>
</target>
<target name="cleanclasses"
description="Remove the classes directories">
<delete dir="${build.classes}"/>
</target>
<target name="clean_scripts"
description="Remove the scripts output directories">
<delete dir="${build.scripts}"/>
<delete file="${build}/scripts.jar"/>
<delete file="${build.dist.game}/scripts.jar"/>
</target>
<target name="cc"
description="Remove the classes directories">
<delete dir="${build}/classes"/>
</target>
<target name="init"
description="Create the output directories.">
<!--<mkdir dir="${build}"/>-->
<mkdir dir="${build.classes}"/>
<mkdir dir="${build.dist}" />
<mkdir dir="${build.dist.login}" />
<mkdir dir="${build.dist.game}" />
</target>
<target name="compile"
depends="init"
description="Compile the source.">
<javac destdir="${build.classes}"
optimize="on"
debug="on"
source="1.6"
target="1.6"
encoding="UTF-8"
includeantruntime="false"
nowarn="off">
<compilerarg value="-Xlint:all"></compilerarg>
<src path="${src}"/>
<classpath refid="classpath"/>
</javac>
</target>
<target name="compile_scripts"
depends="jar"
description="Compile the source.">
<copy todir="${lib}">
<fileset dir="${build}">
<include name="l2server.jar"/>
</fileset>
</copy>
<mkdir dir="${build.scripts}"/>
<javac destdir="${build.scripts}"
optimize="on"
debug="on"
source="1.6"
target="1.6"
encoding="UTF-8"
includeantruntime="false"
nowarn="off">
<compilerarg value="-Xlint:all"></compilerarg>
<src path="data"/>
<classpath refid="classpath"/>
</javac>
<delete file="${lib}/l2server.jar"/>
</target>
<target name="compile_scripts_u"
depends="jar_update"
description="Compile the source.">
<copy todir="${lib}">
<fileset dir="${build}">
<include name="l2server.jar"/>
</fileset>
</copy>
<mkdir dir="${build.scripts}"/>
<javac destdir="${build.scripts}"
optimize="on"
debug="on"
source="1.6"
target="1.6"
encoding="UTF-8"
includeantruntime="false"
nowarn="off">
<compilerarg value="-Xlint:all"></compilerarg>
<src path="data"/>
<classpath refid="classpath"/>
</javac>
<delete file="${lib}/l2server.jar"/>
</target>
<target name="debug"
depends="init"
description="Compile the source with debug info.">
<javac destdir="${build.classes}"
optimize="off"
debug="on"
source="1.6"
target="1.6"
encoding="UTF-8"
includeantruntime="false"
nowarn="off">
<compilerarg value="-Xlint:all"></compilerarg>
<src path="${src}"/>
<classpath refid="classpath"/>
</javac>
</target>
<target name="jar"
depends="clean,compile"
description="Create the jar file">
<exec dir="." executable="./subversion/svnversion" outputproperty="l2open.revision"
failifexecutionfails="false">
<arg line="-n ."/>
</exec>
<tstamp>
<format property="build.tstamp"
pattern="yyyy.MM.dd HH:mm"/>
</tstamp>
<concat destfile="${build.dist.game}/config/l2open-version.properties">
version=${l2open.revision}
builddate=${build.tstamp}
</concat>
<concat destfile="${build}/classes/l2open/l2open-version.properties">
version=${l2open.revision}
builddate=${build.tstamp}
user=${user.name} ${user.dir} ${user.timezone}
os=${os.name} ${os.version} ${os.arch}
java=${java.version} ${java.vendor}
vm=${java.vm.name} ${java.vm.version}
</concat>
<jar destfile="${build}/l2server.jar" level="9">
<fileset dir="${build.classes}"/>
<manifest>
<attribute name="Main-Class" value="l2open.Server"/>
<attribute name="Class-Path" value=". "/>
</manifest>
</jar>
<copy todir="${build.dist.login}" preservelastmodified="true">
<fileset dir="${build}">
<include name="l2server.jar"/>
</fileset>
</copy>
<copy todir="${build.dist.game}" preservelastmodified="true">
<fileset dir="${build}">
<include name="l2server.jar"/>
</fileset>
</copy>
</target>
<target name="jar_update"
depends="cleanclasses, compile"
description="Create the jar file">
<exec dir="." executable="./subversion/svnversion" outputproperty="l2open.revision"
failifexecutionfails="false">
<arg line="-n ."/>
</exec>
<tstamp>
<format property="build.tstamp"
pattern="yyyy.MM.dd HH:mm"/>
</tstamp>
<concat destfile="${build.dist.game}/config/l2open-version.properties">
version=${l2open.revision}
builddate=${build.tstamp}
</concat>
<concat destfile="${build}/classes/l2open/l2open-version.properties">
version=${l2open.revision}
builddate=${build.tstamp}
user=${user.name} ${user.dir} ${user.timezone}
os=${os.name} ${os.version} ${os.arch}
java=${java.version} ${java.vendor}
vm=${java.vm.name} ${java.vm.version}
</concat>
<jar destfile="${build}/l2server.jar" level="9">
<fileset dir="${build.classes}"/>
<manifest>
<attribute name="Main-Class" value="l2open.Server"/>
<attribute name="Class-Path" value=". "/>
</manifest>
</jar>
<copy todir="${build.dist.login}" preservelastmodified="true">
<fileset dir="${build}">
<include name="l2server.jar"/>
</fileset>
</copy>
<copy todir="${build.dist.game}" preservelastmodified="true">
<fileset dir="${build}">
<include name="l2server.jar"/>
</fileset>
</copy>
</target>
<target name="jar_scripts"
depends="clean_scripts,compile_scripts"
description="Create the scripts jar file">
<jar destfile="${build}/scripts.jar" level="9">
<fileset dir="${build.scripts}"/>
<manifest>
<attribute name="Class-Path" value=". "/>
</manifest>
</jar>
<copy todir="${build.dist.game}" preservelastmodified="true">
<fileset dir="${build}">
<include name="scripts.jar"/>
</fileset>
</copy>
</target>
<target name="jarscripts_update"
depends="clean_scripts,compile_scripts_u"
description="Create the scripts jar file">
<jar destfile="${build}/scripts.jar" level="9">
<fileset dir="${build.scripts}"/>
<manifest>
<attribute name="Class-Path" value=". "/>
</manifest>
</jar>
<copy todir="${build.dist.game}" preservelastmodified="true">
<fileset dir="${build}">
<include name="scripts.jar"/>
</fileset>
</copy>
</target>
<target name="compile.gcj"
depends="jar"
description="Build machine executable binary">
<exec dir="." executable="gcj" failifexecutionfails="false" os="linux:Linux:freebsd:FreeBSD" >
<arg line="-O3 ${build.dist}/l2server.jar -o ${build.dist}/l2openserver --main=l2open.Server jbforth.jar"/>
</exec>
</target>
<target name="dist_common" depends="jar">
<copy todir="${build.dist.login}" preservelastmodified="true">
<fileset dir="${src}/../lib">
<include name="tools-login.jar"/>
</fileset>
</copy>
<copy todir="${build.dist.login}" preservelastmodified="true">
<fileset dir="${src}">
<include name="startAccountManager.*"/>
<include name="startSQLAccountManager.*"/>
<include name="LoginServer_loop.sh"/>
<include name="StartLoginServer.*"/>
<include name="RegisterGameServer.*"/>
</fileset>
</copy>
<copy todir="${build.dist.game}" preservelastmodified="true">
<fileset dir="${src}/../lib">
<include name="tools-game.jar"/>
</fileset>
</copy>
<copy todir="${build.dist.game}" preservelastmodified="true">
<fileset dir="${src}">
<include name="GameServer_loop.sh"/>
<include name="StartGameServer.*"/>
</fileset>
</copy>
<mkdir dir="${build.dist.game}/backup" />
<mkdir dir="${build.dist.login}/backup" />
<mkdir dir="${build.dist.game}/log" />
<mkdir dir="${build.dist.login}/log" />
<mkdir dir="${build.dist.game}/config" />
<mkdir dir="${build.dist.game}/config/defaults" />
<copy todir="${build.dist.game}/config" preservelastmodified="true">
<fileset dir="java/config">
<include name="l2open-version.properties"/>
</fileset>
</copy>
<copy todir="${build.dist.game}/config/defaults" preservelastmodified="true">
<fileset dir="java/config">
<include name="*.properties"/>
<include name="*.xml"/>
<include name="*.cfg"/>
<include name="*.txt"/>
<include name="fake_players.list" />
<exclude name="loginserver.properties" />
<exclude name="login_telnet.properties" />
<exclude name="l2open-version.properties" />
</fileset>
</copy>
<mkdir dir="${build.dist.game}/config/GMAccess.d"/>
<mkdir dir="${build.dist.game}/config/GMAccess.d/template"/>
<mkdir dir="${build.dist.game}/config/defaults/GMAccess.d"/>
<mkdir dir="${build.dist.game}/config/defaults/GMAccess.d/template"/>
<copy todir="${build.dist.game}/config/GMAccess.d/template" preservelastmodified="true">
<fileset dir="java/config/GMAccess.d/template">
<include name="*.xml"/>
</fileset>
</copy>
<copy todir="${build.dist.game}/config/defaults/GMAccess.d/template" preservelastmodified="true">
<fileset dir="java/config/GMAccess.d/template">
<include name="*.xml"/>
</fileset>
</copy>
<mkdir dir="${build.dist.login}/config" />
<mkdir dir="${build.dist.login}/config/defaults" />
<copy todir="${build.dist.login}/config/defaults" preservelastmodified="true">
<fileset dir="java/config">
<include name="loginserver.properties"/>
<include name="login_telnet.properties"/>
<include name="log.properties"/>
<include name="console.cfg"/>
</fileset>
</copy>
<copy todir="${build.dist.login}" preservelastmodified="true">
<fileset dir="data">
<include name="servername.xml"/>
</fileset>
</copy>
<mkdir dir="${build.dist.game}/data" />
<copy todir="${build.dist.game}/data" preservelastmodified="true">
<fileset dir="data">
<include name="**/*.*"/>
<exclude name="scripts/**/*.java"/>
</fileset>
</copy>
<fixcrlf srcdir="${build.dist.game}"
eol="lf"
eof="remove"
includes="**/*.sh">
</fixcrlf>
<fixcrlf srcdir="${build.dist.login}"
eol="lf"
eof="remove"
includes="**/*.sh">
</fixcrlf>
<fixcrlf srcdir="${build.dist.game}"
eol="crlf"
eof="remove"
includes="**/*.bat">
</fixcrlf>
<fixcrlf srcdir="${build.dist.login}"
eol="crlf"
eof="remove"
includes="**/*.bat">
</fixcrlf>
<mkdir dir="${build.dist}/sql"/>
<copy todir="${build.dist}/sql" preservelastmodified="true">
<fileset dir="sql">
<include name="**/*.*"/>
</fileset>
</copy>
<mkdir dir="${build.dist.game}/geodata"/>
<copy todir="${build.dist.game}/geodata/" preservelastmodified="true">
<fileset dir="geodata">
<include name="**/*.*"/>
</fileset>
</copy>
<mkdir dir="${build.dist.game}/webserver"/>
<copy todir="${build.dist.game}/webserver" preservelastmodified="true">
<fileset dir="webserver">
<include name="**/*.*"/>
</fileset>
</copy>
</target>
<target name="dist" depends="dist_common">
<copy todir="${build.dist.game}/data" preservelastmodified="true">
<fileset dir="data">
<include name="scripts/**/*.java"/>
<exclude name="scripts/actions/*.java"/>
<exclude name="scripts/bosses/*.java"/>
<exclude name="scripts/commands/**/*.java"/>
<exclude name="scripts/ai/*.java"/>
<exclude name="scripts/events/**/*.java"/>
<exclude name="scripts/items/*.java"/>
<exclude name="scripts/npc/model/*.java"/>
<exclude name="scripts/quests/**/*.java"/>
<exclude name="scripts/services/**/*.java"/>
<exclude name="scripts/Util.java"/>
<exclude name="scripts/Kamaloka.java"/>
<exclude name="scripts/ItemHandlers.java"/>
</fileset>
</copy>
<!--
Compress with 7-Zip:
<exec executable="C:/Program Files/7-Zip/7z.exe" failifexecutionfails="true" outputproperty="sevenzip_output">
<arg line="a -aoa -mx9 ${build}/l2server.7z ${build.dist}/*"/>
</exec>
Compress with WinRAR:
<exec executable="C:/Program Files/WinRAR/rar.exe" failifexecutionfails="true" outputproperty="rar_output">
<arg line="a -m5 -mt2 -s -ri1 -tl -r -ep1 ${build}/l2server.rar ${build.dist}/*"/>
</exec>
-->
<zip destfile="${build}/l2server.zip"
basedir="${build.dist}" />
</target>
<target name="with_jarscripts" depends="jar_scripts,dist_common">
<zip destfile="${build}/l2server.zip"
basedir="${build.dist}" />
</target>
</project>
scripts
<?xml version="1.0" encoding="UTF-8"?>
<project name="Скрипты" default="dist" basedir=".">
<description></description>
<property name="src" location="../java"/>
<property name="scr" location="../data"/>
<property name="lib" location="../lib"/>
<property name="build" location="../build/scripts"/>
<property name="build.classes" location="${build}/classes"/>
<property name="l2open" location="../build/scripts/classes/l2open"/>
<path id="classpath">
<fileset dir="${lib}">
<include name="*.jar"/>
</fileset>
</path>
<target name="dir">
<delete dir="${build}"/>
<delete dir="${build.classes}"/>
<mkdir dir="${build}"/>
<mkdir dir="${build.classes}"/>
</target>
<target name="compiles" depends="dir" description="Compile the source.">
<javac destdir="${build.classes}" optimize="on" debug="on" source="1.6" target="1.6" encoding="UTF-8"
nowarn="off">
<compilerarg value="-Xlint:all"></compilerarg>
<src path="${src}"/>
<classpath refid="classpath"/>
</javac>
</target>
<target name="compile" depends="dir" description="Compile the source.">
<javac destdir="${build.classes}" optimize="on" debug="on" source="1.5" target="1.5" encoding="UTF-8"
nowarn="off">
<compilerarg value="-Xlint:all"></compilerarg>
<src path="${scr}"/>
<classpath refid="classpath"/>
</javac>
</target>
<target name="dist" depends="compiles, compile" description="Create jar-file">
<exec dir="../subversion" executable="svnversion" outputproperty="l2open.revision" failifexecutionfails="false">
<arg line="-n ."/>
</exec>
<tstamp>
<format property="build.tstamp" pattern="yyyy.MM.dd HH:mm"/>
</tstamp>
<delete dir="${l2open}"/>
<delete dir="../build/scripts/classes/drin"/>
<jar destfile="${build}/scripts.jar">
<fileset dir="${build.classes}"/>
<manifest>
<attribute name="Class-Path"
value=". "/>
</manifest>
</jar>
<delete dir="${build.classes}"/>
</target>
</project>