Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; This replaces the batch files the emu comes with and does it all in ahk instead
- winVer := (InStr(ProgramFiles, "(x86)") ? ("64") : ("32")) ; check if windows is 32 or 64 bit
- javaVer := FileExist(A_WinDir . "\SysWOW64") ; check if java is 32 or 64 bit
- If ( emuBit = "64" && winVer = "32" )
- ScriptError("Unable to run a 64bit Java on a 32bit Windows. Install a 64bit version of Windows first or use a 32bit Java.")
- If ( emuBit = "64" && !javaVer )
- ScriptError("Java 64bit is not installed.")
- javaKey := ("SOFTWARE\" (If javaVer ? ("Wow6432Node\") : ("")) "JavaSoft\Java Runtime Environment") ; if true, we should have java 64bit installed, else 32bit, set appropriate reg location
- RegRead, javaVersion, HKEY_LOCAL_MACHINE, %javaKey%, CurrentVersion ; read java's current version #
- RegRead, javaDir, HKEY_LOCAL_MACHINE, %javaKey%\%javaVersion%, JavaHome ; read java's install location
- javaExe = %javaDir%\bin\java.exe
- IfNotExist, %javaExe%
- ScriptError("Could not find java.exe. Try reinstalling the java version you want to use.")
- If ( emuBit = "32" )
- Run, CMD "%javaExe%", -Xmx%useRAM%m -XX:MaxPermSize=128m -XX:ReservedCodeCacheSize=64m -Djava.library.path=lib/windows-x86 -jar bin/jpcsp.jar `%*, %emupath%, UseErrorLevel
- Else if ( emuBit = "64" )
- Run, "%javaExe%", -Xmx%useRAM%m -XX:MaxPermSize=128m -XX:ReservedCodeCacheSize=64m -Djava.library.path=lib/windows-amd64 -jar bin/jpcsp.jar `%*, %emupath%, UseErrorLevel
- Else
- ScriptError("Please set emuBit to either 32 or 64. This reflects the version of the emulator you want to run")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement