<div class="gmail_quote">On 17 November 2011 16:35, Nikola Skoric <span dir="ltr"><<a href="mailto:nskoric@gmail.com">nskoric@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">This is my first serious erlang project, and project structure changes</div>
as I grasp erlang patterns and best practices. I try really hard to<br>
conform to expected structures, and if you have any advice, I'll take<br>
it very seriously :-)<br>
<div class="im"><br>
</div></blockquote><div><br></div><div>Not to worry. I won't pretend to be an expert, but I'll point out general stuff if it's obvious and I'm sure many others will be willing to chime in. Erlang has an excellent and supportive community.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">> why not use reltool.config if you're using reltool<br>
<br>
</div>I started exploring reltool today and for now I have no luck with the<br>
tool, so I didn't commit my .config file to master yet. But you can<br>
see current state of my .config file from previous emails.<br>
<div class="im"><br>
</div></blockquote><div><br></div><div>The config that rebar generates works perfectly well, so you could try using that instead:</div><div><br></div><div><div>{sys, [</div><div> {lib_dirs, []},</div><div> {rel, "egon_server", "0.1",</div>
<div> [kernel, stdlib, sasl]},</div><div> {rel, "start_clean", "",</div><div> [kernel, stdlib]},</div><div> {boot_rel, "egon_server"},</div><div> {profile, embedded},</div>
<div> {excl_archive_filters, [".*"]}, %% Do not archive built libs</div><div> {excl_sys_filters, ["^bin/.*",</div><div> "^erts.*/bin/(dialyzer|typer)"]},</div>
<div> {app, hipe, [{incl_cond, exclude}]},</div><div> {app, sasl, [{incl_cond, include}]}</div><div> ]}.</div><div> </div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">> why are there beams in your src dir that aren't part of the .app resource file?<br>
<br>
</div>You mean "erl files", not "beam files", right? That would be es_tests<br>
and es_releasing, as far as I'm aware. Those are helper modules which<br>
are not intended for production.<br>
<div class="im"><br></div></blockquote><div><br></div><div>I actually "beam files in your ebin" but never mind. :)</div><div><br></div><div>Non-production code should go into a 'test' directory rather than 'src' if possible. If the 'es_releasing' module is part of the build process (rather than the actual application) then there are a few options really. You can have another sub-directory (such as 'build' or whatever) or you can convert such modules to an escript and call them as part of your build process.</div>
<div><br></div><div>If you're using rebar, you can implement custom build behaviours (such as custom commands, pre/post command hooks, etc) as plugins which may reside anywhere and will be automatically compiled from source when required. </div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">
> Try this:<br>
> t4@malachi:erlang-questions $ git clone<br>
> <a href="https://github.com/egon-sim/egon_server.git" target="_blank">https://github.com/egon-sim/egon_server.git</a> && cd egon_server<br>
> t4@malachi:egon_server $ mkdir rel<br>
> t4@malachi:egon_server $ vi rebar.config<br>
<br>
</div>Right, rebar. Yes, I hear rebar is an excellent tool, but<br>
unfortunately, most of the time I code on a WinXP machine without<br>
admin rights and cut off from the Net. Last time I tried compiling it<br>
on this machine, it failed, and I just went with systools, since it<br>
was less trouble. It might be the right time to look into rebar again.<br>
<br>
</blockquote><div><br></div><div>IIRC rebar will work (for the most part) in WinXP. If you get on to the rebar mailing list and let people know what issues you had compiling it, you'll get help very quickly. </div><div>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Thanks for help!<br>
<div class="HOEnZb"><div class="h5"><br></div></div></blockquote><div><br></div><div>np. :)</div></div>