Docstoc

Installing CD++Builder

Document Sample
Installing CD++Builder Powered By Docstoc
					CARLETON UNIVERSITY




   Installing CD++Builder

                      Gabriel Wainer




                                       2010
Content
Prerequisites ........................................................................................................................................... 4
Installation packages............................................................................................................................... 4
1 – Installing CD++ for Eclipse 3.3 Installer ............................................................................................. 5
       1.      Welcome ................................................................................................................................. 5
       2.      License..................................................................................................................................... 6
       3.      Information ............................................................................................................................. 6
       4.      Installation directory ............................................................................................................... 7
       5.      Java.......................................................................................................................................... 7
       6.      Cygwin ..................................................................................................................................... 8
       7.      Eclipse ..................................................................................................................................... 9
       8.      CD++ Builder ......................................................................................................................... 10
       9.      Blender and Python .............................................................................................................. 10
       10.        Installation Complete ........................................................................................................ 11
       11.        After installation tasks ...................................................................................................... 12
2 – Installing Eclipse 3.5.2 with CD++Builder 2.0 .................................................................................. 19
   Option I – Downloading a Full Version of CD++Builder .................................................................... 19
   Option II - Installing from the update manager ................................................................................ 20
   Updating Eclipse................................................................................................................................ 25
   Configure Eclipse Automatic Updates .............................................................................................. 25
Launching CD++ Builder ........................................................................................................................ 26
   Adding included examples into the workspace ................................................................................ 29




                                                                                                                                                             2
Figure 1 Downloading the software........................................................................................................ 5
Figure 2 Welcome page .......................................................................................................................... 6
Figure 3 License page .............................................................................................................................. 6
Figure 4 Information page Acess to the user Guide ............................................................................... 7
Figure 5 Choose the installation directory .............................................................................................. 7
Figure 6 A JVM has been detected ......................................................................................................... 8
Figure 7 Cygwin installation .................................................................................................................... 9
Figure 8 Eclipse 3.1 installation............................................................................................................. 10
Figure 9 CD++Builder plug-in installation ............................................................................................. 10
Figure 10 Blender and Python installation............................................................................................ 11
Figure 11 End of installation ................................................................................................................. 11
Figure 12 Finish page ............................................................................................................................ 12
Figure 13 System Properties ................................................................................................................. 12
Figure 14 Environment Variables : Path ............................................................................................... 13
Figure 15 Edit System Variables ............................................................................................................ 13
Figure 16 Change tmp Properties ......................................................................................................... 14
Figure 17 cygdrive checking .................................................................................................................. 18
Figure 18 Downloading the software.................................................................................................... 19
Figure 19 After unzipping Eclipse with CD++Builder 2.0 ..................................................................... 20




                                                                                                                                                    3
Installing CD++Builder
After you have completed installing CD++Builder 2.0 following the steps in this section you can
perform the steps in Launching CD++ Builder.

If you find any problem installing or using CD++Builder you can report it using the Bug Tracker.
Please verify the issue is not already reported before submitting a new one.


Prerequisites
CD++Builder depends on the following software packages:

        1.   Java 1.6 Runtime Environment
        2.   Java JDK 6
        3.   Cygwin
        4.   Eclipse 3.5.1
        5.   Blender
        6.   Python

To install these software dependencies, read the following section.


Installation packages
The easiest way to install and correctly configure CD++Builder 2.0 and its dependencies is using the
following installation packages:

    1. (351MB) CD++ for Eclipse 3.3 installer:
       http://www.sce.carleton.ca/faculty/wainer/CD++BuilderSetup.exe
    2. (290MB) Eclipse 3.5.2 with CD++Builder 2.0:
       http://sourceforge.net/projects/cdppbuilder/files/ (You must click on the green button to
       start the download)




                                                                                                       4
                         Figure 1 Downloading the software



CD++ for Eclipse 3.3 installer (CD++BuilderSetup.exe) installs and configures all CD++Builder
prerequisites. Eclipse 3.5.2 with CD++Builder 2.0 contains an Eclipse version with the latest
CD++Builder plugin installed.

For instruction on how to install these software packages, read the following sections:

         1 – Installing CD++ for Eclipse 3.3 Installer will instruct and correctly configure you on how
         to install all CD++Builder 2.0 prerequisites.
        2 – Installing Eclipse 3.5.2 with CD++Builder 2.0 will instruct you on how to install Eclipse
         with CD++Builder 2.0.

If you have and already running version of Eclipse 3.5.2 and all prerequisites already configured, you
can install CD++Builder 2.0 from the Update Manager. For installing CD++Builder from the Update
Manager read section Option II - Installing from the update manager.


1 – Installing CD++ for Eclipse 3.3 Installer

Before you begin installing CD++ for Eclipse 3.3, make sure you uninstall all java versions on your
machine. CD++Builder 2.0 depends on Java 1.6, and it will not be installed if older versions of Java
are already installed.

To install all prerequisites of CD++Builder 2.0, you must double click the CD++BuilderSetup.exe you
downloaded from http://www.sce.carleton.ca/faculty/wainer/CD++BuilderSetup.exe. The following
steps will guide you thought the installer. Remember that after completing the installation wizard
you need to complete the After installation tasks.

1.       Welcome


When you launch CD++Builder Toolkit installer, a welcome page appears, as it is shown on
figure 2:




                                                                                                           5
                                      Figure 2 Welcome page

Click “Next” to install CD++Builder or “Cancel” to stop and exit.
2.     License
Once the welcome page agreed, the installer shows a License Agreement. Click on the “I
Agree” or “Cancel” buttons.




                                       Figure 3 License page

3.      Information

The information page (figure 4) presents the tools that will be installed on the machine for
running CD++Builder. You can access to a shorter version of this user installation guide by
letting checked the check-box called “View Installation Guide” (available in case you did not

                                                                                           6
download this document). In that case, when you click on the “Next” button, the installation
guide will be open (you need software able to read “*.pdf” files, like Adobe Acrobat reader).




                           Figure 4 Information page Acess to the user Guide




4.     Installation directory
By default (and it’s strongly recommended to install CD++Builder Toolkit) the installation
directory that is chosen is the root of the local drive “C:” (figure 5). You can also choose a
specific installation directory by clicking on the “…” button (although some users have
reported bugs when non-default choices are taken). Keep in mind that the path name you
choose must not contain any space characters due to constraints related to the Cygwin
libraries used by CD++. Once you have chosen the folder, you must click “Install”.




                                Figure 5 Choose the installation directory

5.     Java


                                                                                            7
Now, the installer will check if a Java Virtual Machine is already available in your machine.
An information dialog window appears if a JVM is detected (cf. figure 6), otherwise JDK 1.6
will be installed. Note that is you have an older version of JVM you must first uninstall it,
otherwise JDK 1.6 won't be installed.




                                   Figure 6 A JVM has been detected

In order to install the Java Virtual Machine:
1. Accept the License Agreement, and click Next.
2. Wait, while the Java installer is running. It could take several minutes.
3. A new window appears. Click Next.
4. Wait, while the Java installer is running. It could take several minutes.
5. Click Finish. The installation will now proceed.

After installing Java, you have to delete MANUALY the installer in “C:\jdk-6u7 windows-i586-
p.exe” (or in the installation directory you chose in step 4).
6.     Cygwin

Now, the installer will attempt to install Cygwin (figure 7). If Cygwin is already installed in
your computer, delete the current installation (go to c:\cygwin – or the folder where you
had originally installed it – and completely delete it from your computer). Cancel the
installation and restart, reinstalling Cygwin from scratch using the procedure described
following.




                                                                                             8
                                      Figure 7 Cygwin installation

Now, a version of Cygwin preconfigured for CD++Builder will be installed (when asked
where to extract the files, choose the default: Extract to c:\cygwin\). ONLY USE THIS
VERSION OF CYGWIN, AND REMEMBER TO FOLLOW ALL THE STEPS IN SECTION After
installation tasks to correctly configure Cygwin.

For information on Cygwin is please visit http://www.cygwin.com

Notice: only use the Cygwin version included in the CD++Builder package, which will compile
the CD++ code properly.
7.      Eclipse
Now, the installer will ask to install Eclipse (the version will differ depending on the installer
you downloaded).

This step will install Eclipse in the installation folder you selected (for example c:\eclipse),
which makes use of the CD++ version #1 (see CD++ Versions in the wiki). This Eclipse folder MUST
be deleted or renamed after installation has completed, as a new version will be installed on
section 2 – Installing Eclipse 3.5.2 with CD++Builder 2.0, which makes use of the CD++ version
#3 (see CD++ Versions in the wiki).




                                                                                                9
                                     Figure 8 Eclipse 3.1 installation

If you click “Yes”, the installer will place Eclipse in the folder that has been chosen on step 4
“Installation directory”.
8.      CD++ Builder
At this step, the installer will ask you to install CD++Builder plug-in for Eclipse (figure 9). Click
“yes” to install it.




                                 Figure 9 CD++Builder plug-in installation

9.      Blender and Python
You are now asked to install Blender 2.43 and Pyton 2.4.4 (figure 10). Blender can be used
to build 3D visualization, and a Python interpreter is needed to animate the results. By
clicking “Yes” you will launch the installer for each of them.


                                                                                                  10
                               Figure 10 Blender and Python installation



After installing Python, you have to delete MANUALY the installer presents in “C:\python-
2.4.4.msi” (or in the installation directory you have chosen in step 4).
10.    Installation Complete

If all the steps presented have been completed, the automated part of installation is now
finished. The following screen (figure 11) will appear:




                                     Figure 11 End of installation

The “Show details” button will show the list of the software that has been installed.

Click “Next” to continue.




                                                                                        11
                                      Figure 12 Finish page

11.    After installation tasks
Although the basic functions of Cygwin are now installed, you need to configure it properly
so it can interface with the simulation software properly. To do so, you have to follow ALL
these steps in detail:

a-     Setup System Path Variables

Go to Control Panel-> System (in Windows Vista, Control Panel\System and
Security\System). In the System Properties window, identify the “Advanced” tab, and click
on the Environment Variables button.




                                   Figure 13 System Properties



                                                                                        12
Identify your System Variables.




                                  Figure 14 Environment Variables : Path




Now choose Path system variable and double-click; a window will appear. Set “;C:\cygwin\bin;”
between the path variables %SystemRoot%\system32 and              %SystemRoot% like this:
%SystemRoot%\system32; C:\cygwin\bin; %SystemRoot%. Click OK several times to exit.




                                        Figure 15 Edit System Variables



                                                                                          13
b-     Create a folder for temporary files

Create a folder named C:\tmp, and give all permissions to the user (right click on tmp, properties)
like this:




                                        Figure 16 Change tmp Properties

c-     Configure Cygwin

In order to enable correct compilation of the CD++ models, you need to run the
c:\cygwin\setup.exe. When you execute this command, you will see the following
window:




                                                                                                14
When you press the Next button, a new window will appear. Choose Install from local
Directory.




Choose the default Root directory (it is recommended to use the defaults):




                                                                        This path might need to be
                                                                        different if you installed
                                                                        Cygwin on another location.




Choose the default Local Package Directory as follows.




At this point, you will see a Packages to Install window, as follows:


                                                                                        15
Now, look for “Devel” under the “Category” column. Some of the tools under this category
must be installed (underlined in red in the following figure). To install a particular tool click
on the word “skip” under the “New” column, until it changes to the tool’s version to be
installed. In the “Base” category, add also “textutils” (all the necessary utilities should be
installed; choose the “Keep” option for all of them).




                                                                                              16
Finally, the following screen will appear.




                                             17
d-      Setup your Cygwin home directory (important step; if this step is skipped, the simulator will
never compile)

Go to the directory “C:\cygwin\etc”. In this folder you will find a file called “profile”, open it
with an editor. You will find in the line 3, HOME="/cygwin/c" you have to change it on
HOME="/cygdrive/c". The result should look as following:




Save the profile file. To check if this change worked, open cygwin windows and type “pwd”
then “enter” you need to see the following:




                                     Figure 17 cygdrive checking




                                                                                                   18
To finish up, and to make sure that every feature of the plugin works normally check that you have
the file <cat.exe> in the folder <C:\cygwin\bin\>(if cygwin is installed in C:) if not then go to:

http://programming.ccp14.ac.uk/ftp-mirror/programming/cygwin/pub/cygwin/latest/textutils/ and
download the file called textutils-2.0.21-1.tar.tar (495 Kb in size). Unpack the file you downloaded
and go to “user/bin/cat.exe”.

Copy cat.exe in to your cygwin bin folder. For instance, if cygwin has been installed in the C: drive,
then copy cat.exe over to C:\cygwin\bin to completely install cygwin.

The \eclipse folder created during installation MUST be deleted or renamed, as a new version will be
installed in section 2 – Installing Eclipse 3.5.2 with CD++Builder 2.0.


2 – Installing Eclipse 3.5.2 with CD++Builder 2.0
For CD++Builder 2.0 to work correctly all prerequisites should be installed as explained in
section 1 – Installing CD++ for Eclipse 3.3 Installer.

Delete or rename the \eclipse folder that is created during the installation of CD++ for Eclipse 3.3
Installer (by default it is located in c:\eclipse). A newer version of Eclipse will be installed in this
section, which makes use of the CD++ version #3 (see CD++ Versions in the wiki).

You will need Administrator rights in your computer.

Remember that it is always recommended to update and configure Eclipse to work with the last
version of the tool.

Option I – Downloading a Full Version of CD++Builder
The first and simpler way (though it takes more time to download), is to download Eclipse 3.5.2 with
CD++Builder 2.0 from http://sourceforge.net/projects/cdppbuilder/files/ (You must click on the
green button to start the download)




                         Figure 18 Downloading the software


                                                                                                           19
Once you get the zip file, you must unzip the file in the folder you want eclipse to be installed (for
example in c:\)




                Figure 19 After unzipping Eclipse with CD++Builder 2.0




Option II - Installing from the update manager
If you already have a working eclipse, you can install CD++Builder 2.0 Plug-in using eclipse update
manager as follows:

   1. In eclipse go to Help -> Install New Software…




   2. In the Install wizard that will appear, click the Available Software Sites link.


                                                                                                         20
3. Click Add, and then complete the Name and Location as follows:

Name: CD++Builder




                                                                    21
Location: http://cdppbuilder.sourceforge.net/BetaUpdateSite/




4. Click OK on the add site wizard. Click OK on the Available Software Sites.
5. In the Available Software wizard, select the CD++Builder update site you just created in the
   work with field.
6. Unselect the Group items by category option.
7. Select the CD++Builder feature from the list.




                                                                                              22
8. Click Next on the Available Software.
9. Click Finish on the Install Details dialog and installation will start.




                                                                             23
   10. Accept the license and click finish to start with the installation.




       (Note: this operation can take 5-10 mins depending on the internet connection)



   11. Restart eclipse.

NOTE: It is recommended that you configure eclipse to run Automatic Updates frequently (see
Configure Automatic Updates) so that you work with the last version of the tool.




                                                                                              24
Updating Eclipse
  1. In eclipse go to Help -> Check for updates…




  2. Eclipse will contact all update sites, which might take some minutes.




  3. Install all the packages that are outdated.
  4. Restart eclipse.

Configure Eclipse Automatic Updates
  1. In eclipse go to Window -> Preferences.




                                                                             25
   2. Select Automatic Updates from the right menu inside the Install/Update category.
      Check Automatically find new updates and notify me




Launching CD++ Builder

Before launching Eclipse, it is recommended that you give write access to the Eclipse's directory (and
subdirectory) for all users. You need Administrator privileges to do that. Right click on the



                                                                                                   26
“C:\eclipse” folder (or wherever you installed it at step 4 “Installation directory”) and click on
“Properties”. Now click on “Advanced...” and change the write access.

You can now launch Eclipse. To do that, you just have to go into the folder where Eclipse is installed
(chosen at step 4 “Installation directory”), and launch the “eclipse.exe” file.

During the first run of Eclipse, a screen appears and asks you where you want to create the
workspace for Eclipse. The workspace must be created in the eclipse folder (for instance in
“C:\eclipse\”). If you want that each use is own workspace, you just have to create a folder for each
user in the Eclipse's directory (for instance “C:\eclipse\gabriel”, “C:\eclipse\julien”...). When you
launch Eclipse (figure 13), it ask you to select a workspace. You simply choose the one corresponding
to your account. To avoid interference between each user and their account, you can apply right
access on their workspace folder (need to be administrator).




                                      Choosing the workspace



You are now ready to use CD++Builder, do not forget to choose the CD+ +Builder perspective when
you work in Eclipse. Please refer to the user’s guide (“CD++, A tool for DEVS and Cell-DEVS Modeling
and Simulation, User’s Guide - Gabriel A. Wainer).




                                                                                                   27
                                           Initial Screen

Download the manual from here

http://cell-devs.sce.carleton.ca/mediawiki/files/UserManual.ZIP

The first step is to close the Welcome window, and to choose the CD++Builder Perspective




                                                                                           28
The first steps will include running the Life game and the ATM examples included in the manual.

Adding included examples into the workspace
This download includes a workspace with examples of DEVS and DEVS-Graphs models ready to be
used. This workspace is located in %eclipseInstallationDir%\CD++Builder Example Workspace.




To use it, open Eclipse and select it perform the following steps:

    1. Choose File --> Switch Workspace --> Other... .
    2. Then, choose in %eclipseInstallationDir%\CD++Builder Example Workspace.




    3. Choose File --> Import --> General  Existing Projects into workspace




                                                                                                  29
4. Select all the projects in %eclipseInstallationDir%\CD++Builder Example Workspace.




                                                                                        30
The example will appear on the Navigator view:




                                                 31

				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:10
posted:12/19/2011
language:
pages:31