compiling noob error

Forum for alternative clients, mods & discussions on the same.

compiling noob error

Postby iamahh » Fri Jan 06, 2017 2:50 pm

trying to compile the oficial client on NetBeans, got the same error running in the IDE and in command line using -U arguments

Code: Select all
Caused by: haven.Resource$LoadException: Load error in resource gfx/loginscr(v-1), from local res source
        at haven.Resource$Pool.handle(Resource.java:391)
        at haven.Resource$Pool.access$1100(Resource.java:280)
        at haven.Resource$Pool$Loader.run(Resource.java:527)
        at java.lang.Thread.run(Unknown Source)
Caused by: java.io.FileNotFoundException: Could not find resource locally: gfx/loginscr
        at haven.Resource$JarSource.get(Resource.java:187)
        at haven.Resource$Pool.handle(Resource.java:375)
        ... 3 more


noticed the Hafen.jar is only 3MB or something
iamahh
 
Posts: 1810
Joined: Sat Dec 12, 2015 8:23 pm

Re: compiling noob error

Postby Paradoxs » Fri Jan 06, 2017 4:39 pm

Whats your ant build look like? Have you changed any code? Are you trying to compile with the ant file or are you trying to do a standard compile (you'll want to make sure your running the ant file)?
User avatar
Paradoxs
 
Posts: 294
Joined: Tue Aug 25, 2015 7:16 am

Re: compiling noob error

Postby shubla » Fri Jan 06, 2017 4:41 pm

iamahh wrote:noticed the Hafen.jar is only 3MB or something

And it should be.
Image
I'm not sure that I have a strong argument against sketch colors - Jorb, November 2019
http://i.imgur.com/CRrirds.png?1
Join the moderated unofficial discord for the game! https://discord.gg/2TAbGj2
Purus Pasta, The Best Client
User avatar
shubla
 
Posts: 13043
Joined: Sun Nov 03, 2013 11:26 am
Location: Finland

Re: compiling noob error

Postby iamahh » Fri Jan 06, 2017 6:29 pm

Didnt mess with ant nor changed the code

Which ant changes are needed? Is there a template?

Ty
iamahh
 
Posts: 1810
Joined: Sat Dec 12, 2015 8:23 pm

Re: compiling noob error

Postby Paradoxs » Fri Jan 06, 2017 7:08 pm

Code: Select all
<?xml version="1.0" ?>

<project name="hafen" default="Build">
  <property name="name" value="Hafen"/>
  <property name="version" value="0.0"/>

  <target name="build-env">
    <mkdir dir="build" />
    <mkdir dir="build/classes" />
    <available property="has-res-jar" file="build/hafen-res.jar" />
    <available property="has-buildinfo" file="build/classes/buildinfo" />
    <available property="unpacked-lib" file="build/classes-lib" />
  </target>
 
  <target name="buildinfo" depends="build-env" unless="has-buildinfo">
    <echo file="build/classes/buildinfo" xml:space="default">${version}</echo>
  </target>

  <target name="hafen-client" depends="build-env">
    <javac srcdir="src" destdir="build/classes" debug="off"
      source="1.8" target="1.8" includeantruntime="no" encoding="UTF-8">
      <classpath>
   <pathelement path="lib/jogl.jar" />
   <pathelement path="lib/gluegen-rt.jar" />
   <pathelement path="lib/jglob.jar" />
        <pathelement path="lib/junit.jar" />
      </classpath>
      <compilerarg value="-Xlint:unchecked" />
      <compilerarg value="-Xlint:-options" />
    </javac>
    <copy todir="build/classes">
      <fileset dir="src" excludes="**/*.java" />
    </copy>
    <copy todir="build/classes/haven" file="etc/ressrv.crt" />
    <copy todir="build/classes/haven" file="etc/authsrv.crt" />
    <copy todir="build/classes/haven" file="etc/res-preload" />
    <copy todir="build/classes/haven" file="etc/res-bgload" />
    <copy todir="build/classes/haven" file="etc/icon.png" />
     <copy todir="build" file="etc/run.bat" />
  </target>

  <target name="lib-classes" depends="build-env" unless="unpacked-lib">
    <mkdir dir="build/classes-lib" />
    <unjar src="lib/jglob.jar" dest="build/classes-lib">
      <patternset excludes="META-INF/**" />
    </unjar>
  </target>

  <target name="jar" depends="hafen-client,buildinfo,lib-classes">
    <jar destfile="build/hafen.jar">
      <fileset dir="build/classes" />
      <fileset dir="build/classes-lib" />
      <manifest>
   <attribute name="Main-Class" value="haven.MainFrame" />
   <attribute name="Class-Path" value="lib/jogl.jar lib/gluegen-rt.jar lib/builtin-res.jar lib/hafen-res.jar" />
      </manifest>
    </jar>
    <chmod file="build/hafen.jar" perm="a+x" />
  </target>
 
  <target name="res-jar" depends="build-env" unless="has-res-jar">
    <get src="http://game.havenandhearth.com/java/builtin-res.jar" dest="lib/builtin-res.jar"
    usetimestamp="true" />
    <get src="http://game.havenandhearth.com/java/hafen-res.jar" dest="lib/hafen-res.jar"
    usetimestamp="true" />
  </target>
 
  <target name="jars" depends="build-env, jar, res-jar, l10n-jar">
    <copy todir="build/lib">
      <fileset dir="lib">
   <include name="jogl.jar" />
   <include name="gluegen-rt.jar" />
   <include name="hafen-res.jar" />
   <include name="builtin-res.jar" />
      </fileset>
      <fileset dir="lib/jogl-natives" includes="*.jar">
      </fileset>
    </copy>
  </target>



  <target name="Build" depends="jars" />

 
  <target name="clean">
    <delete dir="build" />
  </target>
   
     <target name="Release" depends="Build">
       <delete dir="build/classes" />
        <delete dir="build/classes-lib" />
     </target>



</project>


Assuming your building with ant, and its just not working

try this. It should grab any file you dont have.

note, thats just an ant file for the default client
User avatar
Paradoxs
 
Posts: 294
Joined: Tue Aug 25, 2015 7:16 am

Re: compiling noob error

Postby iamahh » Fri Jan 06, 2017 8:06 pm

thanks, i saved that for comparison, my Netbeans is using a crazy long xml, java nightmare fuel, i'll try to tackle later
iamahh
 
Posts: 1810
Joined: Sat Dec 12, 2015 8:23 pm


Return to The Wizards' Tower

Who is online

Users browsing this forum: No registered users and 79 guests