Batch shrink Gamecube games?

Discussion in 'Wii - Hacking' started by VashTS, Sep 29, 2014.

  1. VashTS
    OP

    VashTS Beat it, son

    Member
    3,896
    698
    Mar 14, 2009
    United States
    Upstate NY
    Anyone got any ideas? I'm recovering from a loss and I don't want to do it one by one again :cry: I did that first time around.

    Thanks for any ideas!
     
  2. Gaming4Ever

    Gaming4Ever Banned

    Banned
    486
    94
    May 28, 2014
    United States
    If you are savvy with command lines and batch files, you can use GC ISO Tool via command window as well, there is a .txt file included with it that tells you the switches and such. You could concievably use that to create a batch file that can process an entire folder of ISOs to DiscEx
     
  3. VashTS
    OP

    VashTS Beat it, son

    Member
    3,896
    698
    Mar 14, 2009
    United States
    Upstate NY
    i managed to become totally l33t and I got a batch that will do a specific iso, in this case game.iso.

    anyone experienced with batch know how i can make it do 1 file after another until the directory has been worked?

    so as an example:
    game1.iso
    game number 2.iso
    gamecube game number 3.iso
    wierd name game.iso

    process all of these using discex -c



    seems to be working! BUUUUTT not using -c to shrink it. GRRRRR.

    Code:
    [USER=325063]Echo[/USER] off
    FORFILES /c "discex.exe -c @file"
    
     
  4. grossaffe

    grossaffe GBAtemp Addict

    Member
    2,727
    2,098
    May 5, 2013
    United States
    I added in batch processing support (as well as the ability to compile and run in Linux) to Fix94's gamecubeISOcompress v0.2 some time ago (it was the only shrinking program I could find the source to at the time).

    Maybe if I can find the time in the future, I'll poke around the source code for a more up-to-date iso shrinker
     
  5. VashTS
    OP

    VashTS Beat it, son

    Member
    3,896
    698
    Mar 14, 2009
    United States
    Upstate NY

    That would be cool

    It's really annoying why this damn batch isn't working! I don't understand why the -c is being ignored.

    Tried GCIT but that failed, couldn't get it to run from batch.

    I think i see why its failing in discex, the isos are not named game.iso. Nope, still just fucking stupid as usual, this is why i give up on coding and learning stuff! never works easily the first time around!!!!
     
  6. VashTS
    OP

    VashTS Beat it, son

    Member
    3,896
    698
    Mar 14, 2009
    United States
    Upstate NY
    SCORE!!!

    Code:
    FORFILES /m *.iso /c "cmd /c discex -c @file"
    
    does what i need. why the hell does it need to call a cmd on top of a cmd?!?!?
     
  7. grossaffe

    grossaffe GBAtemp Addict

    Member
    2,727
    2,098
    May 5, 2013
    United States
    I'm not all that familiar with Windows' commands as I work mostly with the Linux terminal, however, I would figure that FORFILES is basically just a for loop for the windows terminal. So basically it iterates through each .iso and runs discex on the file for the current iteration.
     
  8. VashTS
    OP

    VashTS Beat it, son

    Member
    3,896
    698
    Mar 14, 2009
    United States
    Upstate NY
    FORFILES is just that, scans each file and executes a command based on the supplied information.

    /m makes it search for only certain file masks.

    /c is the command...in this batch it executes another command prompt which then runs discex with the -c argument using the next filename in the directory. why it has to be like this is unknown to me but I'm glad I learned this. I think it may come in handy sometimes.
     
  9. grossaffe

    grossaffe GBAtemp Addict

    Member
    2,727
    2,098
    May 5, 2013
    United States
    It has to be done this way because the program itself does not have batch processing built into it, so instead you're running an algorithm in the terminal that runs the program multiple times. Often programs/commands will have the ability to pass in multiple files as arguments and to execute whatever it's supposed to do on all of them, but that appears not to be the case here. It's a bit simpler to write a program that works for a singular file as you can hard-code your program to look at one specific argument instead of adding in extra logic to look at the number of parameters passed after a flag denoting the start of filenames, etc.. It's not all that difficult to add batch processing, but I'm guessing the guys writing these programs are more worried about the program working rather than adding the gloss at the end, hence why most of this stuff is coded for the terminal rather than pretty, user-friendly GUIs.
     
  10. VashTS
    OP

    VashTS Beat it, son

    Member
    3,896
    698
    Mar 14, 2009
    United States
    Upstate NY

    I agree, I've always liked non-fancy apps, the person who wrote the application usually knows what they are doing when not worrying about a gui.

    Here is my batch file to shrink it in case anyone else wants it :) Just put your isos, discex and its .dlls, as well as this bat file all in the same folder and run. working great here.

    http://filetrip.net/dl?zfs4fdDf8f
     
  11. grossaffe

    grossaffe GBAtemp Addict

    Member
    2,727
    2,098
    May 5, 2013
    United States
    Alright, this thread inspired me to take a look again for any open source gamecube iso compression software. As before, the only one available is Fix94's GameCubeISOcompress, although this time I managed to find the source for v 0.3 . I brought in the changes that I made to v 0.2 that added unix support and batch processing, and this time I also made it so that disc 2 will be appropriately named and placed into the same folder as disc 1. If anyone's interested, I can walk them through my code changes, but I'm not going to upload the source as I didn't get permission from Fix94 to distribute derivative work of his code.
     
  12. VashTS
    OP

    VashTS Beat it, son

    Member
    3,896
    698
    Mar 14, 2009
    United States
    Upstate NY

    Awesome job
    !
    I'm already done with my project. The batch process worked great for my needs but I could see how your work would make it just a bit more easy.
     
  13. grossaffe

    grossaffe GBAtemp Addict

    Member
    2,727
    2,098
    May 5, 2013
    United States
    The main purpose for my code is adding in linux support (and I presume it would work for Mac, too) since all the other gamecube iso compression programs out there are Windows only. Adding in the batch support and properly placing/naming disc2 is just a little icing on the top.