Jump to content

ForgeML doesn't allow running from USB drive


Recommended Posts

Greetings,

 

I was following a suggestion on the MC forums to try running MC from a USB stick to see if it increases fps. Unfortunately ForgeML doesn't allow this because it looks to the user's %APPDATA% folder for some additional libraries:

 

argo-2.25.jar

guava-12.0.1.jar

asm-all-4.0.jar

bcprov-jdk15on-147.jar

 

Since I was trying to play offline, ForgeML crashed saying it couldn't download the libraries even though they are there in the "lib" folder in the relative path.

 

Is it possible in a future release to have ForgeML look in the relative path rather than a hard coded path? Vanilla MC can be run from a USB stick so it seems counterintuitive for ForgeML to interfere with this.

Link to comment
Share on other sites

The path is not hardcoded, you just need a launcher to sets the Minecraft home dir properly and FML will use it.

Go try MultiMC.

 

Interesting, I thought this batch script would set the home path:

 

REM Obtain the current path and remove the trailing slash
SET _appPath=%~dp0
SET _appPath=%_appPath:~0,-1%
SET CLASSPATH=%_appPath%\bin\*

 

Java launches properly but as I said, it still looks in the user directory. I must be missing something. Is there no way to do this with a simple batch script? I really don't want to have to rely on a 3rd party executable.

 

 

Edit:

 

Removed the code snippet that showed the java commandline since it didn't

fit in the page properly and it was irrelevant to the discussion anyway.

Link to comment
Share on other sites

Change the definition of %APPDATA% to point to your usb drive.

Beyond that no, because if the actual path is null {which is is by default in MC} it will create it fromt he %appdata% environment variable.

It DOES NOT use working dir or anything like that.

This is basic vanilla minecraft mechanics not us.

 

So to do it properly you have to set the calculated home dir to something in java.

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

Link to comment
Share on other sites

@LexManos

 

Thanks for the tip, got it working:

 

SET _appPath=%~dp0
SET _appPath=%_appPath:~0,-1%
SET APPDATA=%_appPath:~0,-10%

 

First line gets the current directory (for example: F:\Games\.minecraft\), second line trims the trailing "\" off and the third trims the ".minecraft" folder.

 

The third line was key because the java parameter -Duser.home is blocked by security rules so it would not change the system parameter properly.

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.