specs/stx-jv.rbspec
author Jan Vrany <jan.vrany@fit.cvut.cz>
Wed, 25 May 2016 17:19:27 +0100
changeset 11 f7dc950d8df8
parent 10 cb3e0e3ca28f
child 13 ba905210e6bb
permissions -rw-r--r--
Automatically download pre-built librun and stc when sources are not available. ...from SWING Jenkins job. A courstesy to those unlucky ones who want to recompile Smalltalk/X but have no access to stc and librun sources.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     1
load "jv-branch.deps.rake"
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     2
11
f7dc950d8df8 Automatically download pre-built librun and stc when sources are not available.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 10
diff changeset
     3
f7dc950d8df8 Automatically download pre-built librun and stc when sources are not available.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 10
diff changeset
     4
# A helper function to download and unpack pre-built stc and librun
f7dc950d8df8 Automatically download pre-built librun and stc when sources are not available.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 10
diff changeset
     5
# for those who are not lucky enough to have an access to sources
f7dc950d8df8 Automatically download pre-built librun and stc when sources are not available.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 10
diff changeset
     6
def download_blob_matching(pattern, directory)
f7dc950d8df8 Automatically download pre-built librun and stc when sources are not available.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 10
diff changeset
     7
  plat = nil
f7dc950d8df8 Automatically download pre-built librun and stc when sources are not available.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 10
diff changeset
     8
  blob = nil
f7dc950d8df8 Automatically download pre-built librun and stc when sources are not available.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 10
diff changeset
     9
  sha256 = nil
f7dc950d8df8 Automatically download pre-built librun and stc when sources are not available.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 10
diff changeset
    10
  if win32? then        
f7dc950d8df8 Automatically download pre-built librun and stc when sources are not available.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 10
diff changeset
    11
      plat = 'Windows'
f7dc950d8df8 Automatically download pre-built librun and stc when sources are not available.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 10
diff changeset
    12
  elsif linux?        
f7dc950d8df8 Automatically download pre-built librun and stc when sources are not available.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 10
diff changeset
    13
    plat = 'Linux'
f7dc950d8df8 Automatically download pre-built librun and stc when sources are not available.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 10
diff changeset
    14
  else        
f7dc950d8df8 Automatically download pre-built librun and stc when sources are not available.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 10
diff changeset
    15
    error_unsupported_platform()
f7dc950d8df8 Automatically download pre-built librun and stc when sources are not available.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 10
diff changeset
    16
  end
f7dc950d8df8 Automatically download pre-built librun and stc when sources are not available.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 10
diff changeset
    17
  build = Jenkins::Build.new(%Q{https://swing.fit.cvut.cz/jenkins/job/stx_jv_new/ARCH=#{ARCH},PLATFORM=#{plat}N/lastSuccessfulBuild})
f7dc950d8df8 Automatically download pre-built librun and stc when sources are not available.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 10
diff changeset
    18
  build.artifacts.each do | artifact |
f7dc950d8df8 Automatically download pre-built librun and stc when sources are not available.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 10
diff changeset
    19
    if pattern =~ artifact.name then
f7dc950d8df8 Automatically download pre-built librun and stc when sources are not available.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 10
diff changeset
    20
      if artifact.name.end_with? '.sha256' then
f7dc950d8df8 Automatically download pre-built librun and stc when sources are not available.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 10
diff changeset
    21
        sha256 = artifact
f7dc950d8df8 Automatically download pre-built librun and stc when sources are not available.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 10
diff changeset
    22
      else
f7dc950d8df8 Automatically download pre-built librun and stc when sources are not available.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 10
diff changeset
    23
        blob = artifact
f7dc950d8df8 Automatically download pre-built librun and stc when sources are not available.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 10
diff changeset
    24
      end
f7dc950d8df8 Automatically download pre-built librun and stc when sources are not available.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 10
diff changeset
    25
    end
f7dc950d8df8 Automatically download pre-built librun and stc when sources are not available.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 10
diff changeset
    26
  end
f7dc950d8df8 Automatically download pre-built librun and stc when sources are not available.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 10
diff changeset
    27
  if not blob then
f7dc950d8df8 Automatically download pre-built librun and stc when sources are not available.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 10
diff changeset
    28
    error "No artifact matching given pattern found"
f7dc950d8df8 Automatically download pre-built librun and stc when sources are not available.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 10
diff changeset
    29
  end
f7dc950d8df8 Automatically download pre-built librun and stc when sources are not available.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 10
diff changeset
    30
  puts "Downloading binary component #{blob.name}"
f7dc950d8df8 Automatically download pre-built librun and stc when sources are not available.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 10
diff changeset
    31
  blob.download_to(directory)
f7dc950d8df8 Automatically download pre-built librun and stc when sources are not available.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 10
diff changeset
    32
  if sha256 then
f7dc950d8df8 Automatically download pre-built librun and stc when sources are not available.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 10
diff changeset
    33
    sha256.download_to(directory)
f7dc950d8df8 Automatically download pre-built librun and stc when sources are not available.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 10
diff changeset
    34
  end
f7dc950d8df8 Automatically download pre-built librun and stc when sources are not available.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 10
diff changeset
    35
  unzip directory / blob.name, remove: true
f7dc950d8df8 Automatically download pre-built librun and stc when sources are not available.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 10
diff changeset
    36
  rm_f directory / sha256.name
f7dc950d8df8 Automatically download pre-built librun and stc when sources are not available.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 10
diff changeset
    37
end
f7dc950d8df8 Automatically download pre-built librun and stc when sources are not available.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 10
diff changeset
    38
f7dc950d8df8 Automatically download pre-built librun and stc when sources are not available.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 10
diff changeset
    39
f7dc950d8df8 Automatically download pre-built librun and stc when sources are not available.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 10
diff changeset
    40
0
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    41
project :'stx:jv-branch-core' do
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    42
  # Core Smalltalk/X - does contain only standard libraries,
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    43
  # and development tools. Does not contain any other 'features'
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    44
  # like XML suite, Java support. Usable as a basis for standalone
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    45
  # applications that needs some JV-branch features.
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    46
  import :'stx:baseline'
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    47
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    48
  # FORKED libraries
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    49
  # ======================================================================
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    50
  package "stx:libbasic", :repository => :'swing:hg', :branch => 'jv'
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    51
  package "stx:libbasic2", :repository => :'swing:hg', :branch => 'jv'
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    52
  package "stx:libbasic3", :repository => :'swing:hg', :branch => 'jv'
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    53
  package "stx:libcomp", :repository => :'swing:hg', :branch => 'jv'
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    54
  package "stx:libtool", :repository => :'swing:hg', :branch => 'jv'
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    55
 
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    56
  package "stx:libview", :repository => :'swing:hg', :branch => 'jv'
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    57
  package "stx:libview2", :repository => :'swing:hg', :branch => 'jv'
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    58
  package "stx:libwidg", :repository => :'swing:hg', :branch => 'jv'
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    59
  package "stx:libwidg2", :repository => :'swing:hg', :branch => 'jv'
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    60
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    61
  package "stx:goodies/sunit", :repository => :'swing:hg'
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    62
  package "stx:goodies/monticello", :repository => :'swing:hg', :branch => 'jv'
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    63
  package "stx:goodies/refactoryBrowser", :repository => :'swing:hg', :branch => 'jv'
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    64
  package "stx:libsvn", :repository => :'swing:hg', :branch => 'jv'
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    65
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    66
  # Some more development tools to build and preload
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    67
  # ======================================================================
10
cb3e0e3ca28f Fixed repository specifications to allow anonymous checkout.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 8
diff changeset
    68
  package "stx:goodies/xml/vw", :repository => :'exept:public'
0
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    69
  
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    70
  # SmallSense
10
cb3e0e3ca28f Fixed repository specifications to allow anonymous checkout.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 8
diff changeset
    71
  package "stx:goodies/regex", :repository => :'exept:public'
0
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    72
  package "stx:goodies/smallsense", :repository => :'bitbucket:janvrany'
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    73
  package "stx:goodies/smallsense/refactoring_custom"
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    74
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    75
  
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    76
  tasks do
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    77
    # Build and install documentation for stx:libjava and stx:libscm/mercurial
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    78
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    79
    task "stx:libjava:post" do 
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    80
      chdir BUILD_DIR / 'stx' / 'libjava' do
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    81
        make "doc-install"
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    82
      end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    83
    end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    84
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    85
    task "stx:libscm/mercurial:post" do 
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    86
      chdir BUILD_DIR / 'stx' / 'libscm' / 'mercurial' do
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    87
        make "doc-install"
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    88
      end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    89
    end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    90
7
b6fe3a90f6e0 Added `zip()` & `unzip()` extensions to easily create / extract archives from build scripts.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 4
diff changeset
    91
    redefine BUILD_DIR / 'stx' / 'stc' => BUILD_DIR do
11
f7dc950d8df8 Automatically download pre-built librun and stc when sources are not available.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 10
diff changeset
    92
      if core_developer? or jenkins? then
7
b6fe3a90f6e0 Added `zip()` & `unzip()` extensions to easily create / extract archives from build scripts.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 4
diff changeset
    93
        checkout :'swing:private:hg', 'stx/stc', :branch => 'jv'
b6fe3a90f6e0 Added `zip()` & `unzip()` extensions to easily create / extract archives from build scripts.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 4
diff changeset
    94
      else
11
f7dc950d8df8 Automatically download pre-built librun and stc when sources are not available.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 10
diff changeset
    95
        download_blob_matching(/prebuilt-stc/, BUILD_DIR / 'stx')
7
b6fe3a90f6e0 Added `zip()` & `unzip()` extensions to easily create / extract archives from build scripts.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 4
diff changeset
    96
      end
0
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    97
    end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    98
7
b6fe3a90f6e0 Added `zip()` & `unzip()` extensions to easily create / extract archives from build scripts.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 4
diff changeset
    99
    redefine BUILD_DIR / 'stx' / 'librun' => BUILD_DIR do      
11
f7dc950d8df8 Automatically download pre-built librun and stc when sources are not available.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 10
diff changeset
   100
      if core_developer? or jenkins? then
7
b6fe3a90f6e0 Added `zip()` & `unzip()` extensions to easily create / extract archives from build scripts.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 4
diff changeset
   101
        checkout :'swing:private:hg', 'stx/librun', :branch => 'jv'
b6fe3a90f6e0 Added `zip()` & `unzip()` extensions to easily create / extract archives from build scripts.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 4
diff changeset
   102
      else        
11
f7dc950d8df8 Automatically download pre-built librun and stc when sources are not available.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 10
diff changeset
   103
        download_blob_matching(/prebuilt-librun/, BUILD_DIR / 'stx')
7
b6fe3a90f6e0 Added `zip()` & `unzip()` extensions to easily create / extract archives from build scripts.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 4
diff changeset
   104
      end
0
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   105
    end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   106
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   107
    if win32?
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   108
      task :'checkout:post' do
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   109
        rm_f BUILD_DIR / 'stx' / 'projects' / 'smalltalk' / 'stx_splash.bmp'
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   110
      end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   111
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   112
      file BUILD_DIR / 'stx' / 'projects' / 'smalltalk' / 'stx_splash.bmp' do
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   113
        cp BUILD_DIR / 'misc' / 'distutils' / 'src' / 'lib' / "splash-smalltalkx-#{project.app_version.split(".")[0..2].join(".")}.bmp",
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   114
           BUILD_DIR / 'stx' / 'projects' / 'smalltalk' / 'stx_splash.bmp'
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   115
      end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   116
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   117
      task "stx:projects/smalltalk" => BUILD_DIR / 'stx' / 'projects' / 'smalltalk' / 'stx_splash.bmp'
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   118
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   119
    end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   120
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   121
    # Try execute run the VM if it starts up
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   122
    task :'compile:post' do
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   123
      if PROJECT == 'stx:jv-branch' then  
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   124
        chdir BUILD_DIR / 'stx' / 'projects' / 'smalltalk' do
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   125
          if win32?
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   126
            cmd = "smalltalk.bat -I --quick --eval \"Stdout nextPutLine:'OKay, VM runs'. Smalltalk exit: 0\""
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   127
          else
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   128
            cmd = "./smalltalk -I --quick --eval \"Stdout nextPutLine:'OKay, VM runs'. Smalltalk exit: 0\""
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   129
          end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   130
          if not system cmd
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   131
            raise Exception.new("Cannot run smalltalk!")
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   132
          end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   133
        end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   134
      end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   135
    end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   136
  
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   137
  if (TOOLCHAIN == "mingw32" || TOOLCHAIN == 'mingw') then
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   138
    task :'compile:post' => BUILD_DIR / 'stx' / 'projects' / 'smalltalk' / 'libgcc_s_dw2-1.dll'
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   139
    
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   140
    file BUILD_DIR / 'stx' / 'projects' / 'smalltalk' / 'libgcc_s_dw2-1.dll' do
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   141
        cp ENV['MINGW_DIR'] / 'bin' / 'libgcc_s_dw2-1.dll' , BUILD_DIR / 'stx' / 'projects' / 'smalltalk' / 'libgcc_s_dw2-1.dll'
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   142
    end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   143
    end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   144
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   145
    # Build documentation for Mercurial & STX:LIBJAVA
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   146
    task :'dist:pre' do
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   147
        chdir (BUILD_DIR / 'stx' / 'libscm' / 'mercurial') do
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   148
            make 'doc'
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   149
            make 'doc-install'
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   150
        end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   151
    end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   152
  
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   153
  task :'stx:projects/smalltalk:pre' do   
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   154
    chdir (BUILD_DIR / 'stx' / 'projects' / 'smalltalk') do         
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   155
    # Hack for MINGW32 - must patch bc.mak ifdefs, sigh.
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   156
    # use ruby instead of sed as ruby has to be installed anyway    
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   157
    cmd = "ruby -ibkp -pe \"gsub /ifdef USEMINGW64/, 'if defined(USEMINGW64) || defined(USEMINGW32)'\" bc.mak"
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   158
    #puts cmd
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   159
    if not system(cmd)  then
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   160
        raise Exception.new("Cannot patch bc.mak")
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   161
    end      
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   162
      end     
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   163
  end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   164
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   165
    # Cross-compile hack for stx:libprofiler
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   166
    if win32_wine?
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   167
    task :'stx:libprofiler:pre' do
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   168
      chdir (BUILD_DIR / 'stx' / 'libprofiler') do
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   169
        sh "wine cmd /C config.bat"
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   170
      end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   171
    end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   172
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   173
    task :'stx:projects/smalltalk:pre' do   
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   174
      chdir (BUILD_DIR / 'stx' / 'projects' / 'smalltalk') do   
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   175
        make "buildDate.h"    
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   176
      end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   177
    end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   178
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   179
    task :'stx:goodies/xmlsuite/xmlreaderimpl:pre' do
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   180
      chdir (BUILD_DIR / 'stx' / 'goodies' / 'xmlsuite' / 'xmlreaderimpl') do
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   181
        [
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   182
          'support' / 'expat-2.0.1' / 'bcb5' / 'release' /'obj' / 'xmlwf',
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   183
          'support' / 'expat-2.0.1' / 'bcb5' / 'release' /'obj' / 'libexpat',
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   184
          'support' / 'expat-2.0.1' / 'bcb5' / 'release' /'obj' / 'libexpatw',
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   185
          'support' / 'expat-2.0.1' / 'bcb5' / 'release' /'obj' / 'libexpat_static',
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   186
          'support' / 'expat-2.0.1' / 'bcb5' / 'release' /'obj' / 'libexpatw_static',
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   187
          'support' / 'expat-2.0.1' / 'bcb5' / 'release' /'obj' / 'examples'
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   188
        ].each do | f |
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   189
          if not File.exists?(f)
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   190
            mkdir_p f
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   191
          end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   192
        end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   193
      end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   194
    end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   195
    end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   196
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   197
    # Hack for badly-named files in libtool
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   198
    task :'stx:libtool:post' do
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   199
      chdir (BUILD_DIR / 'stx' / 'libtool') do
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   200
  # Windows does not support symlinks, copy the file
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   201
  if win32?
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   202
    if not File.exist? 'Tools_BrowserList.STH'
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   203
      cp 'Tools__BrowserList.STH', 'Tools_BrowserList.STH'
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   204
    end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   205
    if not File.exist? 'Tools_NavigatorModel.STH'
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   206
      cp 'Tools__NavigatorModel.STH', 'Tools_NavigatorModel.STH'
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   207
    end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   208
    if not File.exist? 'Tools_NavigationState.STH'
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   209
      cp 'Tools__NavigationState.STH', 'Tools_NavigationState.STH'
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   210
    end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   211
  else
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   212
    if not File.exist? 'Tools_BrowserList.H'
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   213
      ln_s 'Tools__BrowserList.H', 'Tools_BrowserList.H'
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   214
    end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   215
    if not File.exist? 'Tools_NavigatorModel.H'
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   216
      ln_s 'Tools__NavigatorModel.H', 'Tools_NavigatorModel.H'
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   217
    end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   218
    if not File.exist? 'Tools_NavigationState.H'
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   219
      ln_s 'Tools__NavigationState.H', 'Tools_NavigationState.H'
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   220
    end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   221
  end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   222
      end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   223
    end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   224
  end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   225
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   226
end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   227
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   228
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   229
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   230
project :'stx:jv-branch' do
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   231
  # Standard Smalltalk/X IDE with some nice libraries preloaded
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   232
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   233
  import :'stx:jv-branch-core'
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   234
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   235
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   236
  app_name "smalltalkx-jv-branch"
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   237
  app_version "6.2.5.0_0"
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   238
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   239
  # Forked PetitParser
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   240
  package "stx:goodies/petitparser", :repository => :'bitbucket:janvrany', :link => false
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   241
  package "stx:goodies/petitparser/tests", :link => false
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   242
  package "stx:goodies/petitparser/analyzer",  :link => false
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   243
  package "stx:goodies/petitparser/analyzer/tests",  :link => false
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   244
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   245
  # Monticello
10
cb3e0e3ca28f Fixed repository specifications to allow anonymous checkout.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 8
diff changeset
   246
  package "stx:libcompat", :repository => :'exept:public'
cb3e0e3ca28f Fixed repository specifications to allow anonymous checkout.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 8
diff changeset
   247
  package "stx:goodies/communication", :repository => :'exept:public'
0
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   248
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   249
  # Profiler
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   250
  package "stx:libprofiler", :repository => :'swing'
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   251
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   252
  # Java support
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   253
  package "stx:libjava", :repository => :'bitbucket:janvrany'
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   254
  package "stx:libjava/tools"
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   255
  package "stx:libjava/experiments"
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   256
  #package "stx:libjava/examples" :link => false
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   257
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   258
  # Smalltalk/X IDE
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   259
  application 'stx:projects/smalltalk', :repository => :'swing:hg', :branch => 'jv'
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   260
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   261
  if (ENV['USER'] == 'builder') || ( ENV['USER'] == 'vranyj1')  || (ENV['USERNAME'] == 'builder') || ( ENV['USERNAME'] == 'vranyj1') then
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   262
     stx_libjava_checkouter =
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   263
         Proc.new do | pkg, build_dir |
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   264
             repo = :'swing:hg'
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   265
             puts "Checking out #{pkg.name} from #{repo} (cache / staging repo)..."
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   266
             checkout repo, pkg.directory, :branch => pkg.branch, :package => pkg, :separator => '.'
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   267
             puts "Checking out #{pkg.name} from #{repo} (cache)...done"
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   268
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   269
             File.open(build_dir / 'stx' / 'libjava' / '.hg' / 'hgrc' , 'w') do | f |
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   270
                 f.puts "[paths]"
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   271
                 f.puts "default = https://bitbucket.org/janvrany/stx-libjava"
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   272
             end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   273
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   274
             repo = pkg.repository
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   275
             puts "Checking out #{pkg.name} from #{repo}..."
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   276
             update repo, pkg.directory, :branch => pkg.branch, :package => pkg, :separator => pkg._separator
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   277
             puts "Checking out #{pkg.name} from #{repo}...done"
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   278
         end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   279
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   280
     stx_libjava_updater =
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   281
         Proc.new do | pkg, build_dir |
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   282
             repo = :'swing:hg'
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   283
             puts "Updating #{pkg.name} from #{repo} (cache / staging repo)..."
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   284
             update repo, pkg.directory, :branch => pkg.branch, :package => pkg, :separator => '.'
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   285
             puts "Checking out #{pkg.name} from #{repo} (cache)...done"
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   286
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   287
             repo = pkg.repository
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   288
             puts "Checking out #{pkg.name} from #{repo}..."
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   289
             update repo, pkg.directory, :branch => pkg.branch, :package => pkg, :separator => pkg._separator
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   290
             puts "Checking out #{pkg.name} from #{repo}...done"
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   291
         end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   292
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   293
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   294
     package "stx:libjava", :checkout => stx_libjava_checkouter, :update => stx_libjava_updater
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   295
  end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   296
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   297
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   298
  # Other nice packages...
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   299
  metacello_and_libscm_checkouter = Proc.new do | pkg, build_dir |
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   300
    base = project.repository(pkg.repository).url
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   301
    pkg_comps = pkg.name.sub(':', '/').split("/");
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   302
    pkg_tail = pkg_comps.last
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   303
    pkg_body = pkg_comps[0..(pkg_comps.size - 2)];
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   304
    wc = build_dir / pkg.directory
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   305
    FileUtils.mkdir_p(File.dirname(wc))
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   306
    cmd = "svn co #{base}/#{pkg_body.join("/")}/#{pkg.branch == nil ? 'trunk' : pkg.branch}/#{pkg_tail} #{wc}"
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   307
    puts "Issuing: #{cmd}"
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   308
    if not system cmd
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   309
      error "Cannot checkout #{pkg.name} using custom checkouter"
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   310
    end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   311
  end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   312
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   313
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   314
  package 'stx:libscm', :repository => :'bitbucket:janvrany'
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   315
  package 'stx:libscm/common', :repository => :'bitbucket:janvrany'
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   316
  package 'stx:libscm/mercurial', :repository => :'bitbucket:janvrany'
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   317
  package 'stx:libscm/mercurial/monticello', :repository => :'bitbucket:janvrany'
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   318
  package 'stx:goodies/ring', :repository => :'bitbucket:janvrany', :link => false
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   319
  package 'stx:goodies/libcairo', :repository => :'bitbucket:janvrany', :link => false
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   320
  package 'stx:goodies/cypress', :repository => :'bitbucket:janvrany'
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   321
  package "stx:goodies/xmlsuite", :repository => :'bitbucket:janvrany'  
10
cb3e0e3ca28f Fixed repository specifications to allow anonymous checkout.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 8
diff changeset
   322
  package "stx:goodies/loggia", :repository => :'exept:public'
0
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   323
  package 'stx:goodies/smaCC',:repository => :'swing'
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   324
  package "squeak:graphviz",  :repository => :'swing'  
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   325
10
cb3e0e3ca28f Fixed repository specifications to allow anonymous checkout.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 8
diff changeset
   326
  #package "stx:goodies/builder/reports", :repository => :'exept:public', :link => false
0
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   327
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   328
  tasks do
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   329
    task "stx:projects/smalltalk" => "stx:libwebkit"
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   330
    task "stx:projects/smalltalk" => "stx:libjava"
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   331
    task "stx:projects/smalltalk" => "stx:libjava/tools"
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   332
    task "stx:projects/smalltalk" => "stx:libjava/experiments"
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   333
    #task "stx:libjava/examples" => "stx:libjava"
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   334
    #task "stx:projects/smalltalk" => "stx:libjava/examples"
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   335
    task 'stx:projects/smalltalk' => 'stx:goodies/loggia'
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   336
    task 'stx:projects/smalltalk' => 'stx:goodies/monticello'
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   337
    task 'stx:projects/smalltalk' => 'stx:goodies/cypress'
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   338
    task 'stx:projects/smalltalk' => 'stx:libscm/mercurial'
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   339
    task 'stx:projects/smalltalk' => 'stx:libscm/mercurial/monticello'
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   340
    task 'stx:projects/smalltalk' => 'stx:goodies/builder/reports'
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   341
    task 'stx:projects/smalltalk' => 'stx:goodies/ring'
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   342
    task 'stx:projects/smalltalk' => 'stx:goodies/libcairo'
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   343
    task "stx:goodies/builder/reports" => 'stx:libbasic'
4
48ec8a59ced4 Renamed `dist` target to `install`. Added new target `artifacts` (mainly) for Jenkins builds.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 0
diff changeset
   344
  
48ec8a59ced4 Renamed `dist` target to `install`. Added new target `artifacts` (mainly) for Jenkins builds.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 0
diff changeset
   345
    task :'install:main' => :'dist:jv-branch'
0
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   346
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   347
    task :'dist:jv:pre' => :'stx:jv-branch:extractver'
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   348
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   349
    if win32?     	
4
48ec8a59ced4 Renamed `dist` target to `install`. Added new target `artifacts` (mainly) for Jenkins builds.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 0
diff changeset
   350
      app_name    = project.app_name      || (raise Exception.new("No app_name property specified"))
0
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   351
	    app_version = project.app_version   || (raise Exception.new("No app_version property specified"))
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   352
	    version = app_version.split('_').first
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   353
4
48ec8a59ced4 Renamed `dist` target to `install`. Added new target `artifacts` (mainly) for Jenkins builds.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 0
diff changeset
   354
	    install_dir = ARTIFACTS_DIR / BUILD_NAME
0
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   355
	    bin_dir = install_dir / 'bin'
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   356
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   357
	    cairo_dll_dir = nil
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   358
    	cairo_dlls = nil
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   359
    	if ARCH == 'i386'
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   360
    		cairo_dll_dir = BUILD_DIR / 'stx' / 'goodies' / 'libcairo' / 'support' / 'win32' / 'i586'
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   361
	      cairo_dlls =  [ 
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   362
	      	'libcairo-2.dll' ,
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   363
					'libfontconfig-1.dll' ,
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   364
					'libfreetype-6.dll' ,
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   365
					'liblzma-5.dll' ,
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   366
					'libpixman-1-0.dll' ,
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   367
					'libpng15-15.dll' ,
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   368
					'libxml2-2.dll' ,
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   369
					'zlib1.dll'
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   370
					]
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   371
			else
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   372
				cairo_dll_dir = BUILD_DIR / 'stx' / 'goodies' / 'libcairo' / 'support' / 'win32' / 'x86_64'
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   373
				cairo_dlls =  [ 
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   374
	      	'fontconfig.dll' ,
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   375
	      	'iconv.dll' ,
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   376
	      	'libcairo-2.dll' ,
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   377
	      	'libpng16.dll' ,
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   378
	      	'libxml2.dll' ,
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   379
	      	'pixman-1.dll' ,
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   380
	      	'zlib1.dll'
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   381
	      ]
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   382
			end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   383
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   384
    	task :'dist:jv:post' => :'dist:jv:variables'
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   385
    	cairo_dlls.each do | dll |
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   386
    		task :'dist:jv:post' => bin_dir / dll
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   387
				file bin_dir / dll do
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   388
					mkdir_p bin_dir
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   389
					cp cairo_dll_dir / dll , bin_dir / dll
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   390
				end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   391
    	end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   392
    end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   393
4
48ec8a59ced4 Renamed `dist` target to `install`. Added new target `artifacts` (mainly) for Jenkins builds.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 0
diff changeset
   394
    task :'dist:jv-branch' => [ :'dist:jv:all',                                                          
48ec8a59ced4 Renamed `dist` target to `install`. Added new target `artifacts` (mainly) for Jenkins builds.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 0
diff changeset
   395
                                :'dist:jv:doc' ]
0
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   396
4
48ec8a59ced4 Renamed `dist` target to `install`. Added new target `artifacts` (mainly) for Jenkins builds.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 0
diff changeset
   397
    task :'install:main' => [:'stx:jv-branch:extractver']
48ec8a59ced4 Renamed `dist` target to `install`. Added new target `artifacts` (mainly) for Jenkins builds.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 0
diff changeset
   398
    task :'artifacts:main' => [:'stx:jv-branch:extractver']
8
659ebd541dd2 Create extra archives with pre-build stc and librun
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 7
diff changeset
   399
    task :'artifacts:post' => [:'stx:jv-branch:extractver'] do  
659ebd541dd2 Create extra archives with pre-build stc and librun
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 7
diff changeset
   400
      # Just to be sure, refuse to create stc and librun archives
659ebd541dd2 Create extra archives with pre-build stc and librun
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 7
diff changeset
   401
      # if the directory contain sources. This is to prevent accidental
659ebd541dd2 Create extra archives with pre-build stc and librun
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 7
diff changeset
   402
      # leak of non-disclosed sources. Better safe than sorry!
11
f7dc950d8df8 Automatically download pre-built librun and stc when sources are not available.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 10
diff changeset
   403
      if core_developer? || (File.exist? BUILD_DIR / 'stx' / 'stc' / '.hg') || (File.exist? BUILD_DIR / 'stx' / 'stc' / 'CVS') then
8
659ebd541dd2 Create extra archives with pre-build stc and librun
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 7
diff changeset
   404
        puts "WARNING: NOT CREATING stc archive since directory contains sources!!!"
659ebd541dd2 Create extra archives with pre-build stc and librun
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 7
diff changeset
   405
      else
659ebd541dd2 Create extra archives with pre-build stc and librun
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 7
diff changeset
   406
        # Be paranoid, do cleanup here. Should have been done, but who knows...
659ebd541dd2 Create extra archives with pre-build stc and librun
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 7
diff changeset
   407
        cleanup_stc() 
659ebd541dd2 Create extra archives with pre-build stc and librun
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 7
diff changeset
   408
    	  zip BUILD_DIR / 'stx' / 'stc' , archive: ARTIFACTS_DIR / "#{project.app_name}-#{project.app_version}_#{ARCH}-#{win32? ? 'win32' : RbConfig::CONFIG['host_os']}_prebuilt-stc"
659ebd541dd2 Create extra archives with pre-build stc and librun
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 7
diff changeset
   409
      end
11
f7dc950d8df8 Automatically download pre-built librun and stc when sources are not available.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 10
diff changeset
   410
      if core_developer? || (File.exist? BUILD_DIR / 'stx' / 'librun' / '.hg') || (File.exist? BUILD_DIR / 'stx' / 'librun' / 'CVS') then
8
659ebd541dd2 Create extra archives with pre-build stc and librun
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 7
diff changeset
   411
        puts  "WARNING: NOT CREATING librun archive since directory contains sources!!!"
659ebd541dd2 Create extra archives with pre-build stc and librun
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 7
diff changeset
   412
      else
659ebd541dd2 Create extra archives with pre-build stc and librun
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 7
diff changeset
   413
        # Be paranoid, do cleanup here. Should have been done, but who knows...
659ebd541dd2 Create extra archives with pre-build stc and librun
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 7
diff changeset
   414
        cleanup_librun() 
659ebd541dd2 Create extra archives with pre-build stc and librun
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 7
diff changeset
   415
    	  zip BUILD_DIR / 'stx' / 'librun' , archive: ARTIFACTS_DIR / "#{project.app_name}-#{project.app_version}_#{ARCH}-#{win32? ? 'win32' : RbConfig::CONFIG['host_os']}_prebuilt-librun"
659ebd541dd2 Create extra archives with pre-build stc and librun
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 7
diff changeset
   416
      end
659ebd541dd2 Create extra archives with pre-build stc and librun
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 7
diff changeset
   417
    end
0
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   418
  end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   419
end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   420
4
48ec8a59ced4 Renamed `dist` target to `install`. Added new target `artifacts` (mainly) for Jenkins builds.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 0
diff changeset
   421
task :'stx:jv-branch:extractver' => :'setup' do
0
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   422
  ver = nil
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   423
  if win32?
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   424
    stx_exe = 'stx.com'
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   425
  else
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   426
    stx_exe = './stx'
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   427
  end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   428
  chdir BUILD_DIR / 'stx' / 'projects' / 'smalltalk' do
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   429
    ver = %x(#{stx_exe} --eval "Stdout nextPutAll: Smalltalk versionString")
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   430
    if $?.exitstatus != 0
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   431
      raise Exception.new("Failed extract version from stx")
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   432
    end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   433
  end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   434
  ver = (ver.split(".")[0..2]).join(".")
7
b6fe3a90f6e0 Added `zip()` & `unzip()` extensions to easily create / extract archives from build scripts.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 4
diff changeset
   435
  project.app_version "#{ver}_#{BUILD_ID}"
4
48ec8a59ced4 Renamed `dist` target to `install`. Added new target `artifacts` (mainly) for Jenkins builds.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 0
diff changeset
   436
  # This is really ugly. We need to clean that up...
48ec8a59ced4 Renamed `dist` target to `install`. Added new target `artifacts` (mainly) for Jenkins builds.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 0
diff changeset
   437
  BUILD_NAME.replace "#{project.app_name}-#{project.app_version}_#{ARCH}-#{win32? ? 'win32' : RbConfig::CONFIG['host_os']}"
0
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   438
end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   439
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   440
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   441
project :'stx:jv-branch:for-reports-only' do
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   442
  import :'stx:jv-branch'
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   443
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   444
  tasks do
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   445
    task :'stx:projects/smalltalk:pre' do
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   446
      chdir BUILD_DIR / 'stx' / 'projects' / 'smalltalk' do
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   447
         if win32?
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   448
           system "bmake clobber"
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   449
         else
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   450
           system "make clobber"
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   451
         end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   452
      end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   453
    end
4
48ec8a59ced4 Renamed `dist` target to `install`. Added new target `artifacts` (mainly) for Jenkins builds.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 0
diff changeset
   454
    
48ec8a59ced4 Renamed `dist` target to `install`. Added new target `artifacts` (mainly) for Jenkins builds.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 0
diff changeset
   455
    clear :'dist:install' => :'dist:jv-branch'
0
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   456
  end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   457
end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   458