Page 9 of 49
Posted: 28 Feb 2007, 20:42
by Kloot
Oops, I see I missed a few dependencies (that's what you get for not testing more than 5 seconds). I've compiled a
new version dynamically linked against GL, SDL, etc which ought to be more obedient, rename it to
libunitsync.so (be sure to place the file in the same directory as AFLobby.jar) and then run the lobby with:
java -Djava.library.path=. -jar AFLobby.jar
Posted: 28 Feb 2007, 21:50
by 10053r
@kloot
I tried replacing the unitsync included in alpha 17 with yours, and I got the same message. I renamed it to "libunitsync.so" and also tried naming it "unitsync.so". I also tried giving "/home/username/Desktop/" as the library location. In no case did it find the unitsync.
Posted: 28 Feb 2007, 22:07
by AF
aflobby.jar not AFLobby.jar
Posted: 28 Feb 2007, 22:13
by Kloot
@10053r
Yeah, just noticed that. Loading native libraries from within a jar is apparently handled differently than from within an unarchived class (which my tests were based on), the lib needs to be packaged inside it as well for some reason.
Posted: 28 Feb 2007, 22:15
by 10053r
from a user perspective, having the unitsync inside the jar is much easier. Is there any way I can put it in there, or should I wait for alpha 18 from AF?
Posted: 28 Feb 2007, 22:27
by AF
You can have alpha 18 in a week (if you can figure out howto load unitsync)
You can have alpha 18 in 4 months (rewritting unitsync in pure java) and a working alpha 19 in 6 months (testing) then an upto data AFLobby alpha 20 in 8 months (catching up with all the changes made in the previous months).
With option 2 you sacrifice intergalactic war, integrated ladders, a truckload of UI enhancements, multiserver support, architectural changes, and a 1/6 chance of linux support being dropped.
Remember, I do the vast majority of my work with little help. There's a reason I offloaded all the config work into toolkit, why I had lindir helping me with the XTA config, why DJ fixed the latest version of toolkit for me.
But suffice to say, rewritting unitsync in java is a very unpleasant idea from my perspective. And would in he end give us exactly the same problem but with lib7zip.so rather than libunitsync.so
Posted: 28 Feb 2007, 22:29
by Kloot
@10053r
Well, you could create your own jar with the lib in it from the alpha16 source, but it's probably less of a hassle to just run the main class directly (with the command java -Djava.library.path=. Main, assuming you park unitsync next to it) after compiling.
Posted: 01 Mar 2007, 05:44
by 10053r
@Kloot
I attempted to load the alpha 16 source into eclipse to get it to run. While I could certainly edit the files, I couldn't figure out how to compile it into any sort of useful and runable application. Any pointers?
@AF
This is the blind leading the blind here. I know linux, but I think I don't have the java skillz to make this work without a week of full-time learning or so.
Posted: 01 Mar 2007, 13:20
by SupaSonic
2
Kloot
I've tried loading your unitsync with my test program, and got an exception yet again. This time it was different though.
Code: Select all
Exception in thread "main" java.lang.UnsatisfiedLinkError: /home/sonic/eclipse/workspace/Test Project/libunitsync.so: /home/sonic/eclipse/workspace/Test Project/libunitsync.so: undefined symbol: _ZN5boost11basic_regexIcNS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEE9do_assignEPKcS7_j
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1647)
at java.lang.Runtime.load0(Runtime.java:770)
at java.lang.System.load(System.java:1005)
at LoadLib.main(LoadLib.java:3)
Posted: 01 Mar 2007, 19:43
by Kloot
*head explodes*
yet another version, this time linked against everything under the sun
@10053r
AFLobby uses some NetBeans packages, so you need to install that IDE to compile it (or rip out half the GUI, but I wouldn't recommend that

). From there you should only have to add the source files, jars, etc to a new project and press 'compile' (in a manner of speaking) to build the lobby, but if you've never worked with NB before that might take some navigating.
Posted: 01 Mar 2007, 20:34
by SupaSonic
Ok, my program gives no error, so good job!
The weird thing is - AFLobby still gives an Unsatisfied Link error. I don't know what is happening here. Can you post the exact code of loading the library? I tried to
rename it into a bunch of other stuff, but it still won't work.
EDIT: Forget it, I got it to work! Totally forgot about the -Djava.library.path=. Yaaay!
Posted: 01 Mar 2007, 20:48
by SupaSonic
Now that this nasty bug is behind us... There's still the white and distorted graphics issue, because of which I honestly don't know what goes after logging in... I just don't see much on the screen.
Posted: 01 Mar 2007, 21:16
by AF
I have an idea for that but I'll repackage with the new stuff.
And if you have a copy of netbeans you just need to open the source, as the source is my entire netbeans project zipped up. so you neednt add any files to a new project.
Posted: 01 Mar 2007, 22:19
by 10053r
WHEE! I just tried it with Kloot's newest unitsync and there was no error message with alpha 17!
As SupaSonic says, now we just need to get the graphics working. Forget all that about sticking the lib inside the jar. It works great as is!
Posted: 01 Mar 2007, 22:47
by AF
Download alpha 18a here
This version includes the new unitsync for java, soem colour chanegs to the battle screen, a few resize fixes for components, and a lot of components have had double buffering turned off in hopes it fixes the graphics glitches under linux.
Posted: 01 Mar 2007, 23:36
by 10053r
Much better! Beginning screen has graphics fixed. Login works
Issues:
Several buttons are cut off and you can't see the full text:
First screen:
"Click here t..."
All the buttons on the right side.
Screen after login screen:
"Click here t..."
"L..."
On the screen after the login screen, I think you have the same double buffering issue. It is all white. Something appears in the middle in a little box that moves across. It looks like perhaps text is being smooshed to the point where all the characters aren't readable?
Posted: 02 Mar 2007, 00:07
by AF
can I see screenshots of all of this?
Posted: 02 Mar 2007, 00:47
by 10053r
Sigh. Screenshots are such a pain. Anyway...
and
The bit about the moving smooshed text I obviously can't get into a screenshot, because it moves.
Posted: 02 Mar 2007, 00:56
by AF
can you modify your screenshots so they arent double the width with extra whitespace??
Posted: 02 Mar 2007, 01:37
by elio
what files and what libraries need to be linked to compile unitsync to work with AFLobby now?