milk7502 發表於 2024-4-23 12:10

請教build.xmlh怎麼設定

build.xml 建制後 修改核心無法壓入 有人可以教一下怎麼改build.xml裡面的東西嗎

yasioukon 發表於 2024-4-23 12:20

記事本 就可以改內容了

milk7502 發表於 2024-4-23 19:08

yasioukon 發表於 2024-4-23 12:20
記事本 就可以改內容了

我的意思是我不會改內容 我修改過但都沒辦法把我修改過的源碼壓進核心

yasioukon 發表於 2024-4-24 09:12

那要看你壓的時候

底下說什麼錯誤

milk7502 發表於 2024-4-24 10:37

yasioukon 發表於 2024-4-24 09:12
那要看你壓的時候

底下說什麼錯誤

比如說多加了GM的指令 玩家等級 我在本身下載後就有build.xmlh的模擬器裡可以正常壓入 上線後有新增到指令



在本身沒有build.xmlh的模擬器 我新建一個build.xmlh他沒有錯誤 但上線後指令沒有新增成功

yasioukon 發表於 2024-4-24 12:25

你可以嘗試修改單檔的方式

單一 JAVA 轉 CLASS

再把 CLASS 丟回 JAR內

不然就是拿別版BUILD更改內容來使用

17986649 發表於 2024-4-25 20:43

其實根本不用設定那個本身核心都架構好的主要是你要有裝ant

17986649 發表於 2024-4-25 20:44

我本身自己就壓過很多次不過我主要還是用eclipse架服也方便改核心

milk7502 發表於 2024-4-26 22:59

17986649 發表於 2024-4-25 20:43
其實根本不用設定那個本身核心都架構好的主要是你要有裝ant

:Q其實我有看沒有懂 我剛在學核心 都是在網路找人寫好的套用
ant是什麼QQ 我是用eclipse沒錯

milk7502 發表於 2024-4-26 23:04

yasioukon 發表於 2024-4-24 12:25
你可以嘗試修改單檔的方式

單一 JAVA 轉 CLASS


我看不懂 不知大大可否幫我把這個build.xml要改的地方標示成紅色QQ

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- WARNING: Eclipse auto-generated file.
            Any modifications will be overwritten.
            To include a user specific buildfile here, simply create one in the same
            directory with the processing instruction <?eclipse.ant.import?>
            as the first entry and export the buildfile again. --><project basedir="." default="build" name="381多系統簡易內掛含src">
    <property environment="env"/>
    <property name="ECLIPSE_HOME" value="../../../Downloads/eclipse48064bit_itmop.com/eclipse/"/>
    <property name="debuglevel" value="source,lines,vars"/>
    <property name="target" value="1.8"/>
    <property name="source" value="1.8"/>
    <path id="381多系統簡易內掛含src.classpath">
      <pathelement location="bin"/>
      <pathelement location="jar/c3p0-0.9.1.2.jar"/>
      <pathelement location="jar/commons-logging-1.1.1.jar"/>
      <pathelement location="jar/javolution-5.5.1.jar"/>
      <pathelement location="jar/log4j-1.2.16.jar"/>
      <pathelement location="jar/mysql-connector-java-5.1.20-bin.jar"/>
    </path>
    <target name="init">
      <mkdir dir="bin"/>
      <copy includeemptydirs="false" todir="bin">
            <fileset dir="src">
                <exclude name="**/*.java"/>
            </fileset>
      </copy>
    </target>
    <target name="clean">
      <delete dir="bin"/>
    </target>
    <target depends="clean" name="cleanall"/>
    <target depends="build-subprojects,build-project" name="build"/>
    <target name="build-subprojects"/>
    <target depends="init" name="build-project">
      <echo message="${ant.project.name}: ${ant.file}"/>
      <javac debug="true" debuglevel="${debuglevel}" destdir="bin" includeantruntime="false" source="${source}" target="${target}">
            <src path="src"/>
            <classpath refid="381多系統簡易內掛含src.classpath"/>
      </javac>
    </target>
    <target description="Build all projects which reference this project. Useful to propagate changes." name="build-refprojects"/>
    <target description="copy Eclipse compiler jars to ant lib directory" name="init-eclipse-compiler">
      <copy todir="${ant.library.dir}">
            <fileset dir="${ECLIPSE_HOME}/plugins" includes="org.eclipse.jdt.core_*.jar"/>
      </copy>
      <unzip dest="${ant.library.dir}">
            <patternset includes="jdtCompilerAdapter.jar"/>
            <fileset dir="${ECLIPSE_HOME}/plugins" includes="org.eclipse.jdt.core_*.jar"/>
      </unzip>
    </target>
    <target description="compile project with Eclipse compiler" name="build-eclipse-compiler">
      <property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter"/>
      <antcall target="build"/>
    </target>
</project>

17986649 發表於 2024-4-27 09:17

milk7502 發表於 2024-4-26 22:59
其實我有看沒有懂 我剛在學核心 都是在網路找人寫好的套用
ant是什麼QQ 我是用eclipse沒錯



ant你爬文就知道也是跟JAVA一樣一種開源的開發軟件有爬文都會知道也跟python的道理一樣那你用eclipse封裝成jar也可以不一定要侷限於用build因為那個就是要用到ant建置給你看圖你就知道這就是要把ant設環境變數。現在大概3.81好架高版本的大部分會缺失一部份或者關鍵的opcode碼不對。

17986649 發表於 2024-4-27 09:22

milk7502 發表於 2024-4-26 22:59
其實我有看沒有懂 我剛在學核心 都是在網路找人寫好的套用
ant是什麼QQ 我是用eclipse沒錯



阿沒事最近看太多文章我也腦袋有點亂了現在細看才發現你的東西跟我看的東西不同至於你說指令為什麼沒新增我去看看原因

17986649 發表於 2024-4-27 09:27

建議你用跟核心同樣的架構去新增指令不然你要加入新的架構你需要知道他的核心是在哪邊調用指令簡單的方法應該是跟上面那位說的增加新的java檔是最快速

17986649 發表於 2024-4-27 09:34

我這個就是沒build.xmlh他是在這讀sql上的權限在調用其他java檔寫的指令功能我目前沒看到build的感覺好像是更早期出來的核心架構?10年前好像有碰過沒太大印象了

milk7502 發表於 2024-4-28 23:23

17986649 發表於 2024-4-27 09:17
ant你爬文就知道也是跟JAVA一樣一種開源的開發軟件有爬文都會知道也跟python的道理一樣那你用eclipse封裝 ...

好的謝謝 我去找找看 感謝你我在試試看

Lin-JN 發表於 2024-5-2 03:27

没有必要去学ant,使用ec或idea都可以直接将项目打包成jar,建议去学习一下这方面的内容更适合,推荐idea的一键打包功能,更推荐使用Maven项目功能。
頁: [1]
查看完整版本: 請教build.xmlh怎麼設定