3DNUS - Linux & Mac OS mod

Discussion in '3DS - ROM Hacking, Translations and Utilities' started by wyatt8740, Mar 15, 2017.

  1. wyatt8740
    OP

    wyatt8740 Member

    Newcomer
    21
    22
    Mar 15, 2017
    United States
    That's neither here nor there.
    I've ported 3DNUS (the 3DS CDN software downloader) to run in native mono on linux/unix systems. This means most GNU/Linux distros, Mac OS X, most BSD systems, Solaris, etc. can now run the program, regardless of CPU architecture and regardless of if Wine is installed.

    Note that for non-Windows/Linux i386/Linux amd64 systems, you will have to compile your own version of "make_cdn_cia" and name it accordingly.

    You can download the latest release here:
    https://github.com/wyatt8740/3DNUS/releases

    And the GPLv3 source code here:
    https://github.com/wyatt8740/3DNUS

    I have what led me to do this and a full list of things that made it not portable in this spoiler:
    Backstory

    Old information:
    Old info

    Old releases:
    old releases
    I know that this is my first post here and it reads a little like a rant, sorry about that. I have a history on some IRC channels relating to console development, particularly nesdev, where you will find people to vouch for me if you're concerned about downloading random files from mega.

    I also have fixed tools that should be portable but aren't for linux/OSX in the past (I'm "dragonite trainer" on this forum), in case you want a reference to prior work.
    https://www.pokecommunity.com/showthread.php?p=8058961#post8058961

    Have a screenshot, too.
    [​IMG]
     
    Last edited by wyatt8740, Apr 3, 2017
  2. wyatt8740
    OP

    wyatt8740 Member

    Newcomer
    21
    22
    Mar 15, 2017
    United States
    That's neither here nor there.
    [accidentally doubleposted, can't figure out how to delete this, sorry]
     
    Last edited by wyatt8740, Mar 16, 2017
  3. wyatt8740
    OP

    wyatt8740 Member

    Newcomer
    21
    22
    Mar 15, 2017
    United States
    That's neither here nor there.
    I've updated the app; it now has had the mp3 audio files replaced with silent one second stubs (which I kept in case there's some other esoteric code I wasn't counting on that depends on the MP3's being embedded), drastically reducing the download size from around 10 megabytes to around 2.3 megabytes.

    I also removed the "this app is a development version" warning dialogue (making the app start much faster) and added my name to the credits list in the main window.

    The updated versions are now linked to in the OP.
    [​IMG]
     
    Last edited by wyatt8740, Mar 16, 2017
  4. hobbledehoy899

    hobbledehoy899 Conniption Master

    Member
    2,751
    4,534
    Nov 13, 2015
    United States
    Kernel Version: Linux 4.14.1-2-zen
    Good work! It may not be truly native, but it's much better!
     
  5. wyatt8740
    OP

    wyatt8740 Member

    Newcomer
    21
    22
    Mar 15, 2017
    United States
    That's neither here nor there.
    Thanks.
    I would love to make it closer to native (even if I still rely on mono, which I'd love to get away from in favor of C or something), but for the present (given how much I actually use this tool) I'm satisfied with this solution.

    Windows-only tools tend to infuriate me, especially when written in languages with the potential for cross-platform operability like C# (or other CIL languages).
    At least it doesn't use Windows Presentation Framework. If it had, this "port"/hack would probably have never happened, since mono doesn't really support WPF at all. I'd have just used winetricks to install a MS .NET runtime in the first place, despite the ~600MB overhead from a wineprefix with .NET.
     
    Last edited by wyatt8740, Mar 16, 2017
  6. hobbledehoy899

    hobbledehoy899 Conniption Master

    Member
    2,751
    4,534
    Nov 13, 2015
    United States
    Kernel Version: Linux 4.14.1-2-zen
    Yeah, that always pisses me off.
     
    CuriousTommy likes this.
  7. gnmmarechal

    gnmmarechal Kirigiri > Naoto

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

    Our Patreon
    4,775
    2,907
    Jul 13, 2014
    Portugal
    https://gs2012.xyz
    Well done.
     
    hobbledehoy899 likes this.
  8. wyatt8740
    OP

    wyatt8740 Member

    Newcomer
    21
    22
    Mar 15, 2017
    United States
    That's neither here nor there.
    Thanks again. I saw a notable lack of anyone even asking about making 3DNUS work on Linux, so I did what I could.
     
  9. Dr.Hacknik

    Dr.Hacknik Maniac | Dev | A Fellow (lewd) Megumin

    Member
    1,231
    1,028
    Mar 26, 2014
    United States
    my lewd corner
    And why are you using 2.8? 3.0.1 has been here for a while. Also, I like offering customization. Music was something to be soothing, and is optional. Also, thanks for getting this working in Linux. I'll try it.

    EDIT:

    Also, 2.8's code was sloppy. 3.0.1 is de-bloated and is optimized.
     
    Last edited by Dr.Hacknik, Mar 16, 2017
  10. wyatt8740
    OP

    wyatt8740 Member

    Newcomer
    21
    22
    Mar 15, 2017
    United States
    That's neither here nor there.
    2.8 was the last version I knew to be reliable.
    I will try 3.x as soon as the git clone finishes and I've gotten it to a usable state in WineMono.

    The music was enabled by default in 2.8, and runs on first startup in the setup wizard. it's impossible to launch the program due to about a billion "exception" errors trying to change the system volume.

    If I want soothing music, I personally like to just play my own music.

    Edit: looking at git master now, looks like all the source was moved to the 'old' directory for some reason?
     
    Last edited by wyatt8740, Mar 16, 2017
    gnmmarechal likes this.
  11. wyatt8740
    OP

    wyatt8740 Member

    Newcomer
    21
    22
    Mar 15, 2017
    United States
    That's neither here nor there.
    @Dr.Hacknik it appears to me that the source code is not sorted in the git repo in any logical manner. '3DNUS_Material_Source' does not in fact contain any source code whatsoever, only binaries and a .suo file. There are sources in 'old/' but they appear to be for 2.6.x.

    I'm currently 180 megabytes (!) into downloading the .tar.gz release for 3.0.1 alpha. This repo is HUGE for a supposedly "Light as Air" program.
     
    Last edited by wyatt8740, Mar 16, 2017
    gnmmarechal likes this.
  12. Dr.Hacknik

    Dr.Hacknik Maniac | Dev | A Fellow (lewd) Megumin

    Member
    1,231
    1,028
    Mar 26, 2014
    United States
    my lewd corner
    Strange, I'll send you a zip file instead. Sorry for the inconveniences.
     
  13. wyatt8740
    OP

    wyatt8740 Member

    Newcomer
    21
    22
    Mar 15, 2017
    United States
    That's neither here nor there.
    I'm downloading an old 'release' archive now. Really should be more careful when sorting that source code out though. I'm sure if I jump back a couple commits I'll find it, at any rate

    Sorry if I'm being too hard on you, I'm really not trying to get anyone aggravated.

    300MB in, now, on that .tar.gz.

    I just checked the size of the cloned git repo; it's 1.7 GiB. Hope the tarball isn't that large.

    Edit: ok, the tarball's 338 MiB.
     
    Last edited by wyatt8740, Mar 16, 2017
    Dr.Hacknik likes this.
  14. wyatt8740
    OP

    wyatt8740 Member

    Newcomer
    21
    22
    Mar 15, 2017
    United States
    That's neither here nor there.
    Aaah, I remember why I disabled the EULA now that I'm re-doing everything for 3.x.
    The 'next' button doesn't close the dialogue.

    Also I remember now that I had to remove the debugger visualizer portion because that depends on visual studio.

    AAAND NOPE, the build in the .tar.gz for 3.x is STILL 2.6.
     
  15. Dr.Hacknik

    Dr.Hacknik Maniac | Dev | A Fellow (lewd) Megumin

    Member
    1,231
    1,028
    Mar 26, 2014
    United States
    my lewd corner
    I have PM'd you the Source Zip file mate.

    It is 3.0.1
     
  16. GerbilSoft

    GerbilSoft GBAtemp Addict

    Member
    2,103
    2,341
    Mar 8, 2012
    United States
    I would like to point out that a program that attempts to change the system volume (and isn't e.g. a media player) should be classified as actively user-hostile. Programs should not be changing system settings unless explicitly requested by the user.
     
    gnmmarechal and bayleef like this.
  17. Dr.Hacknik

    Dr.Hacknik Maniac | Dev | A Fellow (lewd) Megumin

    Member
    1,231
    1,028
    Mar 26, 2014
    United States
    my lewd corner
    Wait, what? How's that hostile. That (should be) for only the Media Player. Although, that was a long time ago. I didn't know how to just play an mp3 or wav in a good way. Therefore I used WMPLib.
     
  18. wyatt8740
    OP

    wyatt8740 Member

    Newcomer
    21
    22
    Mar 15, 2017
    United States
    That's neither here nor there.
    Alright, source code received.
    There was a lot more in terms of windows media player calls to comment out in this one, and I must say it took me about two minutes to figure out where the text box was supposed to be.

    But after that (and struggling for about 20 minutes to make the zip library the new version uses compile in mono), it's done, I think. I'll add modded 3.0.1 and source to the OP, as well as the original source for 3.0.1 since it appears it's kind of hard to find.

    [​IMG]
     
    Last edited by wyatt8740, Mar 17, 2017
    julialy and gnmmarechal like this.
  19. schnitz

    schnitz Newbie

    Newcomer
    1
    0
    Sep 17, 2009
    Gambia, The
    Could I also get a link to the working 3.0.1 tarball? Would like to make a .net core compatible commandline version out of this. (Im using linux for 3ds development, but It's a virtual machine without any gui running)
    Also, It seems kind of weird to run a program on linux that emulates a commandline output.

    Edit: Nvm, I guess i can just use the source here that is already cleaned up a bit
     
    Last edited by schnitz, Mar 17, 2017
  20. wyatt8740
    OP

    wyatt8740 Member

    Newcomer
    21
    22
    Mar 15, 2017
    United States
    That's neither here nor there.
    @schnitz: the original unmodified 3.0.1 source is above, in the zip file dr.hacknik sent to me.

    I'd love a command-line version, if you make one!
    Yeah, it is weird to have a command-line app running in wine. I have done this before though, particularly when I used Adobe AIR a while back - I ran the command-line tools in wine.

    I'd make a CLI app myself, but I'm:
    a) relatively lazy (I run an X11 desktop)
    b) not very skilled with C#.
    I'm a regular C programmer at heart. If I look at the code some more and think I get it all, I might do a python port or something, though.

    Note that unless you ditch C# completely you're going to be emulating in the command-line, though; the Mono/.NET runtimes are virtual machines, a lot like Java.
     
    Last edited by wyatt8740, Mar 17, 2017