On 2014-02-25 00:50:55 +0000, Assaf Gordon said:
Hello,
I working on a small program, which I'd like to make publicly available
and easy to distribute,install and use.
I'm trying to figure out the best way to distribute it.
Writing D code is a lot of fun, but it looks like preparing and
packaging it is not so much...
So far, I'm stuck at:
1.
Packaging for source-based distribution (ie a "tarball"):
I couldn't find a working autotools template (only few old discussions),
and so far it seems the best way is writing my own makefile (which I have).
My concern is that the parameters are so different between dmd/gdc/ldc
that I basically force the users to choose one.
I'm also not sure whether it will work on windows or not (I'm
developing on linux). For windows users, would a custom,hand-written
make file just work?
Although "rdmd" is terrific, I would really prefer not to require it
(since it is 'dmd' specific and not free in the FOSS sense).
2.
How complicated it for potential users of the program to install a D compiler?
Based on my humble experience:
dmd: fine, as long as the downloadable binary version works. I tested
only on multiple debians and ubuntus. But it's not free, and it
requires root privileges.
gdc: only source code available, compiling is a bit tricky. After
compilation, it works.
ldc: the pre-compiled version doesn't work on old Ubuntu (10.4) or new
Debian (7). The source code version is messy to compile and I stopped
after couple of tries.
So, it seems, that if a random person (not unix expert) wants to
compiler my program, he/she will not have an easy time doing so.
3.
Distributing Binaries:
Since I already assume source distribution is not friendly, I consider
also making the pre-compiled binaries available for download.
But it looks like it's only possible to compile dynamically-linked binaries.
The only leads I've found are two old bugs:
http://d.puremagic.com/issues/show_bug.cgi?id=6952
http://d.puremagic.com/issues/show_bug.cgi?id=4376
And I couldn't find any better solution (on dlang.org or google).
---
All the above, makes me somewhat reconsider whether D is an optimal
choice: even if my program is useful in theory, it's of no use if very
few people can actually run it.
Are there any suggestions how to deal with these issues ?
Thanks,
-gordon
Have you looked at having dub be your autotool?