How to install the Greenhouse application on a Windows (7) computer running Sproutcore
(Because everything is obvious until you try to do it.
The information and opinions I provide may not always be accurate but may still be of use to other beginners.)
July 16, 2010 - WARNING
Please note that this Greenhouse installation currently results in an installation that damages your application.
Make sure that you have a copy of your application before trying it with this Greenhouse installation.
This procedure will install Greenhouse and it will start,
BUT Greenhouse does not seem to work properly
AND it damages the application loaded such that the application no longer runs properly after being used by Greenhouse.
I was able to restore the application by deleting the application's "tmp" folder and rerunning.
I am unable to determine if the cause is the installation procedure, the Greenhouse software, the Windows 7 environment or something else.
Pre-requisite
This document assumes that Sproutcore has already been installed following my instructions on How to install the Sproutcore framework on a Windows (7) computer .
Location of the Greenhouse application
The Greenhouse application is part of the Sproutcore source code that is stored on the github site at: http://github.com/sproutit/sproutcore-abbot
Options for transferring the source code to your computer
Although it appears that the source can be extracted in 2 ways by using either the “git” software program or the “Download source” button on the github site, it is only by using the “git” software that the Greenhouse application will properly download and set up.
Installing the git software on Windows
The software can be downloaded from this page: http://code.google.com/p/msysgit/downloads/list
At the time of this writing I picked “Full installer for official Git 1.7.1”
The installation instructions are given here: http://help.github.com/win-git-installation/
For my needs, I ignored the instructions to “generate an SSH keypair” and to “set your local git config” since I will only download the source and not update it.
This installation will generate the following entries in the “All programs” list:
-
-
|
Git
Git Bash
Git GUI
Uninstall Git
|
« Git Bash » will be used to execute the git instructions.
I gave the following answers to the installing requests as they came up.
I do not claim to know that these are the most appropriate but they did work for me.


Transferring the Sproutcore (including Greenhouse) source code to your computer
Start the “Git Bash” program which will pop up a command window like this one:
The instructions to do the “Greenhouse” application transfer are taken from:http://blog.sproutcore.com/post/535950751/introducing-greenhouse and are:
-
|
git clone git://github.com/sproutit/sproutcore-abbot.git abbot
cd abbot
mkdir frameworks
cd frameworks
git clone git://github.com/sproutit/sproutcore.git
cd ../..
|
To reduce typing errors, the commands can be pasted from this document to your command window by doing a right-click on its title bar and selecting “Edit/Paste”.
On a Windows 7 system these instructions will transfer the source code to a directory labeled “abbot” under your specific user directory.
In my case, my specific user directory is located at “C:\Users\myUserName”.
Therefore, for you, the source code will be located at “C:\Users\yourUserName\abbot”.
The “Greenhouse” application will be found at “C:\Users\yourUserName\abbot\frameworks\sproutcore\apps\greenhouse”.
It is importantto know this path in order to use the “Greenhouse” application.
In a Windows XP system the path will be: “C:\Documents and Settings\yourUserName\abbot\...”.
Completing setup for execution
If you installed the “Ruby” software as per my instructions on “How to install Sproutcore on a Windows (7) computer” then you should have the directory “C:\Ruby\bin\” that contains the file “sc-server.bat”.
Copy this file to the directory “C:\Users\yourUserName\abbot\bin\” so that the instructions given by the authors of “Greenhouse” http://blog.sproutcore.com/post/535950751/introducing-greenhouse on how to run the “Greenhouse” application will work.
Running the Greenhouse application
The author’s instructions are:
-
Using “bat" files
I prepare “.bat” files that contain the instructions to set up the sc-server program.
This way I simply have to drag the file and drop it in the command window rather than continuously retype the instructions.
GreenHouse “bat” file content - to run the Greenhouse application
My “GreenHouse sc-server.bat” file contains the following:
-
cd C:\Projects\Sproutcore\Proj\hello_world
-
C:\Users\myUserName\abbot\bin\sc-server
Line 1 makes my “hello_world” application directory the active directory. This is the application that I wish to use with Greenhouse. The location of your “hello_world” directory will be different.
Line 2 executes the sc-server located in the “C:\Users\myUserName\abbot\bin\” directory.
We set this up before in the “Completing setup for execution” step.
HelloWorld “bat” file content - to run the HelloWorld application
My “HelloWorld sc-server.bat” file contains the following:
-
cd C:\Projects\Sproutcore\Proj\hello_world
-
sc-server
Line 1 makes my “hello_world” application directory the active directory. The location of your “hello_world” directory will be different. When I used the “sc-init” command from the “C:\Projects\Sproutcore\Proj\hello_world” directory I ended up with the following structure: “C:\Projects\Sproutcore\Proj\hello_world\apps\hello_world”
Line 2 executes the sc-server located in the “C:\Ruby\bin\” directory. This is the directory normally used when executing Sproutcore applications when following my Sproutcore installation instructions. It is automatically located by the system because it is in the path used by the command prompt.
Execution steps
1-Start the Windows command prompt (I use the shortcut that was installed with “Ruby” and is called “Start command prompt with Ruby”)
2-Drop the Greenhouse “bat” file in the command window and press enter to execute. The “sc-server” is now ready to service the “Greenhouse” application.
3-Open: http://localhost:4020/sproutcore/greenhouse to see the Greenhouse application with “hello_world” as the application it will work on.
4- Save the changes made in Greenhouse.
5- Close the Greenhouse application (optional).
6- Close the command window that is running the “sc-server” for Greenhouse as per step 2.
7- Open a new command window as per step 1.
8- Drop the hello_world “bat” file in the command window and press enter to execute. The “sc-server” is now ready to service the “hello_world” application.
9-Open: http://localhost:4020/hello_world to see the “hello_world” application running.
10 – When ready to make more changes to the “hello_world” application then close the hello_world application (optional).
11- Close the command window that is running the “sc-server” for hello_world as per step 8.
12- Go back to step 1 to restart Greenhouse.
Note: Only one “sc-server” can run at a time therefore only one Sproutcore application can run at a time. Since Greenhouse is a Sproutcore application then it must run by itself.
the end – July 2010
Comments (0)
You don't have permission to comment on this page.