|
|
|
|
Strumenti |
23-09-2005, 10:21 | #101 | |
Senior Member
Iscritto dal: Oct 2002
Città: California
Messaggi: 11781
|
Quote:
La classe Engine va separata in due e bisogna isolare le parti non testabili
__________________
"We in the game industry are lucky enough to be able to create our visions" |
|
23-09-2005, 12:53 | #102 | |||
Senior Member
Iscritto dal: Mar 2005
Città: /home/gica
Messaggi: 1653
|
Ho reinstallato tutto...
Lanciando il build, ottengo un fallimento su testDisplaySize, dovuto alla classe ILU (sempre del package devil ): Quote:
Quote:
Eppure, dal change log , tale matzon sembrava aver risolto: Quote:
Per avere solo quelli del package org.lwjgl.devil mi devo per forza scaricare anche tutto il resto? Spero di no... Piu' tardi ci provo e do' un'occhiata (sempre che il problema stia li'). Ciao
__________________
gianluca@gicastation:~$ tar -c tar: Codardamente mi rifiuto di creare un archivio vuoto |
|||
23-09-2005, 17:26 | #103 |
Senior Member
Iscritto dal: Apr 2001
Città: Bari
Messaggi: 2774
|
Le librerie native che ho messo io per Mac OS sono state ricompilate da un utente del forum di LWJGL, quindi non sono ufficiali. Probabilmente ulteriori modifiche ci saranno in tal senso nella prossima versione di LWJGL. A questo punto ti consiglio di dare un'occhiata al codice. Da quello che dice quell'utente è un problema legato alle chiamate ILUT che deve risolvere chi sviluppa DEVIL e non LWJGL.
|
23-09-2005, 19:31 | #104 | |
Senior Member
Iscritto dal: Mar 2005
Città: /home/gica
Messaggi: 1653
|
Quote:
La mia e' soltanto una supposizione, in quanto non riesco a capire benissimo come funziona questa funzione Codice:
public static String[] getLibraryPaths(String[] libNames, ClassLoader classloader) throws LWJGLException { // need to pass path of possible locations of library to native side List possible_paths = new ArrayList(); String libname; String platform_lib_name; switch (getPlatform()) { case PLATFORM_WINDOWS: libname = libNames[0]; platform_lib_name = libNames[1]; break; case PLATFORM_LINUX: libname = libNames[2]; platform_lib_name = libNames[3]; break; case PLATFORM_MACOSX: libname = libNames[4]; platform_lib_name = libNames[5]; break; default: throw new LWJGLException("Unknown platform: " + getPlatform()); } String classloader_path = getPathFromClassLoader(libname, classloader); if (classloader_path != null) { log("getPathFromClassLoader: Path found: " + classloader_path); possible_paths.add(classloader_path); } String lwjgl_classloader_path = getPathFromClassLoader("lwjgl", classloader); if (lwjgl_classloader_path != null) { log("getPathFromClassLoader: Path found: " + lwjgl_classloader_path); possible_paths.add(lwjgl_classloader_path.substring(0, lwjgl_classloader_path.lastIndexOf(File.separator)) + File.separator + platform_lib_name); } //add cwd path possible_paths.add(platform_lib_name); // Add all possible paths from java.library.path String java_library_path = (String)AccessController.doPrivileged(new PrivilegedAction() { public Object run() { return System.getProperty("java.library.path"); } }); StringTokenizer st = new StringTokenizer(java_library_path, File.pathSeparator); while (st.hasMoreTokens()) { String path = st.nextToken(); possible_paths.add(path + File.separator + platform_lib_name); } //create needed string array String[] paths = new String[possible_paths.size()]; possible_paths.toArray(paths); return paths; } Codice:
String[] iluPaths = LWJGLUtil.getLibraryPaths(new String[]{ "ILU", "ILU.dll", "ILU", "libILU.so", "ILU", "libILU.dylib"}, ILU.class.getClassLoader()); Comunque, la stringa iluPaths restituita da tale funzione viene usata come argomento della funzione nCreate() nella riga successiva, ed e' tale funzione che causa l'eccezione (probabilmente perche' iluPaths non e' corretta). La funzione nCreate() e' semplicemente questa (e non so cosa fa): Codice:
protected static native void nCreate(String[] iluPaths) throws LWJGLException;
__________________
gianluca@gicastation:~$ tar -c tar: Codardamente mi rifiuto di creare un archivio vuoto |
|
23-09-2005, 20:24 | #105 |
Senior Member
Iscritto dal: Apr 2001
Città: Bari
Messaggi: 2774
|
Scusami, rispetto ai file precedenti, c'è stato un cambiamento o sbaglio nell'errore?
|
24-09-2005, 11:13 | #106 | |||
Senior Member
Iscritto dal: Mar 2005
Città: /home/gica
Messaggi: 1653
|
Quote:
Scusate, ma ho avuto veramente pochissimo tempo per guardare e capire queste librerie... e non conoscendo ancora bene il linguaggio brancolo un po' nel buio. Questo era l'errore precedente: Quote:
Quote:
__________________
gianluca@gicastation:~$ tar -c tar: Codardamente mi rifiuto di creare un archivio vuoto |
|||
24-09-2005, 14:46 | #107 |
Senior Member
Iscritto dal: Apr 2001
Città: Bari
Messaggi: 2774
|
Scusa ma c'è sicuramente un problema di library path. L'utente del forum di LWJGL diceva di avere alcun problemi, ma non che non gli trovava la libreria. Facciamo una bella cosa: scaricati LWJGL per Mac OS ed usa SOLO ED ESCLUSIVAMENTE ciò che trovi lì. Non scaricare niente dal sito di DEVIL. Bisogna usare solo ciò che sta nel pacchetto di LWJGL. La libreria deve trovartela per forza a meno che tu non abbia sbagliato il java library path. Prova a copiarti i file di libreria un po ovunque nelle cartelle del progetto: forse le va a cercare da qualche altra parte.
|
24-09-2005, 19:16 | #108 |
Senior Member
Iscritto dal: Jul 2004
Città: Napoli
Messaggi: 2029
|
allora raga ho provato a fare il build del progetto con ant e...
Buildfile: C:\Documents and Settings\ghiotto86\workspace\Diamonds\build.xml init: [mkdir] Created dir: C:\Documents and Settings\ghiotto86\workspace\Diamonds\reports [mkdir] Created dir: C:\Documents and Settings\ghiotto86\workspace\Diamonds\reports\html compile: check: [checkstyle] Running Checkstyle 4.0-beta5 on 17 files test: BUILD FAILED C:\Documents and Settings\ghiotto86\workspace\Diamonds\build.xml:80: Could not create task or type of type: junit. Ant could not find the task or a class this task relies upon. This is common and has a number of causes; the usual solutions are to read the manual pages then download and install needed JAR files, or fix the build file: - You have misspelt 'junit'. Fix: check your spelling. - The task needs an external JAR file to execute and this is not found at the right place in the classpath. Fix: check the documentation for dependencies. Fix: declare the task. - The task is an Ant optional task and the JAR file and/or libraries implementing the functionality were not found at the time you yourself built your installation of Ant from the Ant sources. Fix: Look in the ANT_HOME/lib for the 'ant-' JAR corresponding to the task and make sure it contains more than merely a META-INF/MANIFEST.MF. If all it contains is the manifest, then rebuild Ant with the needed libraries present in ${ant.home}/lib/optional/ , or alternatively, download a pre-built release version from apache.org - The build file was written for a later version of Ant Fix: upgrade to at least the latest release version of Ant - The task is not an Ant core or optional task and needs to be declared using <taskdef>. - You are attempting to use a task defined using <presetdef> or <macrodef> but have spelt wrong or not defined it at the point of use Remember that for JAR files to be visible to Ant tasks implemented in ANT_HOME/lib, the files must be in the same directory or on the classpath Please neither file bug reports on this problem, nor email the Ant mailing lists, until all of these causes have been explored, as this is not an Ant bug. Total time: 5 seconds non sono molto esperto, che significa?? |
24-09-2005, 19:32 | #109 | |
Senior Member
Iscritto dal: Oct 2002
Città: California
Messaggi: 11781
|
Quote:
__________________
"We in the game industry are lucky enough to be able to create our visions" |
|
24-09-2005, 19:32 | #110 | |
Senior Member
Iscritto dal: Oct 2002
Città: California
Messaggi: 11781
|
Quote:
__________________
"We in the game industry are lucky enough to be able to create our visions" |
|
24-09-2005, 19:41 | #111 | |
Senior Member
Iscritto dal: Jan 2005
Città: Napoli
Messaggi: 355
|
Quote:
come faccio a metterlo nella lib di ant?? |
|
24-09-2005, 19:41 | #112 |
Senior Member
Iscritto dal: Jul 2004
Città: Napoli
Messaggi: 2029
|
opps nick di mi fratel
|
24-09-2005, 19:57 | #113 |
Senior Member
Iscritto dal: Oct 2002
Città: California
Messaggi: 11781
|
Q. When I try and run the Ant test target I get an error saying something like "Could not create task or type of type: junit". What's wrong?
A. Ant needs to find the junit.jar library on your classpath. Junit.jar is distributed with the source distribution (which you will need to run tests anyway). Either copy junit.jar to your Ant's lib directory (within ANT_HOME) or add it to your classpath manually. Consiglio. Quando avete un errore, buttate il messaggio d'errore in google, sarete sorpresi da quante persone hanno avuto lo stesso problema e quante persone lo hanno risolto
__________________
"We in the game industry are lucky enough to be able to create our visions" |
24-09-2005, 20:18 | #114 | |
Senior Member
Iscritto dal: Jul 2004
Città: Napoli
Messaggi: 2029
|
Quote:
bhe ho provato a cercare la ant home ma non ho trovato niente lo sai che non sono pratico ne di java ne di eclipse ho provato anche nelle proprietà del progetto spuntando tutit i jar junit lwjgl ecc ma niente. |
|
24-09-2005, 22:00 | #115 | |
Senior Member
Iscritto dal: Mar 2005
Città: /home/gica
Messaggi: 1653
|
Quote:
http://www.hwupgrade.it/forum/showpo...1&postcount=90 Dimenticavo: il file da aggiungere e' il junit.jar ch trovi nella directory Diamonds/lib
__________________
gianluca@gicastation:~$ tar -c tar: Codardamente mi rifiuto di creare un archivio vuoto Ultima modifica di Gica78R : 24-09-2005 alle 22:03. |
|
24-09-2005, 22:27 | #116 | |
Senior Member
Iscritto dal: Jul 2004
Città: Napoli
Messaggi: 2029
|
Quote:
e ora come faccio a far partire il programma??? |
|
24-09-2005, 22:47 | #117 | |
Senior Member
Iscritto dal: Mar 2005
Città: /home/gica
Messaggi: 1653
|
Quote:
Fammi sapere se va... A me su Mac non parte
__________________
gianluca@gicastation:~$ tar -c tar: Codardamente mi rifiuto di creare un archivio vuoto |
|
24-09-2005, 22:48 | #118 |
Senior Member
Iscritto dal: Jul 2004
Città: Napoli
Messaggi: 2029
|
ehm...
Exception in thread "main" java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.loadLibrary0(Unknown Source) at java.lang.System.loadLibrary(Unknown Source) at org.lwjgl.Sys$1.run(Sys.java:67) at java.security.AccessController.doPrivileged(Native Method) at org.lwjgl.Sys.<clinit>(Sys.java:65) at org.lwjgl.opengl.Display.<clinit>(Display.java:104) at it.diamonds.engine.DisplayImpl.findDisplayMode(DisplayImpl.java:80) at it.diamonds.engine.DisplayImpl.initDisplay(DisplayImpl.java:107) at it.diamonds.engine.DisplayImpl.<init>(DisplayImpl.java:14) at it.diamonds.engine.Engine.create(Engine.java:23) at it.diamonds.Game.createEngine(Game.java:50) at it.diamonds.Game.main(Game.java:31) come faccio a dire ad eclipse che deve cercare la dll in diamonds/lib/win32 ??? |
24-09-2005, 22:50 | #119 |
Senior Member
Iscritto dal: Jul 2004
Città: Napoli
Messaggi: 2029
|
abbiamo postato insieme.
forse ci sto a capì qualcosina solo sto fatto dei parametri alla vm non mi venivano grazie ora veod se va |
24-09-2005, 22:50 | #120 |
Senior Member
Iscritto dal: Mar 2005
Città: /home/gica
Messaggi: 1653
|
Dimenticavo, se e' la prima volta che vai su Run, prima ti chiede di creare una nuova "Run configuration"; devi crearla come "Java Application" (click su "Java Application" e poi "New").
Spero di non dimenticare altro
__________________
gianluca@gicastation:~$ tar -c tar: Codardamente mi rifiuto di creare un archivio vuoto |
Strumenti | |
|
|
Tutti gli orari sono GMT +1. Ora sono le: 00:30.