Hi,
I’m new to actually distributing builds of my projects, and I needed one now. The build seemed to run ok (I’ll post the log for the “clean and build”) later, it even said build successful, however when I used the distribution part of the project will not run.
Here is the build log:
The part of the project that currently does not work is the part where I am changing from one Nifty GUI screencontroller to another. In the compiler I can hit run and the game works fine, but the build is a different story. Here are the two screen controllers that interlink:
I can get to the class menu but interchanging from the class menu to the Hub I can click the icons all I want and it doesn’t seem like the next xml will load. As I said, I’m new to builds, so I don’t know why a compiler run would work but a build wouldn’t. Perhaps you could forward a link or something explaining the diff to me?
Sadly now that I try it it did not work… My project still wont get past that point even though I converted the globe to .j30 (the only 3D asset in the game)
Here is the new MalwareHub (I added a few things aswell before I tried to build again)
Launch your distribution from console or a bat file, so you can get the stack trace. Always provide a stack trace, otherwise people have to start hitting in the dark.
If you did as advised by normen and still have the problem:
don’t know if still the case, but a year ago, under windows, in development mode, the nifty part (or was it the jme splash screen?) was less susceptible to go bonkers due to upper/lower case issues while the distribution was unforgiving everywhere.
How do I launch my distribution from the console? #newb
Like this? http://puu.sh/9s44x/097fc95506.png
I did so but it certainly didnt produce a stack trace.
And as an answer to Normen’s question, I changed it in the code, yes. I’ve deleted the .obj aswell.
Do you try to pass the assets/Interface folder as a directory to nifty? Because its not a folder in the disto, its a jar. And nifty already has the root of the assets jar as a resource location by default. So all file names you use in nifty have to be relative to the “assets” folder. E.g. “Interface/NiftyGUI/MyStuff.xml”
Atm, I’ve found a workaround by extracting the jar contents of the assets jar and just putting them in the dist under the folder Assets, so it isn’t much of an issue.
I am aware of the situation with the filenames, but could the issue be the fact that I use static variables from main in order to render my globe? I’ve actually set up functions in main which I can use to grab the asset manager and such so I can render stuff in the MalwareHub class rather than keep everything in Main.
What ACTUALLY happened was that I had registered that locator I talked about earlier to my Asset Manager, which I shouldn’tve had to do.
Subsequently, in my xml I had (accidentally) forgot to put the Interface/ in front of a filename. This worked in the compiler because from Jmonkey’s perspective Assets/Interface was an actual folder, but in the build, everything was supposed to be accessed from that jar. That’s why it was complaining that the Assets/Interface folder didnt exist.
What ACTUALLY happened was that I had registered that locator I talked about earlier to my Asset Manager, which I shouldn’tve had to do.
Subsequently, in my xml I had (accidentally) forgot to put the Interface/ in front of a filename. This worked in the compiler because from Jmonkey’s perspective Assets/Interface was an actual folder, but in the build, everything was supposed to be accessed from that jar. That’s why it was complaining that the Assets/Interface folder didnt exist.
I think I said it already but in nifty you have to use the full path for all names of xml files, images etc., relative to the assets folder. So in your case always “Interface/Nifty/Blah.jpg”… That is in the nifty files and code, each time you reference an asset by name. And you don’t have to register anything for it to work, as pspeed said.