Minecraft Portable 2.7.2 (+ Java Portable) · Minecraft on your USB · Now supports Macs!

  • #162
    Do you guys realize how utterly pointless this program is? All it is is an executable file that runs to a simple batch script... All you need for minecraft to be portable is the following code:
    set APPDATA=.
    start javaw -Xmx1024M -Xms512M -cp Minecraft.jar net.minecraft.LauncherFrame
    and then you're good to go. You don't need an executable file to run a batch file, it would be faster just to run the batch file itself rather than having to go through an executable file. No offense OP, but it's kinda sickening how much praise you are getting just from an executable file that runs a batch script. This is utterly ridiculous. Again, no offense, I'm just sayin'.
  • #163
    Quote from mayhempk1 »
    Do you guys realize how utterly pointless this program is? All it is is an executable file that runs to a simple batch script... All you need for minecraft to be portable is the following code:
    set APPDATA=.
    start javaw -Xmx1024M -Xms512M -cp Minecraft.jar net.minecraft.LauncherFrame
    and then you're good to go. You don't need an executable file to run a batch file, it would be faster just to run the batch file itself rather than having to go through an executable file. No offense OP, but it's kinda sickening how much praise you are getting just from an executable file that runs a batch script. This is utterly ridiculous. Again, no offense, I'm just sayin'.


    I like it cause it can run entirely on a usb stick, and incorperates MCFS. Much more managable for me, as im rarely at my home pc when i want to play. [+ much easier in the office :smile.gif: ]
  • #164
    Quote from mayhempk1 »
    Do you guys realize how utterly pointless this program is? All it is is an executable file that runs to a simple batch script... All you need for minecraft to be portable is the following code:
    set APPDATA=.
    start javaw -Xmx1024M -Xms512M -cp Minecraft.jar net.minecraft.LauncherFrame
    and then you're good to go. You don't need an executable file to run a batch file, it would be faster just to run the batch file itself rather than having to go through an executable file. No offense OP, but it's kinda sickening how much praise you are getting just from an executable file that runs a batch script. This is utterly ridiculous. Again, no offense, I'm just sayin'.

    To be honest, it's a bit more complicated than that:
    @ECHO OFF
    
    ::--------------------------------
    ::- Various paths we need to set -
    ::--------------------------------
    
    
    ::Check if a program is drag-and-dropped onto the application
    
      IF [%2]==[] (
      	set CURRENTDIR=%~1
    	set RUNPROGRAM=false
      ) ELSE (
      	set CURRENTDIR=%~2
    	set RUNPROGRAM=true
      )
    
      set TEMPFOLDER=%TEMP%\MinecraftPortable_data
      set MYFILES=%~dp0
      set APPDATA=%CURRENTDIR%\mcp_data
      set STRINGCACHE=%MYFILES%\stringcache.bat
      set CONFIGFILE=%APPDATA%\mcp_config.ini
      set MINEBIN=%APPDATA%\.minecraft\bin
      set JAVAPATH=%APPDATA%\java\bin\javaw.exe
      set DEBUGFILE=%APPDATA%\debug.txt
    
      if %RUNPROGRAM%==true (
    	start "" %1
            goto :End
      )
    
    
    
    ::----------------
    ::- Main program -
    ::----------------
    
      IF NOT EXIST %APPDATA% mkdir %APPDATA%
    
      call :ExtractAllData
      call :ReadConfig
    
    echo Started logging at %TIME%, %DATE% > "%LOGFILE%"
    echo. >> "%LOGFILE%"
    echo Minecraft Portable v2.2 >> "%LOGFILE%"
    echo by NotTarts >> "%LOGFILE%"
    echo. >> "%LOGFILE%"
    echo. >> "%LOGFILE%" 
    echo Starting process. >> "%LOGFILE%"
    echo. >> "%LOGFILE%"
    
    ::  call :CheckTemp 
      
      IF %USBMode%==true call :PatchMCFS
      call :RunMinecraft
    
    ::  call :ProcessCheck
    ::  call :CleanUp
    
    goto :End
    
    :End
    echo Process finished. >> "%LOGFILE%"
    echo. >> "%LOGFILE%"
    goto :EOF
    
    ::-------------
    ::- Functions -
    ::-------------
    
    :ExtractAllData
    
    echo  Extracting data files... >> "%LOGFILE%"
      7za.exe x data.7z -aoa > NUL
    echo  - Done. >> "%LOGFILE%"
    echo. >> "%LOGFILE%"
      goto :EOF
    
    ::-----------
    
    :PatchMCFS
      echo  [MCFS Patcher] Checking for Minecraft executable... >> "%LOGFILE%"
      IF EXIST "%MINEBIN%\minecraft.jar" (
    	echo  - Minecraft executable found, checking for MCFS >> "%LOGFILE%"
    	  cd "%MINEBIN%" 
      ) ELSE (
    	echo  - 'minecraft.jar' not found, please log in and restart Minecraft. >> "%LOGFILE%"
    	  goto :PatchEnd
      )
    
      "%MYFILES%\7za.exe" e "%MINEBIN%\minecraft.jar" -o"%MINEBIN%" patched.mcportable > NUL
    
      IF EXIST "%MINEBIN%\patched.mcportable" (
    	del "%MINEBIN%\patched.mcportable"
    	echo  - MCFS already patched, skipping. >> "%LOGFILE%"
    	goto :PatchEnd
      )
    
      echo  - MCFS not present, starting patching process. >> "%LOGFILE%"
    
      "%MYFILES%\7za.exe" a "%MINEBIN%\minecraft.jar" "%MYFILES%\patched.mcportable" > NUL
    
      IF EXIST "%JAVAPATH%" (
            echo  - Java Portable binaries detected. >> "%LOGFILE%"
            echo  - Patching MCFS... >> "%LOGFILE%"
      	  start "" "%JAVAPATH%" -Xms1024M -Xmx1024M -jar "%MYFILES%\MCInjectorCLI.jar" "%MINEBIN%\minecraft.jar" "%MYFILES%
    
    \MCFS_MEM.MCI_PATCH"
      ) ELSE (
    	echo  - No Java Portable binaries found. >> "%LOGFILE%"
            echo  - Patching MCFS... >> "%LOGFILE%"
      	  "%MYFILES%\MCInjectorCLI.jar" "%MINEBIN%\minecraft.jar" "%MYFILES%\MCFS_MEM.MCI_PATCH"
      )
    
      IF NOT EXIST "%MINEBIN%\minecraft.jar" echo  - ERROR: minecraft.jar not found after patching. Please update Minecraft 
    
    Portable.
    
      :PatchEnd
      echo  - Done. >> "%LOGFILE%"
      echo. >> "%LOGFILE%"
      goto :EOF
    
    
    ::-----------
    
    :RunMinecraft
      echo  Launching Minecraft... >> "%LOGFILE%"
      IF EXIST "%JAVAPATH%" (
            echo  - Java Portable binaries detected. >> "%LOGFILE%"
            echo  - Launching... >> "%LOGFILE%"
      	  start "" "%JAVAPATH%" -Xms1024M -Xmx1024M -jar "%MYFILES%\minecraft_launcher.jar"
      ) ELSE (
    	echo  - No Java Portable binaries found. >> "%LOGFILE%"
            echo  - Launching... >> "%LOGFILE%"
      	  "%MYFILES%\minecraft_launcher.jar"
      )
    
      :LoopStart
        ping 1.1.1.1 -n 1 -w 2000 > NUL
        tasklist /FI "IMAGENAME eq javaw.exe" 2>NUL | find /I /N "javaw.exe" >NUL
        if "%ERRORLEVEL%"=="1" goto LoopStart
    
      echo  - Done. >> "%LOGFILE%"
      echo. >> "%LOGFILE%"
      goto :EOF
    
    ::------------
    
    :ReadConfig
    
      IF NOT EXIST "%CONFIGFILE%" (
    	echo [MCPSettings] >> "%CONFIGFILE%"
    	echo USBMode = false >> "%CONFIGFILE%"
    	echo EnableLog = false >> "%CONFIGFILE%"
    	echo DumpDebugInfo = false >> "%CONFIGFILE%"
      )
    
      "%MYFILES%\ini.exe" "%CONFIGFILE%" [MCPSettings] USBMode >> "%STRINGCACHE%"
      "%MYFILES%\ini.exe" "%CONFIGFILE%" [MCPSettings] EnableLog >> "%STRINGCACHE%"
      "%MYFILES%\ini.exe" "%CONFIGFILE%" [MCPSettings] DumpDebugInfo >> "%STRINGCACHE%"
    
      call "%STRINGCACHE%"
    
      IF %EnableLog%==true (set LOGFILE=%APPDATA%\mcp_log.txt) ELSE (set LOGFILE=NUL)
    
      IF %DumpDebugInfo%==true (
    	echo AppData folder: %APPDATA% > "%DEBUGFILE%"
    	echo Temporary data: %MYFILES% >> "%DEBUGFILE%"
    	echo Minecraft binary folder: %MINEBIN% >> "%DEBUGFILE%"
    	echo Configuration file: %CONFIGFILE% >> "%DEBUGFILE%"	
    	echo Log file: %LOGFILE% >> "%DEBUGFILE%"
    	echo Java Portable path: %JAVAPATH% >> "%DEBUGFILE%"
    	echo INI variable cache: %STRINGCACHE% >> "%DEBUGFILE%"
      )
    
      goto :EOF
    
    
    ::-----------
    
    :: EVERYTHING BELOW HERE IS DEPRECATED
    
    :CheckTemp
      echo  Checking temporary data files... >> "%LOGFILE%"
    
      IF NOT EXIST "%APPDATA%\lastdir" (
            echo  - No temporary files found, proceeding as normal >> "%LOGFILE%"
            echo DO NOT REMOVE THIS FILE > "%APPDATA%\lastdir" >> "%LOGFILE%"
            xcopy "%CURRENTDIR%\.minecraft\*.*" "%APPDATA%\.minecraft\*.*" /s /e /c /y > NUL
      ) ELSE (
            echo  - Temporary files found, restoring data >> "%LOGFILE%"
            xcopy "%APPDATA%\.minecraft\*.*" "%CURRENTDIR%\.minecraft\*.*" /s /e /c /y > NUL	
      )
    
      echo  - Done. >> "%LOGFILE%"
      echo. >> "%LOGFILE%"
        goto :EOF
    
    ::------------
    
    :ProcessCheck
    
      echo  Now monitoring Minecraft... >> "%LOGFILE%"
    
      :LoopStart
        ping 1.1.1.1 -n 1 -w 2000 > NUL
        tasklist /FI "IMAGENAME eq javaw.exe" 2>NUL | find /I /N "javaw.exe" >NUL
        if "%ERRORLEVEL%"=="0" goto LoopStart
    
      echo  - Done. >> "%LOGFILE%"
      echo. >> "%LOGFILE%"
       goto :EOF
    
    ::------------
    
    :CleanUp
    
      echo 
    
      echo  - Deleting old files...
       rd "%CURRENTDIR%\.minecraft" /Q /S
      echo  - Restoring data from temporary folder...
       xcopy "%APPDATA%\.minecraft\*.*" "%CURRENTDIR%\.minecraft\*.*" /s /e /c /y > NUL
      echo  - Cleaning up temp folder...
       rd "%APPDATA%" /Q /S
       rd "%MYFILES%" /Q /S
      echo  - Done.
      echo.
      goto :EOF


    I find it really insulting that you didn't bother seeing what Minecraft Portable actually did, but just went off making assumptions.

    @Geographer: There was an accidental client update by Notch, but the .jar file should be the same as 1.2.6. Earlier, though, I found a bug in Java that caused MCFS to patch incredibly slowly when running from a USB (less than 5KB/s). Try copying Minecraft Portable to your HDD, running it once, and then copying it back to your USB.
    mcmapDZ: Simple, lightning-fast interactive web maps.
  • #165
    Just to clarify, this is pretty much another copy of minecraft, right? And any mods and saves are isolated to this application? If I am right, then can you use cartograph or INVedit for this?
    Fibeas are better than ponies.
  • #166
    This is a very useful program. Thanks Notarts.

    I have noticed that this is creating lots of persistent folders in my temp directory in the form $TEMP$\nn.tmp\.minecraft

    Where nn is a number. It seems to make a new one every time I play it and the new path causes my Firewall to prompt me to allow/block access.

    Could you change it so it always stays in the same folder?
  • #167
    @blaze: That's right, each application *should* have it's own set on data files. To run Cartographer, INVedit, etc, just drag-and-drop the application onto minecraftp.exe, and it should be directed to the Minecraft Portable files instead of the default AppData. This doesn't work with all programs, but many now have a custom path option (as is the case with INVedit, I think), so you can point them directly to the files.

    Quote from infraspace »
    This is a very useful program. Thanks Notarts.

    I have noticed that this is creating lots of persistent folders in my temp directory in the form $TEMP$\nn.tmp\.minecraft

    Where nn is a number. It seems to make a new one every time I play it and the new path causes my Firewall to prompt me to allow/block access.

    Could you change it so it always stays in the same folder?

    Thanks for pointing this out :smile.gif:. Looks like it wasn't removing the temporary folders properly. It should be fixed now.
    mcmapDZ: Simple, lightning-fast interactive web maps.
  • #168
    I registered here just so i could talk to you about this program. I really like it. It works great on my USB-stick and even on my second hard-drive. My first drive where windows are is terribly slow and that makes playing Minecraft almost impossible. Now it's possible thanks to you.

    I only have a couple of problems. I tried using portable java with this today, and it wouldn't start when portable java was in the right folder. I tried removing it and got it working again.

    To my other problem. I would like to see what lies inside of the exe-file so i ran it like this "minecraftp.exe -decompile" but nothing happens. Windows just plays an error-sound.

    Thank you for this awesome program.

    Regards// CH
  • #169
    What's MCFS and what's the difference?
    "Caffeine is like violence. If it's not solving your problem, you just aren't using enough of it." -ZeroHero
    "I don’t talk to inanimate objects. I only reply to the text on my computer screen." -Sparkling Limeade
  • #170
    Why do I keep getting an error that says:
    "Unable to access jarfile /minecraft_launcher.jar"`?
    So, who is a Creeper?
    A person who does weird things, like stares at you while you sleep, or looks at you for hours through a window. usually a close friend or relative.
  • #171
    Any news on beta compatibility?
  • #172
    Sorry about the lack of updates. I'm on holidays at the moment and can't really do anything. I'll be back in a few days, so I'll be able to answer questions and update MCP then.

    For the next version, though, I'm considering using MCRegion instead of MCFS.
    mcmapDZ: Simple, lightning-fast interactive web maps.
  • #173
    Quote from Alkalyne »
    This is weird, I've done everything in the steps on my Home computer,
    but when i try to run it from my School Laptop the Lappy loads for 2 seconds and then nothing happens. :Sheep:

    I tried playing on an old laptop and i found that it takes forever for it to get all the ram it needs to use in the game. I got too impatient so i just stopped it. I think your problems are because the laptop is taking much longer than expected to get all of the ram it needs so you think nothing is happening when actually it's setting aside the ram needed.
  • #174
    Hey Guys got a curly question. I hate MCP and javaportable on a thumbstick to use on the computers at work. The issue is i'm not sure how to get MCP to use the java binaries on teh thumbstick. The work computers already have java but an outdated verion of 1.5 that i cannot update. The new Java binaries are in the app data folder in the correct manner i think.... Is there a solution to this or am i just hosed? When i try to run the exe it says that i am running java 1.5 and need to update.
  • #175
    Could the next update possibly include being able to choose the directory it extracts data to,for an unspecified reason involving how our school blocks EXE files normally(We need to run them from a ZIP file directly or a powerpoint,both of which extracts to temp rendering our data inaccessable from anywhere but that computer on the network)
  • #176
    Morning,

    Thank you for this however I am following the instructions as on the OP and nothing seems to happen when I run minecraftp.exe. Not generating any extra files or folders. Am I missing something really obvious? On Windows 7 if that makes a difference.
  • #177
    What can I say? Your a legend!!!

    :Diamond:
  • #178
    Hi, I got this a while ago and kept it on my usb stick.
    Then I downloaded the newer version today and it doesn't start up. And when I go to the older version I can't find the settings file for this. Any ideas what could be wrong?
    My profile picture is property of Culpeo Fox.
    http://culpeo-fox.deviantart.com/
  • #179
    Thanks for this topic!
    Playing a older version of the game without having to downgrade and upgrade my .jar file all the time :biggrin.gif:
  • #180
    Quote from Pure »
    Why do I keep getting an error that says:
    "Unable to access jarfile /minecraft_launcher.jar"`?

    I'm also getting this error. I downloaded the java portable link in the main post and put it in mcp_data/java/. If I remove java portable, it runs fine, but with it it always fails.
  • #181
    Hi there. This is a phenomenal idea as although I can play Minecraft at college, due to %Appdata% obviously being unwritable I can't keep a consistent world. I downloaded this in the hopes I could play my main world at college but every time I try and log in the bar almost fills, the game tells me it's "Done Loading" and it freezes there. What on earth's going on? I could run it the first time but when I closed and reopened it after setting USBmode to true it did this.
  • To post a comment, please or register a new account.
Posts Quoted:
Reply
Clear All Quotes