On Dec 18, 2007 1:25 PM, David King <[EMAIL PROTECTED]> wrote:
>
> > Assuming that Erlang and Yaws are correctly installed and configured:
> > After unzipping the erlyweb-0.6.2.zip file, I see that there are beam
> > files under ebin, but there are also makefiles. Does anything need to
> > be compiled or can the beam files just be put somewhere?
>
> The .beam files will probably just work as is. I have a lib/ directory
> in my project root (that's an svn:externals entry, in my case), like
> this (some extra files listed to get your bearings):
>
> start.sh
> ebin/*.beam (my beams)
> src/*.erl (my source)
> src/components/*.{et,erl}
> www/style.css
> lib/erlyweb/Makefile
> lib/erlyweb/ebin/*.beam (the pre-included beams)
> lib/erlyweb/src/...
Do I understand correctly that you include the beam files for ErlyWeb
in your project? My mental model was that the ErlyWeb beam files
should be stored somewhere that Erlang/Yaws could find them on the
computer running the application. Would you recommend keeping them
with the project instead as a best practice?
What are the pros and cons to this approach?
> Then I launch erl (or yaws) with start.sh that contains (more or less):
>
> --------
> #!/bin/sh
> APPDIR=`pwd`
> FULLPA="-pa $APPDIR -pa $APPDIR/ebin -pa $APPDIR/lib/erlyweb/ebin"
>
> erl $FULLPA
> --------
Looks good. Does an equivalent Windows batch file look similar? I have
a Mac so this should work just fine for me. :-)
> If you plan to re-compile the beam files (for instance, because you
> have Erlang R12B that has a better compiler for the things that
> erlyweb does, like returning largely pre-formed IOlists), then you'll
> need to modify (in the structure above) lib/erlyweb/Emakefile and
> change the first line:
>
> {"src/erlyweb/*", [debug_info, {outdir, "ebin"}, {i,"/opt/local/lib/
> yaws/include"}]}.
>
> Change "/opt/local/lib/yaws/include" to the path to your yaws include
> files (that's the path for a MacPorts install that you won't have to
> change if you're on a Mac and installed Yaws from MacPorts), then do
> "make" in lib/erlyweb/. You may need to remove all of the pre-included
> beams in lib/erlyweb/ebin/ to force it to re-compile if it doesn't
> already.
Ok. I think I follow that. I'll try the first half of your guidance
before attempting to recompile ErlyWeb for myself. I don't use
MacPorts, I'm a download and compile it myself kind of guy most of the
time, except for Erlang stuff, it's still just too different for me
just yet.
> At least that's what I do. You may choose to set it up differently.
I'll try it your way to start with if I can.
The only issue is that I need ErlyWeb installed to run the project
create command in the Music tutorial and your setup has ErlyWeb in the
already created structure. This is a little bit "chicken and egg" for
me. Unless you can assure me that I can just manually create the
project structure and then add the ErlyWeb beam files into it
afterwards.
The joy of new environment confusion! :-)
Simon
--
simonpeter.org | simonpeter.com | newlife-upc.org | wisconsindistrictnews.org
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"erlyweb" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/erlyweb?hl=en
-~----------~----~----~----~------~----~------~--~---