Content: Slate Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate Marble
Background: Slate Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate Marble
Pattern: Blank Waves Notes Sharp Wood Rockface Leather Honey Vertical Triangles
Welcome to TerraFirmaCraft Forums

Register now to gain access to all of our features. Once registered and logged in, you will be able to contribute to this site by submitting your own content or replying to existing content. You'll be able to customize your profile, receive reputation points as a reward for submitting content, while also communicating with other members via your own private inbox, plus much more! This message will be removed once you have signed in.

  • Announcements

    • Dries007

      ATTENTION Forum Database Breach   03/04/2019

      There has been a breach of our database. Please make sure you change your password (use a password manager, like Lastpass).
      If you used this password anywhere else, change that too! The passwords themselves are stored hashed, but may old accounts still had old, insecure (by today's standards) hashes from back when they where created. This means they can be "cracked" more easily. Other leaked information includes: email, IP, account name.
      I'm trying my best to find out more and keep everyone up to date. Discord (http://invite.gg/TerraFirmaCraft) is the best option for up to date news and questions. I'm sorry for this, but the damage has been done. All I can do is try to make sure it doesn't happen again.
    • Claycorp

      This forum is now READ ONLY!   01/20/2020

      As of this post and forever into the future this forum has been put into READ ONLY MODE. There will be no new posts! A replacement is coming SoonTM . If you wish to stay up-to-date on whats going on or post your content. Please use the Discord or Sub-Reddit until the new forums are running.

      Any questions or comments can be directed to Claycorp on either platform.
Sign in to follow this  
Followers 0
kotoroshinoto

A multi-OS minecraft mod manager & launcher

25 posts in this topic

https://sourceforge....inecraftmodman/

I've gotten the launcher to work with servers so far, but even that is still a bit buggy as its still alpha code. The patching aspect for the jars should work for both clients & servers, but currently you'll have to transplant the new jar to a working client installation.

I am currently working on the codebase for the client launcher. I'm going to attempt to use the JNI library to load minecraft rather than use multmc's method of launching it via a java-coded launcher, but that may take a bit of time to implement.

I may add a third table for mod codebases that do not maintain separate versions for server/client, but until I see a reason for doing otherwise I'll be keeping the separate lists for client/server. (I suspect that even with the merge, some mods may keep certain functions off the server and maintain different releases).

Currently i'm implementing the login session && files-updating codebase, I will be writing it as a standalone launcher at first similarly to how multimc's java launcher worked (it will take command line args and launch based from a location in that manner). Once that codebase works reliably I'll be transplanting the code back into the mod-manager to launch the client there, if possible. If it needs to remain a separate program to properly capture the output streams of the jvm, then I won't mind leaving it as a separate executable.

1

Share this post


Link to post
Share on other sites

i dont wont to bash your work but mojang is already working on something like that,

so if you dont see it as an exercise its propably wasted time

btw look at multi mc it kinda does what you are doing, but has its problems with buggy code and unusal mods -> flans etc

0

Share this post


Link to post
Share on other sites

i dont wont to bash your work but mojang is already working on something like that,

so if you dont see it as an exercise its propably wasted time

btw look at multi mc it kinda does what you are doing, but has its problems with buggy code and unusal mods -> flans etc

I already know about multi mc (I've used it extensively) and my dislike for it is why i'm making this. It has zero support for server instances and the author is taking a weird direction in the window design with the icons, it downloads updates and reapplies mods at weird intervals without permission (if you use the even buggier multimc4 code in his repository that he never seems to update). I am also doing it to improve my programming skills.

Also, the thing mojang is working on is a mod api, i've heard no reports of an automatic modder/modlibrary system. and if they do turn out to make something, and ppl don't quite like it, this will provide another option

Anyway back to what I was saying.

Figuring out how to resolve jvm dll issues isn't really easy, might have to have it launch from a *.bat file in windows, because its dll search behavior is so derpy. It might be easier to mirror multimc's solution and include a java-based launcher rather than try to call it from the C program, because with a *.bat file you still end up with 2 files to cart around.

0

Share this post


Link to post
Share on other sites

y dont you try another solution ?

pascal, as i recall turbo pascall has a solution for that

a little request, try to make a tooltip for the mc and mod versions

0

Share this post


Link to post
Share on other sites

All the niceties like tooltips and the like will be an afterthought that I'll begin to handle once the main bugs are handled. Don't take this response as a spurn, I AM planning to do those things, but functionality comes before the polishing and shining.

The problem with the launcher is that it has to have a java-native method for launching the VM for the minecraft client, because mojang did not give the client a main method that is defined in the jar meta-inf, and even if they DID, the meta-inf gets deleted upon modding, so you have to load up the main-class directly. Problem is, BECAUSE it isn't a main method it has to be called from within a VM that loads the java class and then calls the method. the libjvm.dll file enables this, but windows has extremely derpy linking paths, and sun/oracle took no steps to make this any easier on the windows side. Actually, its just as annoying for a novice linux user as they wouldn't know to set LD_LIBRARY_PATHS, but at least they HAVE a variable they can set just for DLLS, windows has PATH, and thats it. It includes binaries and dll locations in the same variable which is silly.

Maybe I'll end up writing a utility to add these paths if they aren't already there. I'd need someone to help me test this solution on a mac if it ends up working, I dont know how dylibs work, though as mac is unix-y I'd expect it to behave mostly like linux in this respect.

I haven't posted an updated release yet, but the server launcher functionality is technically fully implemented aside from any changes I make to the interface. It IS however, still quite buggy. I have gotten crashes on it that are fairly unexplainable until I start debugging the code. Almost all crashes I've had to date have resulted from mistakes in my coding of loading the conf file info for the edit-tab for instances. Also, for the mods library for server/client I'm planning to make version a drop-down menu that allows you to select minecraft jar version # (out of the installed jars list)that it is compatible with, and have the textbox auto-populate with the filename of the mod when the file is selected, but allow you to change it if you so desire. I did notice that typing out the name & version # was tedious and the intent that the version# be related to the minecraft jar was non-obvious.

Another thing I'm not sure of is whether I should rely on conf-files or just take stock of what directories the tool sees and what files of type *.zip and *.jar it sees in the mods directory. There would still need to be a text-file listing the jarmods, because those dont get copied in separately.

Currently i'm compiling an x64 compiler to use with my mys-mingw32 setup, I realized whlie trying to develop the JNI/libjvm launcher, that I couldnt even link to it properly on windows because my main JDK is 64bit and my compiler was producing 32bit binaries.

Once this is done, i'll probably have to be doing a fair bit of cross-compiling for the different releases, so i'll be learning a fair bit about it.

If there are any c++ developers interested in getting in on this project to see it through to fruition, PM me and I'll see about adding you to sourceforge access

0

Share this post


Link to post
Share on other sites

I have gotten the code required for client updating and login mostly completed. I will begin working the updater code back into the GUI application, adjusting it as required.

0

Share this post


Link to post
Share on other sites

Had a small hiccup making the downloader code compilable in windows, but thats been accomplished now. Now its just a matter of merging the code and tweaking a few things.

0

Share this post


Link to post
Share on other sites

congrats =)

i hope it will work and keep on working without to much maintainance

0

Share this post


Link to post
Share on other sites

Code has been merged, I converted the main implementation into a far more object oriented codebase, but haven't quite fixed all the variable naming issues this introduced. Once that is done, I wont' be too far off from implementing the client launcher.

As soon as the client launcher and both the client/server edit tab bugs have been ironed out I'll be releasing a beta version. I'm going with the java-launcher technique for now (going to be basing my method off of information I obtained from looking @ how multimc accomplishes its client launch. It was just too complicated to figure out how to get the proper libjvm dll to be in the search path prior to the user running the program considering that on windows the java installer doesn't do anything at all to make it easy to locate such things, and windows completely lacks an environmental variable system similar to how linux & mac work with LD_LIBRARY_PATH. The directory containing the dll would have to be added to PATH, and asking an inexperienced end-user to have to modify something like that to run an application is asking too much IMO. If it were a linux user, maybe I could expect that they'd know something about it, but otherwise, ..... it would result in people choosing not to use the tool at all most likely.

0

Share this post


Link to post
Share on other sites

More on libjvm, in case anybody knowledgable can help:

libvjm is a library provided as part of both the JDK and JRE releases, it allows one to load the JVM and control it within a C++ program. The issue is that its a shared library by necessity (given the constant updating of java and discrepancy between 32/64 bit implementations). Now, if I were to do this properly, I would have to obtain a 32/64 bit cross compiler for linux & windows systems and provide separately compiled releases of the utility that each knew how to find & link to the "currently selected" java at runtime. This would HAVE to jive with the version selected within the program that would be used to run minecraft. I can't really see a way to do that. (mac is pretty much entirely 64 bit now, so mac wouldn't be a problem as much)

Now, MAYBE I could use the DLOPEN method, and have it figure out all this at runtime. If I can get that method to work, then I will release it at a later time. I want the thing to be functional before I mess with changes to the launch method.

0

Share this post


Link to post
Share on other sites

The code is now compilable and runnable again. Have implemented a few convenience features (it auto-sets the textboxes with the selected filename (minus the extension) or data from the list.)

Will be working on getting the launcher to work for both server & client (the launcher code for the server hadn't been name-ported yet and the client code never really worked.)

Will be using multi-mc's launcher at first, until I adapt my own java code for that task.

0

Share this post


Link to post
Share on other sites

if you need excessive testers, make a post =)

0

Share this post


Link to post
Share on other sites

I dont mind if you feel like testing it, but at this point you'd have to pull from the repository and build it from source, if you're on windows that isn't easy.

0

Share this post


Link to post
Share on other sites

my unix is out of order so yeah =) ill pass

0

Share this post


Link to post
Share on other sites

Once I work through a couple stability issues I'll put up an alpha version that has a functioning server-launcher, the client launching is still iffy.

0

Share this post


Link to post
Share on other sites

Bug I'm currently working through:

Upon updating, Attempting to read the jar file containing the native system libraries for lwjgl for unzipping purposes completely fails, resulting in the absence of the libraries, and thus the client cannot load.

Also, I don't think the command line function for calling up the client is formatted correctly, but until I get it unzipping the natives, that is a secondary issue, as it is easily fixed, but cannot be tested until they unzip.

Once this bug has been handled, the client launcher should work and I can safely say the program has transitioned from alpha to beta and release a usable version. It is likely to be buggy at first, but I WANT you to find the bugs and report them so I can FIX them. Also any interface suggestions would be acceptable as well.

I'm considering turning the purge/update buttons from checkmarks into real buttons, as theres no need to wait for the client to attempt loading to do this, as we're not checking the currentversion label to see if the game NEEDS an update, its either forced or skipped, meaning it should probably be done on request separately from launching.

This means I'll have to include a file check immediately before launch that just makes sure all the files required to launch are actually present and accounted for (but not necessarily in agreement with the md5 since some of them may be modded, so I won't be checking that, unless you'd LIKE me to just have it report in the log window which files don't match md5, just to have a list, in case somehow something DID get corrupted).

Also, would you prefer a purge/force-update to clear out mods for the selected instance or to reapply them or to just wait for the user to do it? I think the best practice would be to mark the instance as "unedited" and remind the player at launch that they have not applied mods and give them a chance to quit the launch and go into the edit tab.

anyway any thoughts on this?

0

Share this post


Link to post
Share on other sites

GOOD NEWS, I have successfully launched a client with the tool for the first time.

BAD NEWS, After obtaining one sessionID, I can't seem to re-obtain a sessionID from the login server if the client is closed & relaunched. Looking into this behavior now.

It is possible that I am expected to hold onto the sessionID for a while and only reobtain one after a certain time period has passed or somehow notifying the login server of the closed session.

To remedy this requires closing and restarting the manager, a new session of the manager can obtain a new client just fine.

Another thing: I'm not quite sure currently what happens to running client/server if you close the manager while they're actively running. They MIGHT continue to run in the background, which would be undesirable behavior, I'll check this and fix it after I chase down the sessionID issue.

If you kill the program with an active client or server, check your process list for any unexpected instances of java running, and manually terminate them.

edit::

actually in the case of the client you'll have the gui, but in the case of the server, its running in nogui mode, so there won't be any way to control the server outside of connecting to it with the client and shutting it down with op powers. or manually killing java.

so maybe default behavior should be:

for servers: issue stop command, wait a period of time for it to close; kill it harshly if it doesnt close after a certain amount of time.

for clients: just leave it running.

OR maybe i should include a nogui checkbox, so if its running the server in gui mode, it continues to run, otherwise it gets stopped/killed

0

Share this post


Link to post
Share on other sites

I would've had the win32 version posted on sourceforge already, but I seem to be having trouble compiling, I'm getting a linker error with libxerces. If xerces continues to give me this much trouble I'll probably switch XML libraries. (this happened to me once before, but I can't quite remember what I did to fix it.)

M. Gooch

0

Share this post


Link to post
Share on other sites

I have rewritten the code to use libExpat for XML parsing, next step is to attempt compilation in windows (it already works in linux, just tested it)

0

Share this post


Link to post
Share on other sites

If you can't get it to work, post the source code on SourceForge and I'll see if my computer can compile. I'm just in the initial phases of C++ coding, but I understand compiling code. (Using Code::Blocks GNU compiler)

1

Share this post


Link to post
Share on other sites

I got it to compile, so its just a matter of making sure I package things properly, and that they're not being dynamically linked to anything that I'm not including in the released package.

0

Share this post


Link to post
Share on other sites

DONT use codeblocks, it is built to use autotools, which requires msys or cygwin.

The priority bug is slowly becoming: why doesn't it let me log in more than once per execution of the binary.

edit:

well it compiled, but its having some other kind of trouble at the moment, maybe the login server went down?

-edit2:

I think its libcurl giving me shit, I hope I can find a different library that can communicate with the login site, libcurl has too many friggin dependencies.

0

Share this post


Link to post
Share on other sites

If you can't get it to work, post the source code on SourceForge and I'll see if my computer can compile. I'm just in the initial phases of C++ coding, but I understand compiling code. (Using Code::Blocks GNU compiler)

Its already ON sourceforge, and you have public access to the SVN repository, which is where I'd recommend getting the source ATM, as its the version I'd be working with.

I'm considering getting rid of libcurl if I can find an alternative, I think libcurl is responsible somehow for the session management issue I was having as well as the windows derp. I was getting an error response from the login server, while it works just fine in linux and in my browser.

0

Share this post


Link to post
Share on other sites

Are any of you lurker guys C++ or java programmers? If you're willing to donate some time to this, I'd be glad to have the help. Currently trying to figure out why the sessions cannot be refreshed (first login works for a given user, afterwards all fail on that user until program dies.)

REMINDER:

This is intended to be compiled by GNU C++ compiler and it is written to be handled by auto-tools, meaning even if you're going to compile it on windows, you have to be using MINGW within a CYGWIN or MSYS shell. Personally I use MSYS/mingw. It is NOT expected to compile using any other compiler, especially microsoft visual C/C++ compilers.

If you still want to brute force a compile without using the makefiles, you'll have to compile the library dependencies, refer to the configure.ac and various makefiles to figure out the build order and dependencies.

0

Share this post


Link to post
Share on other sites
Sign in to follow this  
Followers 0