(WIP) SDHelper - Easy SD setup tool

Discussion in '3DS - Homebrew Development and Emulators' started by Somebody Whoisbored, Jan 12, 2017.

  1. Somebody Whoisbored
    OP

    Somebody Whoisbored it's all okeydokey

    Member
    478
    166
    May 12, 2016
    United States
    hypeland
    Beta 3 is released!
    Check it out here.
    Help would be appreciated.

    What is this?
    This tool allows for automatic downloading of installer files. An XML file defines what to download and puts it all in one directory. This can be used for even quicker A9LH installations, as it would download all the files, all at once. All you would do is press start, then copy all the files to your SD card (theoretically). That's it.
    How To Use
    • Put download.xml in the same directory as the jar file. Example in repo (update/download.xml)
    • Open jar
    • Enter your 3DS info
    • Press start
    • All files will be in /SDHelper/sd
    Features
    • XML based download configurations
    • Auto-updating XMLs
    • Binary version control
    • If statements to get input from user. Includes:
      • Region
      • Version
      • Type (New/Old)
    • Support for downloading
      • Direct downloads
      • Zip files
      • 7zip files
      • Web links (Opens in default browser)
    • Renaming of files downloaded
    • Little error handling (Yay)
    Release Goals
    • Error handling (cuz its important)
    • GUI Enhancements
      • Allow for user input to be used for if statements
    • Better if statements
      • Handle multiple regions in one statement
    Future Goals
    • Even more GUI stuff!
      • XML requests user input and allows it to be used in if statements
      • XML picker (not hardcoded path)
      • Maybe progress bar be the total progress and not progress of current file?
    • Native support for torrents
    [​IMG] [​IMG]
     
    Last edited by Somebody Whoisbored, Jan 21, 2017
    Coc4tm, satan89, felixsrg and 6 others like this.


  2. maorninja

    maorninja GBAtemp Fan

    Member
    483
    273
    Feb 7, 2016
    United States
    You do realise you could have just edited your old post, right?
     
  3. Jayro

    Jayro MediCat DVD and Mini Windows 10 Developer

    Member
    GBAtemp Patron
    Jayro is a Patron of GBAtemp and is helping us stay independent!

    Our Patreon
    4,738
    2,492
    Jul 23, 2012
    United States
    Octo Canyon
    Thanks for updating the OP with more information and a screenshot, looks great! :)
     
    Last edited by Jayro, Jan 12, 2017
  4. Somebody Whoisbored
    OP

    Somebody Whoisbored it's all okeydokey

    Member
    478
    166
    May 12, 2016
    United States
    hypeland
    That is in the GitHub, but yea I'll do that real quick.

    Yea probably. Too late now!
     
    Last edited by Somebody Whoisbored, Jan 12, 2017
  5. ZeroManArmy

    ZeroManArmy Member

    Newcomer
    21
    2
    Jan 7, 2017
    United States
    This should help make installing CFW for people who can't follow directions easier. Thanks!
     
    Last edited by ZeroManArmy, Jan 12, 2017
  6. Somebody Whoisbored
    OP

    Somebody Whoisbored it's all okeydokey

    Member
    478
    166
    May 12, 2016
    United States
    hypeland
    That face when the upcoming post has more views than the release post.
     
    Jayro likes this.
  7. Jaggred

    Jaggred Member

    Newcomer
    31
    8
    Jan 5, 2017
    United States
    any download link? not to source code?
     
  8. Somebody Whoisbored
    OP

    Somebody Whoisbored it's all okeydokey

    Member
    478
    166
    May 12, 2016
    United States
    hypeland
    It's in the GitHub releases.
     
  9. Jaggred

    Jaggred Member

    Newcomer
    31
    8
    Jan 5, 2017
    United States
    Dont work for me.
    Select 11.2.0.35, EUR, New3DSXL,
    pressed Start, progress bar start to swing from left to right and status message Nothing is happening
     
  10. Somebody Whoisbored
    OP

    Somebody Whoisbored it's all okeydokey

    Member
    478
    166
    May 12, 2016
    United States
    hypeland
    What OS are you running? There are known problems with Linux and its untested with Mac
     
  11. Jaggred

    Jaggred Member

    Newcomer
    31
    8
    Jan 5, 2017
    United States
    Windows 10 x64
     
  12. Somebody Whoisbored
    OP

    Somebody Whoisbored it's all okeydokey

    Member
    478
    166
    May 12, 2016
    United States
    hypeland
    Run the program from the command prompt and check the stack trace.
    java -jar SDHelper.jar
     
  13. Jaggred

    Jaggred Member

    Newcomer
    31
    8
    Jan 5, 2017
    United States
    Code:
    No download.xml detected.
    Error readingD:\Download\download.xml
    This should popup, or download from git on its own

    When downloaded file download.xml ive got:

    Code:
    Failed to get update xml! Reason: Error on line 45 of document file:/D:/Download/download.xml: Attribute name "data-pjax-transient" associated with an element type "meta" must be followed by the ' = ' character.
    Scanning dir: download
    Scanning dir: sd
    Error readingD:\Download\download.xml
    org.jdom2.input.JDOMParseException: Error on line 45 of document file:/D:/Download/download.xml: Attribute name "data-pjax-transient" associated with an element type "meta" must be followed by the ' = ' character.
            at org.jdom2.input.sax.SAXBuilderEngine.build(SAXBuilderEngine.java:228)
            at org.jdom2.input.sax.SAXBuilderEngine.build(SAXBuilderEngine.java:277)
            at org.jdom2.input.sax.SAXBuilderEngine.build(SAXBuilderEngine.java:264)
            at org.jdom2.input.SAXBuilder.build(SAXBuilder.java:1116)
            at com.shadowninja108.interpret.Interpreter.<init>(Interpreter.java:74)
            at com.shadowninja108.main.Frame$StartAction.actionPerformed(Frame.java:320)
            at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
            at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
            at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
            at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
            at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
            at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
            at java.awt.Component.processMouseEvent(Unknown Source)
            at javax.swing.JComponent.processMouseEvent(Unknown Source)
            at java.awt.Component.processEvent(Unknown Source)
            at java.awt.Container.processEvent(Unknown Source)
            at java.awt.Component.dispatchEventImpl(Unknown Source)
            at java.awt.Container.dispatchEventImpl(Unknown Source)
            at java.awt.Component.dispatchEvent(Unknown Source)
            at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
            at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
            at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
            at java.awt.Container.dispatchEventImpl(Unknown Source)
            at java.awt.Window.dispatchEventImpl(Unknown Source)
            at java.awt.Component.dispatchEvent(Unknown Source)
            at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
            at java.awt.EventQueue.access$500(Unknown Source)
            at java.awt.EventQueue$3.run(Unknown Source)
            at java.awt.EventQueue$3.run(Unknown Source)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
            at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
            at java.awt.EventQueue$4.run(Unknown Source)
            at java.awt.EventQueue$4.run(Unknown Source)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
            at java.awt.EventQueue.dispatchEvent(Unknown Source)
            at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
            at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
            at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
            at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
            at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
            at java.awt.EventDispatchThread.run(Unknown Source)
    Caused by: org.xml.sax.SAXParseException; systemId: file:/D:/Download/download.xml; lineNumber: 45; columnNumber: 89; Attribute name "data-pjax-transient" associated with an element type "meta" must be followed by the ' = ' character.
            at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
            at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(Unknown Source)
            at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
            at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
            at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(Unknown Source)
            at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanAttribute(Unknown Source)
            at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
            at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
            at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
            at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)
            at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
            at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
            at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
            at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
            at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
            at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
            at org.jdom2.input.sax.SAXBuilderEngine.build(SAXBuilderEngine.java:217)
            ... 42 more
    Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
            at com.shadowninja108.interpret.Interpreter.<init>(Interpreter.java:80)
            at com.shadowninja108.main.Frame$StartAction.actionPerformed(Frame.java:320)
            at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
            at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
            at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
            at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
            at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
            at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
            at java.awt.Component.processMouseEvent(Unknown Source)
            at javax.swing.JComponent.processMouseEvent(Unknown Source)
            at java.awt.Component.processEvent(Unknown Source)
            at java.awt.Container.processEvent(Unknown Source)
            at java.awt.Component.dispatchEventImpl(Unknown Source)
            at java.awt.Container.dispatchEventImpl(Unknown Source)
            at java.awt.Component.dispatchEvent(Unknown Source)
            at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
            at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
            at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
            at java.awt.Container.dispatchEventImpl(Unknown Source)
            at java.awt.Window.dispatchEventImpl(Unknown Source)
            at java.awt.Component.dispatchEvent(Unknown Source)
            at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
            at java.awt.EventQueue.access$500(Unknown Source)
            at java.awt.EventQueue$3.run(Unknown Source)
            at java.awt.EventQueue$3.run(Unknown Source)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
            at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
            at java.awt.EventQueue$4.run(Unknown Source)
            at java.awt.EventQueue$4.run(Unknown Source)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
            at java.awt.EventQueue.dispatchEvent(Unknown Source)
            at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
            at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
            at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
            at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
            at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
            at java.awt.EventDispatchThread.run(Unknown Source)
     
  14. Somebody Whoisbored
    OP

    Somebody Whoisbored it's all okeydokey

    Member
    478
    166
    May 12, 2016
    United States
    hypeland
    Do you have a download.xml?
    Once you download it from the repo, you won't have to download it again. And yes a pop up would be good.
     
    Last edited by Somebody Whoisbored, Jan 12, 2017
  15. Somebody Whoisbored
    OP

    Somebody Whoisbored it's all okeydokey

    Member
    478
    166
    May 12, 2016
    United States
    hypeland
    Sorry for the late reply. Seems JDOM isn't reading the XML correctly. Try redownloading the XML.


    Also, send the contents of download.xml.
     
    Last edited by Somebody Whoisbored, Jan 12, 2017
  16. Somebody Whoisbored
    OP

    Somebody Whoisbored it's all okeydokey

    Member
    478
    166
    May 12, 2016
    United States
    hypeland
    Beta 2 released! I managed to salvage and recover from a stupid data loss! Go update!
     
  17. pietempgba

    pietempgba GBAtemp Advanced Fan

    Member
    812
    132
    Jun 9, 2016
    United States
    I kind of fixed your download.xml

    download.xml
     
  18. Somebody Whoisbored
    OP

    Somebody Whoisbored it's all okeydokey

    Member
    478
    166
    May 12, 2016
    United States
    hypeland
    Oh I see now!
    Thank you very much! I'll push this to a new XML update after I run it myself.
     
    Last edited by Somebody Whoisbored, Jan 14, 2017
  19. pietempgba

    pietempgba GBAtemp Advanced Fan

    Member
    812
    132
    Jun 9, 2016
    United States
    I just made another one it downloads everything except for the torrents and I found a luma build that is in a zip file it can't download the otherapp payload yet and it can download soundhax also for JPN and EUR

    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <root>
       <general>
          <name>Test File</name>
          <author>shadowninja108</author>
          <version>2</version>
          <binaryversion>2</binaryversion>
       </general>
       <downloads>
          <global>
    
            <link type="zip">
                <value>http://smealum.github.io/ninjhax2/starter.zip</value>
                <path>/</path>
                <extract>starter/</extract>
            </link>
    
            <link type = "direct">
                <value>https://github.com/TiniVi/safehax/releases/download/r18/safehax.3dsx</value>
                <path>3ds/safehax/safehax.3dsx</path>
            </link>
    
            <link type = "direct">
                <value>https://github.com/TiniVi/safehax/releases/download/r18/safehax.smdh</value>
                <path>3ds/safehax/safehax.smdh</path>
            </link>
    
            <link type = "direct">
                <value>https://github.com/nedwill/fasthax/releases/download/v1.0.1/fasthax.3dsx</value>
                <path>3ds/fasthax/fasthax.3dsx</path>
            </link>
    
        <link type = "zip">
                <value>https://github.com/d0k3/Decrypt9WIP/releases/download/20161113/Decrypt9WIP-20161113-135126.zip</value>
                <path>safehaxpayload.bin</path>
                <extract>Decrypt9WIP.bin</extract>
            </link>
    
        <link type = "zip">
                <value>https://github.com/d0k3/Decrypt9WIP/releases/download/20161113/Decrypt9WIP-20161113-135126.zip</value>
                <path>d9logo.bin</path>
                <extract>d9logo.bin</extract>
            </link>
    
        <link type = "zip">
          <value>https://github.com/yellows8/hblauncher_loader/releases/download/v1.2/hblauncher_loader_v1.2.zip</value>
          <path>cias/hblauncher_loader.cia</path>
            <extract>hblauncher_loader.cia</extract>
          </link>
    
          <link type = "direct">
            <value>https://github.com/Steveice10/FBI/releases/download/2.4.7/FBI.cia</value>
            <path>cias/FBI.cia</path>
        </link>
    
        <link type = "direct">
          <value>https://github.com/Hamcha/lumaupdate/releases/download/v1.4.2/lumaupdater.cia</value>
          <path>cias/lumaupdater.cia</path>
        </link>
    
          <link type = "zip">
            <value>https://github.com/d0k3/GodMode9/releases/download/v0.9.2/GodMode9-20161226-172816.zip</value>
            <path>luma/payloads/up_GodMode9.bin</path>
          <extract>GodMode9.bin</extract>
        </link>
    
        <link type = "zip">
          <value>https://github.com/d0k3/Hourglass9/releases/download/v1.35/Hourglass9-20161113-140904.zip</value>
          <path>luma/payloads/start_Hourglass9.bin</path>
        <extract>Hourglass9.bin</extract>
      </link>
    
      <link type = "direct">
        <value>https://github.com/Cruel/DspDump/releases/download/1.0/DspDump.3dsx</value>
        <path>3ds/DspDump.3dsx</path>
      </link>
    
      <link type = "zip">
        <value>https://astronautlevel2.github.io/Luma3DS/builds/Luma-1eb18c17.zip</value>
        <path>arm9loaderhax.bin</path>
          <extract>out/arm9loaderhax.bin</extract>
    </link>
    
          </global>
    
          <if type="NEW" region="USA">
             <command>
                <link type = "direct">
                    <value>https://github.com/nedwill/soundhax/blob/master/soundhax-usa-n3ds.m4a?raw=true</value>
                    <path>soundhax-usa-n3ds.m4a</path>
                </link>
             </command>
          </if>
    
          <if type="OLD" region="USA">
             <command>
                <link type = "direct">
                    <value>https://github.com/nedwill/soundhax/blob/master/soundhax-usa-o3ds.m4a?raw=true</value>
                    <path>soundhax-usa-o3ds.m4a</path>
                </link>
             </command>
          </if>
    
          <if type="NEW" region="EUR">
             <command>
                <link type = "direct">
            <value>https://github.com/nedwill/soundhax/blob/master/soundhax-eur-n3ds.m4a?raw=true</value>
            <path>soundhax-eur-n3ds.m4a</path>
          </link>
             </command>
          </if>
    
          <if type="OLD" region="EUR">
             <command>
                <link type = "direct">
            <value>https://github.com/nedwill/soundhax/blob/master/soundhax-eur-o3ds.m4a?raw=true</value>
            <path>soundhax-eur-o3ds.m4a</path>
          </link>
             </command>
          </if>
    
          <if type="NEW" region="JPN">
             <command>
                <link type = "direct">
            <value>https://github.com/nedwill/soundhax/blob/master/soundhax-usa-n3ds.m4a?raw=true</value>
            <path>soundhax-jpn-n3ds.m4a</path>
          </link>
             </command>
          </if>
    
          <if type="OLD" region="JPN">
             <command>
                <link type = "direct">
            <value>https://github.com/nedwill/soundhax/blob/master/soundhax-usa-o3ds.m4a?raw=true</value>
            <path>soundhax-jpn-o3ds.m4a</path>
          </link>
             </command>
          </if>
    
       </downloads>
    </root>
    
     
    Last edited by pietempgba, Jan 14, 2017
    Somebody Whoisbored likes this.
  20. Somebody Whoisbored
    OP

    Somebody Whoisbored it's all okeydokey

    Member
    478
    166
    May 12, 2016
    United States
    hypeland
    Thank you so much! I'll be committing this ASAP! I will also include your name as the author. I had planned to do this but never got around to it, so that saved me a huge hassle. Thanks again