Labs/Bespin/DeveloperGuide/Setup: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
No edit summary
Line 12: Line 12:


*Mercurial  
*Mercurial  
*Python 2.5 or 2.6
'''NOTE FOR LINUX USERS:''' ''If you are running on a Linux system, you will likely need a "python-dev" and "ruby1.8-dev" (on Ubuntu; possibly "python-devel" elsewhere) package installed, if you do not already have it. If you want to build the embedded release, you will want libyaml: the package on Ubuntu is "libyaml-dev".''
'''NOTE FOR MAC USERS:''' ''You will need Xcode installed.''
'''NOTE FOR WINDOWS USERS:''' ''Most Bespin developers are using unix-like platforms. Bespin's server should be able to run on Windows, though. You'll need a C compiler, and you can use Microsoft's free [http://www.microsoft.com/Express/VC/ Visual C++] compiler. As an alternative, you can use [http://www.cygwin.com/ Cygwin] or [http://www.mingw.org/ MinGW] to have a unix-like environment on your Windows system.''
For most people, that's all you'll need. If you need to hack on SproutCore, you'll also need:
Additionally, if you need to hack on SproutCore, you'll need
*Git  
*Git  
*Python 2.5 or 2.6
*Ruby 1.8 or 1.9 (1.9 is faster)
*Ruby 1.8 or 1.9 (1.9 is faster)
*The following RubyGems: <tt>rack jeweler json_pure extlib erubis thor</tt>
*The following RubyGems: <tt>rack jeweler json_pure extlib erubis thor</tt>
Line 23: Line 35:
   <code>gem install thin</code>
   <code>gem install thin</code>


'''NOTE FOR LINUX USERS:''' ''If you are running on a Linux system, you will likely need a "python-dev" and "ruby1.8-dev" (on Ubuntu; possibly "python-devel" elsewhere) package installed, if you do not already have it. If you want to build the embedded release, you will want libyaml: the package on Ubuntu is "libyaml-dev".''
'''NOTE FOR MAC USERS:''' ''You will need Xcode installed.''
'''NOTE FOR WINDOWS USERS:''' ''Most Bespin developers are using unix-like platforms. Bespin's server should be able to run on Windows, though. You'll need a C compiler, and you can use Microsoft's free [http://www.microsoft.com/Express/VC/ Visual C++] compiler. As an alternative, you can use [http://www.cygwin.com/ Cygwin] or [http://www.mingw.org/ MinGW] to have a unix-like environment on your Windows system.''


==Getting Started==
==Getting Started==
Line 46: Line 53:


After running the bootstrap script, please follow the additional instructions that are displayed on the screen.
After running the bootstrap script, please follow the additional instructions that are displayed on the screen.
''Note'': Currently (2009-11-10), Bespin is using a specific branch of SproutCore ("tiki"). <tt>bootstrap.py</tt> will fetch it for you, but if you need to fetch it yourself, invoke <tt>paver install_sproutcore</tt>.


==Starting the development server==
==Starting the development server==

Revision as of 19:57, 23 December 2009

Thanks for downloading the code to the Bespin project. You can easily get Bespin's Python server running on your local Mac or Linux machine (see note about Windows below).

Current Status Note

We are in the middle of a process that we're calling the "Reboot". It's not a rewrite of Bespin, but a major refactoring. The current developer setup process is not as simple as it will ultimately become, and the Bespin that you'll have at the end of it is missing a lot.

Consider this your official warning that there be dragons here.

Prerequisites

You will need the following installed on your system to get Bespin up and running:

  • Mercurial
  • Python 2.5 or 2.6

NOTE FOR LINUX USERS: If you are running on a Linux system, you will likely need a "python-dev" and "ruby1.8-dev" (on Ubuntu; possibly "python-devel" elsewhere) package installed, if you do not already have it. If you want to build the embedded release, you will want libyaml: the package on Ubuntu is "libyaml-dev".

NOTE FOR MAC USERS: You will need Xcode installed.

NOTE FOR WINDOWS USERS: Most Bespin developers are using unix-like platforms. Bespin's server should be able to run on Windows, though. You'll need a C compiler, and you can use Microsoft's free Visual C++ compiler. As an alternative, you can use Cygwin or MinGW to have a unix-like environment on your Windows system.


For most people, that's all you'll need. If you need to hack on SproutCore, you'll also need:

Additionally, if you need to hack on SproutCore, you'll need

  • Git
  • Ruby 1.8 or 1.9 (1.9 is faster)
  • The following RubyGems: rack jeweler json_pure extlib erubis thor
 gem install rack jeweler json_pure extlib erubis thor

Optionally, you may want the thin library, which will improve performance over the default WEBrick.

 gem install thin


Getting Started

Run:

   hg clone http://hg.mozilla.org/labs/bespinclient
   hg clone http://hg.mozilla.org/labs/bespinserver
   cd bespinclient

This will get the Bespin client and Python Bespin server code checked out. The bespinclient/ directory is the "main" directory that you'll use. (See the Using Mercurial article for more detailed instructions on using Mercurial.)

To set up Bespin for the first time, run:

   python bootstrap.py --no-site-packages
 

to get the environment set up. This is built around virtualenv.

After running the bootstrap script, please follow the additional instructions that are displayed on the screen.

Starting the development server

If you are no longer (or not yet) in the virtualenv environment run within the bespinclient directory:

 source bin/activate

To start the server execute:

 paver start

This will start the Bespin backend as well as the Sproutcore server. You can now access the Bespin editor at http://localhost:4020/editor in you browser.

Have fun!

More Documentation

Documentation can be found in the docs directory of "bespinclient".

Contributing to Bespin

For details see:

Labs/Bespin/Contributing