First off, lemme compliment BenJeremy on the coolest dashboard ever. I'm especially impressed with the usefulness of the context menus. Even just using the current, non-WIP version we can already do more with this dashboard than with anything else.
This is working, at least on my box, in most cases. I've had problems with what I believe is its failing to read bad media that don't appear to be fixable without exception handling. I've also had problems on some retail games (which this should hypothetically copy, though I haven't had much success of yet) with detecting gamesize (which is why I've got an option to skip if 0) and with getting the math to work out. Try this on a multigame, and tell me if the remaining space it predicts is right or not. I've tried dividing by both 1000000 and 1024*1024, but it doesn't come out right either way. Also, filepath is currently set at f:\HDDLoaderSomething, with something being selectable by the user from three options: MXM_entry.xml title, XBE title, and game directory title. User will get more control once I've got ahold of a non-WIP virtual keyboard and/or the highly-anticipated next version.
![Smiley :)](https://forums.xboxscene.org/Smileys/xs/smiley.gif)
Last, this needs to be in a context menu to work. It relies a lot on the variables that it inherits by being in one. That said, knock yourselves out.
![Smiley :)](https://forums.xboxscene.org/Smileys/xs/smiley.gif)
CODE |
:begin BeginDraw UseCurrent MessageBox "Checking game size . . ." EndDraw Setfunc GameSize FILESIZE %_GameDir% IF# %GameSize% == 0 GOTO SkipSpaceCheck Set TmpA $ShortDriveFFree$ Setfunc TmpB LENGTH %TmpA% Sub TmpB 3 Setfunc TmpC RIGHT %TmpB% %TmpA% Setfunc TmpD LENGTH %TmpC% Sub TmpD 7 Setfunc TmpE LEFT %TmpD% %TmpC% Setfunc NetSpace REPLACE "," "" %TmpE% Set SmallGame %GameSize% Div SmallGame 1000000 Sub NetSpace %SmallGame% BeginDraw UseCurrent MessageBox "This will install %_GameTitle%.$eol$$ShortDriveFFree$$eol$Game Size: %SmallGame%$eol$Net Free Space: %NetSpace%$eol$Press A to Continue$eol$Press B to Cancel" EndDraw GOTO Step0
:SkipSpaceCheck BeginDraw UseCurrent MessageBox "This will install %_GameTitle%.$eol$Press A to Continue$eol$Press B to Cancel" EndDraw
:Step0 Input If %_GP_A% == "1" GOTO Step1 If %_GP_B% == "1" GOTO End QUIT
:Step1 Setfunc DirLen LENGTH %_GameDir% SUB DirLen 3 Setfunc DirName RIGHT %DirLen% %_GameDir% Setfunc XBT XBETITLE %_GameDir%\default.xbe
BeginDraw UseCurrent MessageBox "Install to:$eol$A: F:\\HDDLoader\\%_GameTitle%$eol$B: F:\\HDDLoader\\%DirName%$eol$X: F:\\HDDLoader\\%XBT%" EndDraw
Input If %_GP_B% == "1" GOTO Dir If %_GP_A% == "1" GOTO Title If %_GP_X% == "1" GOTO XBT QUIT :Dir Set NewPath %DirName% GOTO Step2
:Title Set Newpath %_GameTitle% GOTO Step2
:XBT Set Newpath %XBT% GOTO Step2
:Step2 Setfunc DirIs FILEEXISTS f:\HDDLoader\%NewPath% If# %DirIs% == 1 GOTO DirExists
MkDir f:\HDDLoader\%NewPath% BeginDraw UseCurrent Messagebox "Copying..." EndDraw Copy %_GameDir% "F:\\HDDLoader\\%NewPath%"
BeginDraw UseCurrent Messagebox "Copy complete." EndDraw Delay 3
BeginDraw UseCurrent MessageBox "%_GameTitle% is installed to F:\\HDDLoader\\%NewPath%$eol$" EndDraw Delay 3
attr F:\HDDLoader\%NewPath% rw
BeginDraw UseCurrent MessageBox "Reset Menu Cache?$eol$A: Yes$eol$B: No" EndDraw
Input If %_GP_A% == "1" GOTO Cache GOTO AskRB
:Cache ResetMenuCache GOTO AskRB
:AskRB
BeginDraw UseCurrent MessageBox "Reboot?$eol$A: Yes$eol$B: No" EndDraw
Input If %_GP_A% == "1" GOTO RB QUIT
:RB Reboot QUIT
:DirExists BeginDraw UseCurrent MessageBox "F:\\HDDLoader\\%NewPath% exists.$eol$Please choose another option." EndDraw Delay 3 GOTO Step1
:End QUIT
|