electro-smith / pd2dsy

Utility for converting Pure Data (Vanilla) patches to Daisy projects.
GNU General Public License v3.0
77 stars 11 forks source link

FR: support running from any directory and outputting to any directory? #10

Open rhaleblian opened 3 years ago

rhaleblian commented 3 years ago

Hello folks. When devising repeatable patch building from a different repo i found that being able to do the above is helpful and allows for intermediates like the generated code to go to build directories for cleanup etc. Interesting? My fork contains a branch dev that implements something that works for me. It adds --out_dir to allow output relocation. It performs os.chdir() to assure that program-relative paths resolve. One side effect of these changes is enhancing the rewrite of the target Makefile to point to libdaisy no matter where the generated output goes. There are still places where one needs to pass absolute paths to the program (--out_dir being one), but these could be fixed up to allow relative paths to work too.