Changes between Version 20 and Version 21 of building


Ignore:
Timestamp:
10/05/17 18:15:59 (7 years ago)
Author:
jlegrand
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • building

    v20 v21  
    11[[PageOutline(1-1)]] 
    22 
    3 = Building Instructions = 
     3= Introduction = 
    44 
    55There are several ways to compile/build Cheddar tools on Linux/windows boxes : 
    66 
    77 * Through the command line. 
    8  * With an IDE : GPS (GNAT Programming Studio) or AdaGIDE (Ada GNAT Integrated Development Environment). 
     8 * With the Gnat IDE : GPS. 
    99 
    10 For other operating systems, one can use old makefile : makefile.manual. 
     10For other operating systems, Ellidiss Technologies shall be contacted. 
    1111 
    12 = Additional Packages = 
     12= Additional Software = 
    1313 
    14 Cheddar is built using the GNAT compiler GPL 2007 (see [https://libre.adacore.com/ AdaCore web site]). Note : cheddar does not compile with GNAT compiler GPL 2010. 
    15  
    16 Furthermore, the following packages are needed to build Cheddar (available in Cheddar repository (''required_packages'')) : 
    17   
    18 || '''Packages''' || '''Comment''' || 
    19 || '''Gtk''' and '''!GtkAda''' || See [http://www.gtk.org GTK web site] for details || 
    20 || '''!XmlAda''' || See [https://libre.adacore.com/ AdaCore web site] || 
    21 || '''Aflex''' and '''Ayacc''' || If you plan to change the code of the parametric simulator || 
    22 || '''big number''' || From Jerome Delcourt || 
    23 || '''Ocarina AADL Parser''' || Distributed by the [http://ocarina.enst.fr/ Telecom ParisTech Ocarina team] || 
     14The following software are needed : 
     15 * GNAT compiler GPL (see [https://libre.adacore.com/ AdaCore web site]). Note : the 2015 version works, the 2017 do not. 
     16 * For windows, get the cygwin ([https://www.cygwin.com/ Cygwin web site]) or msys2 ([http://www.msys2.org/ Msys2 web site]) environment. 
     17 * a svn client is necessary. The default one is fine for linux and tortoiseSVN can be tortoiseSVN ([https://tortoisesvn.net/ Tortoise SVN web site]) used for windows. 
    2418 
    2519---- 
    26 = Command Line Building Instructions = 
     20= Building Instructions = 
    2721 
    28 == Linux/Unix Boxes == 
     22== Step 1 Environment variables == 
    2923 
    30 === Step 1 === 
     24Set the environment variables :  
     25 * edit the compilelinux32.bash, compilelinux64.bash or compilewin32.bash (depending on your OS) and fill the correct CHEDDAR_DIR, GNAT_DIR and SVN_PATH (win32) 
    3126 
    32 We assume that all the required component are already installed in your system.  
    33 We also supposed that ''gcc/GNAT'' is in your binary ''PATH'' and ''LD_LIBRARY_PATH''  
    34 environment variable contains ''!GtkAda'' and ''Gtk'' libraries directory 
    35 (i.e. ''libs/linux'' directory). 
     27 * then source the script through a terminal (e.g. bash for linux or cygwin/msys2 for windows). 
    3628 
    37 For !GtkAda library, one shall replace the ''.../required_packages/GtkAda'' directory content 
    38 by the one from ''gtkada_unix.tar.gz'' file found in ''.../required_packages/Archive'' directory. 
     29== Step 2 Edit Files == 
     30If necessary, edit the following files : 
     31* read and update the ''config/*.ads'' packages. These Ada packages contain all Cheddar's configurable constants. 
     32* the Makefile.vars to set the build type (Release or Debug) and cheddar version. 
    3933 
    40 === Step 2 === 
     34== Step 3 Command line == 
    4135 
    42 If necessary, read and update the ''config/*.ads'' packages. These Ada packages contain all Cheddar's configurable constants. 
    43  
    44 === Step 3 === 
    45  
    46 Type ''make all'' in a terminal to compile all Cheddar tools (''make alldebug'' for debug version). 
    47  
    48 Note : if you want to remove all objects created during Cheddar compilation,  
    49 type ''make clean'' (resp. ''make cleandebug''). 
    50  
    51 == Windows Boxes == 
    52  
    53 === Step 1 === 
    54  
    55 If necessary, read and update the ''config/*.ads'' packages. These Ada packages contain all Cheddar's configurable constants. 
    56  
    57 === Step 2 === 
    58  
    59 Open a terminal (choose ''Windows Menu -> execute'' and type ''cmd''). In Cheddar source main directory, 
    60 type : 
    61  
    62  * ''gnatmake -Pcheddargps.gpr -d -XBuild=Release'' : build cheddar tools in ''release'' mode (optimized, no debug information). 
    63  
    64  * ''gnatmake -Pcheddargps.gpr -d -XBuild=Debug'' : build cheddar tools in ''debug'' mode (no optimization). 
    65  
    66  * ''gnatclean -r -Pcheddargps.gpr -XBuild=Release'' : remove objects from ''release'' mode compilation. 
    67  
    68  * ''gnatclean -r -Pcheddargps.gpr -XBuild=Debug'' : remove objects from ''debug'' mode compilation. 
    69  
    70 ---- 
    71  
    72 = GPS Building Instructions = 
    73  
    74 == Step 1 == 
    75  
    76 Install the GNAT GPL 2007 distribution (GNAT Programming Studio and GNAT Ada compiler should be installed on your system). 
    77  
    78 For Windows, just double click on the executable downloaded from !AdaCore web site. 
    79  
    80 == Step 2 == 
    81  
    82 Open GPS cheddar project (cheddargps.gpr file in Cheddar source code ''trunk'' directory) : 
    83  
    84 [[Image(htdocs:GPS21.png, nolink, 700)]] 
    85  
    86 And Build your selected binary : 
    87  
    88 [[Image(htdocs:GPS31.png, nolink, 700)]] 
    89  
    90 Cheddar tools binaries can be found in ''trunk/binaries/bin/release or debug'' directory. 
    91  
    92 ---- 
    93  
    94 = !AdaGide Building Instructions = 
     36In a terminal execute the following commands : 
     37 * Type ''make cheddar'' to compile Cheddar  
     38Or 
     39 * Type ''make all'' in the terminal to compile all Cheddar tools. 
    9540 
    9641 
    97 == Step 1 == 
     42Note 1 : check the Makefile to see all target available. 
     43Note 2 : if you want to remove all objects created during Cheddar compilation,  
     44type ''make clean''. 
    9845 
    99 Idem GPS building procedure. 
     46== Step3 GPS == 
    10047 
    101 == Step 2 == 
    102  
    103 Unzip all necessary packages in a "lib" directory in order to have the following tree (Due to !AdaGide restriction, ''Cheddar'' and ''Lib'' directory should be located in hard drive root directory, e.g. ''c:'' ) : 
    104  
    105  * Cheddar 
    106   * branch 
    107   * tags 
    108   * trunk  
    109     * binaries -> contains Adagide configuration and project files (gnat.ago, ...) 
    110     * ... 
    111     * txt 
    112  * Lib 
    113   * !BigNumber 
    114   * !GtkAda 
    115   * Ocarina 
    116    * aadl 
    117    * checker 
    118    * config 
    119    * core 
    120    * dia 
    121    * dumper 
    122    * gaia 
    123    * generators 
    124    * lib -> contains Ocarina libraries 
    125    * pn 
    126    * runtime 
    127   * !XmlAda 
    128    
    129 If packages are located in different directories (default : ''c:\Cheddar'' and ''c:\Lib'') , update "gnat.ago" (''Cheddar/binaries''). 
    130  
    131 == Step 3 ==  
    132  
    133 Open cheddar.adb with !AdaGide and push the !AdaGide "Build" button. Built binary can be found in ''Cheddar/trunk/binaries/'' directory. 
    134  
    135 [[Image(htdocs:AdaGide.png, nolink, 700)]] 
    136  
    137 == Step 4 == 
    138  
    139 Repeat step 3 with xml2xml.adb, aadl2xml.adb, xml2aadl.adb, aadl2aadl.adb and scc.adb. 
    140  
    141 ---- 
    142 = Framework Examples = 
    143  
    144 In order to build Cheddar framework examples, one can follow building instructions for Cheddar tools (command line and GPS) 
    145 with the GPS project ''frameworkexamples.gpr'' and Makefile option ''examples'' and ''examplesdebug''. 
    146  
    147 ---- 
    148 = Other Operating Systems = 
    149  
    150 == Step 1 == 
    151  
    152 Same as command line building instructions. 
    153  
    154 == Step 2 == 
    155  
    156 Update the Makefile.vars file :   
    157  
    158  * You have to give the Cheddar directory source code location (pointed by the ''ROOT_CHEDDAR'' variable). 
    159  * Update ''ADAC_INCLUDE'' and ''ADAC_LIB'' variables according to Gtk, !GtkAda, !XmlAda, !BigNumbers and Ocarina installation directories 
    160  
    161 '''Several Makefile.vars examples are provided in Cheddar source code''' (Makefile.vars.linux for Linux, Makefile.vars.solaris for Solaris, Makefile.vars.win32 for Windows boxes ...). 
    162  
    163 == Step 3 == 
    164  
    165 If necessary, read and update the config/*.ads packages. These Ada packages contain all Cheddar's configurable constants. 
    166  
    167 == Step 4 == 
    168  
    169 Type `gmake' to compile Cheddar. 
     48In the terminal, launch gps : 
     49 * Open GPS cheddar project. In the menu, select Project->Open and select the cheddar.gpr file (cheddar.gpr file in Cheddar source code ''trunk'' directory). 
     50 * The build it. In the menu, select Build->Project->Cheddar.gpr 
    17051 
    17152---- 
    17253= Installation Instructions = 
    17354 
    174 If the compilation succeed, Cheddar tools binaries can be found in ''binaries/bin/release'' directory  
    175 (''binaries/bin/debug'' for debug version).  
     55If the compilation succeed, Cheddar tools binaries can be found in the ''src'' directory.  
    17656 
    177  * On Unix boxes : just copy executables in the installation directory (eg. ''/usr/local/bin'' ). Your ''LD_LIBRARY_PATH'' shell variable shall point  
    178 to ''libs/linux'' directory. 
     57 * On Unix boxes : TODO. 
    17958 
    180  * On Win32 boxes : copy ''cheddar.exe'' and the ''Dll'' files from ''libs/win32dll'' directory in the '''Same''' installation directory (eg. ''C:\Cheddar''). 
     59 * On Win32 boxes : copy ''cheddar.exe'', the ''glade files'' (in ''src/graphical_editor'') and the ''libgdk-win32-2.0-0.dll'' and ''libgtk-win32-2.0-0'' files from ''lib/win32/GtkAda/bin'' directory in the '''Same''' installation directory (eg. ''C:\Cheddar''). 
    18160 
    18261----