понедельник, 15 марта 2010 г.

Faxien/Sinan для Erlang

Для удобной разработки приложений Erlang существуют следующие инструменты:
  • Faxien - система управления пакетами Erlang/OTP
  • Sinan - система сборки


Сначала надо получить faxien-launcher-universal-x.x.x.py c http://code.google.com/p/faxien/

И запустить его:
$ python ./faxien-launcher-universal-0.3.5.py
После установки можно посмотреть справку:
$ ~/lib/erlang/bin/faxien help

Faxien is a powerful package manager for the Erlang language. This
message is the gateway into further Faxien help.

Usage:
faxien help
faxien version
faxien [options|arguments...]

More Help:
faxien help commands: Lists all faxien commands
faxien help <command>: Gives help on an individual command
faxien help examples: Lists example usages of faxien
faxien alias: lists faxien command aliases

Short Examples:
faxien install-release sinan
faxien search yaws
faxien help search
ok

$ ~/lib/erlang/bin/faxien help commands

Commands:
help print help information
search search for remote packages
installed list the packages installed on the local system
describe-app print more information about a specific
application package
install-release install a release package
fetch-release fetch a release package into the specified
directory
install-app install an application package
fetch-app fetch an application package into the specified
directory
publish publish a package to remote repositories
remove-release uninstall a release package
remove-app uninstall an application package
upgrade-release upgrade a release package installed on the
local system
upgrade-all-releases upgrade all the release packages installed on
the local system
upgrade-app upgrade an application package installed on the
local system
upgrade-all-apps upgrade all the application packages installed
on the local system
translate-version translate one version type to another such as
an erts version to an erlang release version
version display the current Faxien version installed on
the local system
diff-config diff the configuration between two installed
versions of a release

Configuration Management Commands:
environment display information about the current Faxien
environment settings.
add-repo add a repo to search for packages in
remove-repo remove one of the repos Faxien is set to search
for packages in
show-repos display the repos Faxien is set to search for
packages in
add-publish-repo add a repo to publish packages to
remove-publish-repo remove one of the repos Faxien is set to
publish to
show-publish-repos display the repos Faxien is set to publish to
set-request-timeout set the timeout faxien uses for requests to
remote repositories
show-request-timeout display the timeout faxien uses for requests to
remote repositories
set-preferred-erts-vsn set the erts vsn faxien will search first
show-preferred-erts-vsn display the erts vsn faxien will search first
ok
Теперь можно поставить Erlang:
$ ~/lib/erlang/bin/faxien ir erl
ir - это install-release

И проверить его:
$ ~/lib/erlang/bin/erl
Erlang R13B04 (erts-5.7.5) [source] [64-bit] [smp:4:4]
[rq:4] [async-threads:0] [hipe] [kernel-poll:false]

Eshell V5.7.5 (abort with ^G)
1> q().
ok
2>
Теперь необходимо установить Sinan:
$ ~/lib/erlang/bin/faxien ir sinan
И проверить:
$ ~/lib/erlang/bin/sinan help
starting server now.
Unable to connect after 0 seconds. Waiting 1 second(s)
Describing tasks ...
release
Creates the *.rel, *.boot and *.script into the <build-area>/realeases/<vsn>
directory. It also builds up a release tar bal into the <build-area>/tar/ directory
depends on: build


clean
Removes the build area and everything underneath
depends on:


shell
Starts an erlang shell with all of the correct paths preset so the developer
can noodle with the code to his hearts content
depends on: build


gen
Generates a buildable default project layout
depends on:


build
Compiles all of the compilable files in the project
depends on: depends


version
Provides sinan server version information
depends on:


test
Runs all of the existing eunit unit tests in the project
depends on: build


dist
Creates an tarball of the distribution including release information.
Check documentation for the dist task for configuration information
depends on: release


depends
Analyzes all of the dependencies in the project and pulls down those that
arn't curently available locally
depends on:


doc
Runs edoc across all sources in the project and outputs it into the build area
depends on: build


help
Provides help information for the available tasks
depends on:


[help] stop


Итог:

Установлены Erlang, Faxien - система управления пакетам и Sinan - система сборки.

Комментариев нет: