ndstrim 1.27

Discussion in 'NDS - Flashcarts and Accessories' started by Azimuth, Nov 28, 2007.

Nov 28, 2007

ndstrim 1.27 by Azimuth at 10:29 PM (3,394 Views / 0 Likes) 17 replies

  1. Azimuth
    OP

    Member Azimuth Chicken Teriyaki Boy!

    Joined:
    Feb 23, 2006
    Messages:
    637
    Country:
    Canada
    If you don't know what ndstrim is check it out here

    I've been working on a few front-ends for recover's excellent trimmer, the one I have invested most time in is the "daemon".

    The daemon watches a directory for nds files(or 7z, zip and rar archives), when one is dropped into the watch directory it trims it and outputs it to the target directory(which could be your flashcart for example) deleting the original(if you want).


    v 1.27
    -reads input from config file
    -added a few options(save original file, error file creation)
    -made it more OO, was spaghetti code before


    Hmm, this seems tailored to a niche market, *nix users who are proficient in CLI [​IMG]. A small gui is included, it is very bare though.
    Enjoy, any complaints/comments/general bitching are welcomed.

    download
     
  2. Azimuth
    OP

    Member Azimuth Chicken Teriyaki Boy!

    Joined:
    Feb 23, 2006
    Messages:
    637
    Country:
    Canada
    I've been working on the gui but I suck at designing stuff so any tips would help, heres what I've been working on

    [​IMG]
     
  3. Maikel Steneker

    Member Maikel Steneker M3 Fanboy

    Joined:
    May 16, 2007
    Messages:
    3,396
    Country:
    Netherlands
    That "daemon" sounds great! Keep us updated [​IMG]
     
  4. recover

    Member recover GBAtemp Regular

    Joined:
    Aug 6, 2007
    Messages:
    161
    Country:
    Sweden
    Really, Azimuth, this is some very good work! [​IMG]
    Sorry for not helping you so much, my DS is a bit broken and I'm gonna send it in for repair sometime.

    I'm gonna link this thread in the first post in the original thread! [​IMG]

    P.S: Nice that you're keeping the bowser icon [​IMG]
     
  5. Azimuth
    OP

    Member Azimuth Chicken Teriyaki Boy!

    Joined:
    Feb 23, 2006
    Messages:
    637
    Country:
    Canada
    No problem recover, I'm not in a hurry.

    Small update for those of you who are interested, after 2 hours of reading gtk+ manuals and manually coding the gui I've come up with this

    [​IMG]

    Still a long way to go but batch trimming is partially working.

    I've also added gzip and bzip2 support to the daemon, I doubt anyone tars their roms but its there anyway.

    edit: I'll release the source tomorrow, too tired right now.
     
  6. matriculated

    Member matriculated GBAtemp Advanced Fan

    Joined:
    Sep 27, 2007
    Messages:
    598
    Country:
    Canada
    I take it this is Linux only? I'm a little confused because there's a bat file in there but no exe.
     
  7. Azimuth
    OP

    Member Azimuth Chicken Teriyaki Boy!

    Joined:
    Feb 23, 2006
    Messages:
    637
    Country:
    Canada
    There are two parts to ndstrim, the back-end is written in C(by recover) and then there is a GUI and a daemon that I'm working on which use that back-end. Quite confusing I know [​IMG].

    The back-end is cross platform(it being writtenin C and all), you can get the windows binary here. I included trim.bat because it's source code and excluded the .exe because I'm developing on Linux.

    There is no OSX binary at the moment because no one has compiled it for OSX, so if someone can do that it would be appreciated.

    The GUI should be cross platform but you will need to satisfy a few dependencies(Ruby, Ruby/GTK), it's still incomplete so I haven't tested it on other platforms yet.

    I hope that answered your question.

    ----

    In other news, I've almost completed the GUI

    [​IMG]
     
  8. scandal_uk

    Member scandal_uk GBAtemp Regular

    Joined:
    Oct 3, 2005
    Messages:
    165
    Location:
    UK
    Country:
    United Kingdom
    Hi there,

    I made a 10 minute GUI once for NDSTrim using .Net (it was stand-alone as I just copied recover's code into VB). I still use it, but the main feature I like is the filenames being passed to the app as parameters.

    This way I just keep a shortcut in my "send to" menu and the trimmer also renames the roms so that they don't overwrite anything.

    Does your version do this? If so, I'll definitely upgrade as my version doesn't support archived roms!
     
  9. Azimuth
    OP

    Member Azimuth Chicken Teriyaki Boy!

    Joined:
    Feb 23, 2006
    Messages:
    637
    Country:
    Canada
    I'll add command line arguments to the daemon tomorrow, thanks for the suggestion.

    Currently extraction is done externally by calling a variety of programs which are *nix specific. My goal is to use only p7zip for linux and its windows equivalent 7za since they already support extraction of 7z, zip and rar.

    As you can tell I'm not a windows dev and making this work on windows has not been a priority but since a few users have expressed interest I will do my best to make this cross platform.
     
  10. recover

    Member recover GBAtemp Regular

    Joined:
    Aug 6, 2007
    Messages:
    161
    Country:
    Sweden
  11. Azimuth
    OP

    Member Azimuth Chicken Teriyaki Boy!

    Joined:
    Feb 23, 2006
    Messages:
    637
    Country:
    Canada
    I have some free time now so I can finally code this thing properly. I need testers though, anyone interested please PM, Linux only.
     
  12. recover

    Member recover GBAtemp Regular

    Joined:
    Aug 6, 2007
    Messages:
    161
    Country:
    Sweden
    I think I can do some testing [​IMG]
    Running Ubuntu 7.10.
     
  13. Azimuth
    OP

    Member Azimuth Chicken Teriyaki Boy!

    Joined:
    Feb 23, 2006
    Messages:
    637
    Country:
    Canada
    http://ndstrim.googlecode.com/files/ndstrim-1.27.1.tar.bz2

    Install:extract, cd, run sudo ruby setup.rb install.
    Uninstall: cd, run sudo ruby setup.rb uninstall
    depends: ruby, ruby-gnome2.

    This is just to test the installer/uninstaller.

    edit: recover, what license are you distributing ndstrim under?
     
  14. recover

    Member recover GBAtemp Regular

    Joined:
    Aug 6, 2007
    Messages:
    161
    Country:
    Sweden
    As I noted in ndstrim.c, I licensed it under GPLv2.
    I guess we can update later revisions to GPLv3...
    I noticed before that you chose GPLv3 in Google Project Hosting...
     
  15. Azimuth
    OP

    Member Azimuth Chicken Teriyaki Boy!

    Joined:
    Feb 23, 2006
    Messages:
    637
    Country:
    Canada
    How did I miss that...I could go back to GPLv2 in later versions if you don't like v3(many people don't).
     
  16. recover

    Member recover GBAtemp Regular

    Joined:
    Aug 6, 2007
    Messages:
    161
    Country:
    Sweden
    Actually I think I do prefer v3, but everyone is entitled to their own opinion [​IMG]
    I just hadn't authored a GPLv3 program by the time I made ndstrim, so I just copied the header from an old program I made, my newer open source stuff use GPLv3.
    I vote to update later revisions to GPLv3.
     
  17. Azimuth
    OP

    Member Azimuth Chicken Teriyaki Boy!

    Joined:
    Feb 23, 2006
    Messages:
    637
    Country:
    Canada
    done.

    Any plans on extending the trimmer?
     
  18. recover

    Member recover GBAtemp Regular

    Joined:
    Aug 6, 2007
    Messages:
    161
    Country:
    Sweden
    Well.. I guess I can do some stuff with the feedback I received in the original thread.
    Let me see... the basic feature you need the trimmer to provide is to be able to give an output filename, right?
    The thing I think will be most difficult to code is the command line parsing, it would be preferable to give it the ability to handle both single files (which your GUI might use) and multiple files.

    I think the most common syntax for these things are:
    Single file: ndstrim -o kaka-trimmed.nds kaka.nds
    or ndstrim kaka.nds -o kaka-trimmed.nds
    Multiple files: ndstrim kaka.nds blaff.nds blosck.nds
    (forgive the unimaginative filenames. FYI kaka is cookie in Swedish)

    I have never done any advanced command line parsing in C... ever.
    I guess there is no better time to learn it but now. [​IMG]
     

Share This Page