Wiki

Changes between Initial Version and Version 1 of BuildScript

Show
Ignore:
Timestamp:
05/28/13 20:33:16 (11 years ago)
Author:
Charles
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • BuildScript

    v1 v1  
     1= Build Script = 
     2 
     3Small and medium sized projects can often be built with a simple script that invokes the Cobra compiler with the correct options for the given project. 
     4 
     5For example, here is a bash script in a bin/ subdirectory of a project: 
     6 
     7{{{ 
     8#!sh 
     9#!/bin/bash 
     10 
     11# change to the directory of the script 
     12cd "`dirname "$0"`" 
     13# backup 
     14cd .. 
     15 
     16mkdir -p build 
     17 
     18cd source 
     19 
     20cobra -c -d -color -timeit \ 
     21        -copy-core \ 
     22        -out:../build/MyApp.exe \ 
     23        -pkg:gtk-sharp-2.0 \ 
     24        "$@" \ 
     25        lib/ObjectLister.cobra \ 
     26        models/Project.cobra \ 
     27        models/FileModel.cobra \ 
     28        models/Invoice.cobra \ 
     29        gtk/MyApp.cobra \ 
     30        gtk/Extensions.cobra \ 
     31        gtk/TextEditor.cobra \ 
     32        gtk/AppWide.cobra 
     33}}} 
     34 
     35Here is another example from the Cobra compiler itself: 
     36 
     37{{{ 
     38#!sh 
     39#!/bin/bash 
     40cd "`dirname "$0"`" ; cd .. 
     41mono Snapshot/cobra.exe -compile -color -debug -ert:yes -timeit "$@" cobra.cobra -files:files-to-compile.text 
     42}}} 
     43 
     44In the above example, the -files option is used so that the list of source files can be maintained in a separate file, one per line: 
     45 
     46{{{ 
     47Utils 
     48IndentedWriter 
     49Misc 
     50SubversionUtils 
     51 
     52CommandLine 
     53TestifyRunner 
     54BackEnd 
     55Compiler 
     56... 
     57}}} 
     58 
     59Complementary scripts named "clean", "test", etc. can also be created to help manage the project. 
     60 
     61== See Also == 
     62 
     63 * BuildTools 
     64 * RelatedProjects 
     65 * LibraryTopics 
     66 * LanguageTopics