specs/stx-jv.rbspec
author Jan Vrany <jan.vrany@fit.cvut.cz>
Tue, 07 Jun 2016 10:33:32 +0100
changeset 32 0872e75d5c5c
parent 31 2689201485d0
child 37 61064ee32813
permissions -rw-r--r--
Use BitBucket repositories instead (mirrors) on swing.fit.cvut.cz Hooray!
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
29
cd2e05aff563 Switch URL of prebuilt stc and librun archives to 'production' job 'stx_jv'
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 28
diff changeset
    17
  build = Jenkins::Build.new(%Q{https://swing.fit.cvut.cz/jenkins/job/stx_jv/ARCH=#{ARCH},PLATFORM=#{plat}N/lastSuccessfulBuild})
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
    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
  # ======================================================================
32
0872e75d5c5c Use BitBucket repositories instead (mirrors) on swing.fit.cvut.cz
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 31
diff changeset
    50
  package "stx:libbasic", :repository => :'bitbucket:janvrany', :branch => 'jv'
0872e75d5c5c Use BitBucket repositories instead (mirrors) on swing.fit.cvut.cz
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 31
diff changeset
    51
  package "stx:libbasic2", :repository => :'bitbucket:janvrany', :branch => 'jv'
0872e75d5c5c Use BitBucket repositories instead (mirrors) on swing.fit.cvut.cz
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 31
diff changeset
    52
  package "stx:libbasic3", :repository => :'bitbucket:janvrany', :branch => 'jv'
0872e75d5c5c Use BitBucket repositories instead (mirrors) on swing.fit.cvut.cz
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 31
diff changeset
    53
  package "stx:libcomp", :repository => :'bitbucket:janvrany', :branch => 'jv'
0872e75d5c5c Use BitBucket repositories instead (mirrors) on swing.fit.cvut.cz
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 31
diff changeset
    54
  package "stx:libtool", :repository => :'bitbucket:janvrany', :branch => 'jv'
0
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    55
 
32
0872e75d5c5c Use BitBucket repositories instead (mirrors) on swing.fit.cvut.cz
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 31
diff changeset
    56
  package "stx:libview", :repository => :'bitbucket:janvrany', :branch => 'jv'
0872e75d5c5c Use BitBucket repositories instead (mirrors) on swing.fit.cvut.cz
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 31
diff changeset
    57
  package "stx:libview2", :repository => :'bitbucket:janvrany', :branch => 'jv'
0872e75d5c5c Use BitBucket repositories instead (mirrors) on swing.fit.cvut.cz
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 31
diff changeset
    58
  package "stx:libwidg", :repository => :'bitbucket:janvrany', :branch => 'jv'
0872e75d5c5c Use BitBucket repositories instead (mirrors) on swing.fit.cvut.cz
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 31
diff changeset
    59
  package "stx:libwidg2", :repository => :'bitbucket:janvrany', :branch => 'jv'
0
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    60
32
0872e75d5c5c Use BitBucket repositories instead (mirrors) on swing.fit.cvut.cz
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 31
diff changeset
    61
  package "stx:goodies/sunit", :repository => :'bitbucket:janvrany'
0872e75d5c5c Use BitBucket repositories instead (mirrors) on swing.fit.cvut.cz
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 31
diff changeset
    62
  package "stx:goodies/monticello", :repository => :'bitbucket:janvrany', :branch => 'jv'
0872e75d5c5c Use BitBucket repositories instead (mirrors) on swing.fit.cvut.cz
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 31
diff changeset
    63
  package "stx:goodies/refactoryBrowser", :repository => :'bitbucket:janvrany', :branch => 'jv'
0872e75d5c5c Use BitBucket repositories instead (mirrors) on swing.fit.cvut.cz
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 31
diff changeset
    64
  package "stx:libsvn", :repository => :'bitbucket:janvrany', :branch => 'jv'
0
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
14
a06f34a18af0 Defer build of documentation for STX:LIBJAVA and Mercurial to `install` step
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13
diff changeset
    78
    task "install:pre" do 
0
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    79
      chdir BUILD_DIR / 'stx' / 'libjava' do
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    80
        make "doc-install"
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    81
      end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    82
      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
    83
        make "doc-install"
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    84
      end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    85
    end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    86
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
    87
    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
    88
      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
    89
        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
    90
      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
    91
        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
    92
      end
0
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    93
    end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    94
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
    95
    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
    96
      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
    97
        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
    98
      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
    99
        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
   100
      end
0
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   101
    end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   102
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   103
    # 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
   104
    task :'compile:post' do
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   105
      if PROJECT == 'stx:jv-branch' then  
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   106
        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
   107
          if win32?
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   108
            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
   109
          else
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   110
            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
   111
          end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   112
          if not system cmd
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   113
            raise Exception.new("Cannot run smalltalk!")
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   114
          end
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
      end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   117
    end
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
  if (TOOLCHAIN == "mingw32" || TOOLCHAIN == 'mingw') then
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   120
    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
   121
    
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   122
    file BUILD_DIR / 'stx' / 'projects' / 'smalltalk' / 'libgcc_s_dw2-1.dll' do
14
a06f34a18af0 Defer build of documentation for STX:LIBJAVA and Mercurial to `install` step
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13
diff changeset
   123
      cp ENV['MINGW_DIR'] / 'bin' / 'libgcc_s_dw2-1.dll' , BUILD_DIR / 'stx' / 'projects' / 'smalltalk' / 'libgcc_s_dw2-1.dll'
0
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   124
    end
14
a06f34a18af0 Defer build of documentation for STX:LIBJAVA and Mercurial to `install` step
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13
diff changeset
   125
  end
0
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   126
  
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   127
  task :'stx:projects/smalltalk:pre' do   
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   128
    chdir (BUILD_DIR / 'stx' / 'projects' / 'smalltalk') do         
14
a06f34a18af0 Defer build of documentation for STX:LIBJAVA and Mercurial to `install` step
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13
diff changeset
   129
      # Hack for MINGW32 - must patch bc.mak ifdefs, sigh.
a06f34a18af0 Defer build of documentation for STX:LIBJAVA and Mercurial to `install` step
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13
diff changeset
   130
      # use ruby instead of sed as ruby has to be installed anyway    
a06f34a18af0 Defer build of documentation for STX:LIBJAVA and Mercurial to `install` step
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13
diff changeset
   131
      cmd = "ruby -ibkp -pe \"gsub /ifdef USEMINGW64/, 'if defined(USEMINGW64) || defined(USEMINGW32)'\" bc.mak"
a06f34a18af0 Defer build of documentation for STX:LIBJAVA and Mercurial to `install` step
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13
diff changeset
   132
      #puts cmd
a06f34a18af0 Defer build of documentation for STX:LIBJAVA and Mercurial to `install` step
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13
diff changeset
   133
      if not system(cmd)  then
a06f34a18af0 Defer build of documentation for STX:LIBJAVA and Mercurial to `install` step
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13
diff changeset
   134
          raise Exception.new("Cannot patch bc.mak")
a06f34a18af0 Defer build of documentation for STX:LIBJAVA and Mercurial to `install` step
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13
diff changeset
   135
      end      
a06f34a18af0 Defer build of documentation for STX:LIBJAVA and Mercurial to `install` step
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13
diff changeset
   136
    end     
0
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   137
  end
26
fc755e1f25b4 Nuked package stx:libprofiler
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 19
diff changeset
   138
    
fc755e1f25b4 Nuked package stx:libprofiler
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 19
diff changeset
   139
  if win32_wine?
0
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   140
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   141
    task :'stx:projects/smalltalk:pre' do   
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   142
      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
   143
        make "buildDate.h"    
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   144
      end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   145
    end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   146
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   147
    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
   148
      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
   149
        [
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   150
          '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
   151
          '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
   152
          '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
   153
          '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
   154
          '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
   155
          '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
   156
        ].each do | f |
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   157
          if not File.exists?(f)
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   158
            mkdir_p f
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   159
          end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   160
        end
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
    # 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
   166
    task :'stx:libtool:post' do
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   167
      chdir (BUILD_DIR / 'stx' / 'libtool') do
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   168
  # 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
   169
  if win32?
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   170
    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
   171
      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
   172
    end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   173
    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
   174
      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
   175
    end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   176
    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
   177
      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
   178
    end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   179
  else
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   180
    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
   181
      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
   182
    end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   183
    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
   184
      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
   185
    end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   186
    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
   187
      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
   188
    end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   189
  end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   190
      end
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
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
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
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   198
project :'stx:jv-branch' do
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   199
  # 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
   200
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   201
  import :'stx:jv-branch-core'
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   202
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   203
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   204
  app_name "smalltalkx-jv-branch"
13
ba905210e6bb Make more suitable guess of actual version string
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 11
diff changeset
   205
  app_version "6.2.5_#{BUILD_ID}"
0
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   206
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   207
  # Forked PetitParser
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   208
  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
   209
  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
   210
  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
   211
  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
   212
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   213
  # Monticello
10
cb3e0e3ca28f Fixed repository specifications to allow anonymous checkout.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 8
diff changeset
   214
  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
   215
  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
   216
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   217
  # Java support
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   218
  package "stx:libjava", :repository => :'bitbucket:janvrany'
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   219
  package "stx:libjava/tools"
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   220
  package "stx:libjava/experiments"
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   221
  #package "stx:libjava/examples" :link => false
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   222
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   223
  # Smalltalk/X IDE
32
0872e75d5c5c Use BitBucket repositories instead (mirrors) on swing.fit.cvut.cz
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 31
diff changeset
   224
  application 'stx:projects/smalltalk', :repository => :'bitbucket:janvrany', :branch => 'jv'
0
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
  if (ENV['USER'] == 'builder') || ( ENV['USER'] == 'vranyj1')  || (ENV['USERNAME'] == 'builder') || ( ENV['USERNAME'] == 'vranyj1') then
32
0872e75d5c5c Use BitBucket repositories instead (mirrors) on swing.fit.cvut.cz
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 31
diff changeset
   227
    repository :'mirror:swing' do
0872e75d5c5c Use BitBucket repositories instead (mirrors) on swing.fit.cvut.cz
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 31
diff changeset
   228
      type :hg
0872e75d5c5c Use BitBucket repositories instead (mirrors) on swing.fit.cvut.cz
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 31
diff changeset
   229
      url "https://swing.fit.cvut.cz/hg"    
0872e75d5c5c Use BitBucket repositories instead (mirrors) on swing.fit.cvut.cz
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 31
diff changeset
   230
      separator '-'
0872e75d5c5c Use BitBucket repositories instead (mirrors) on swing.fit.cvut.cz
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 31
diff changeset
   231
    end
0872e75d5c5c Use BitBucket repositories instead (mirrors) on swing.fit.cvut.cz
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 31
diff changeset
   232
0872e75d5c5c Use BitBucket repositories instead (mirrors) on swing.fit.cvut.cz
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 31
diff changeset
   233
    stx_libjava_checkouter =
0
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   234
         Proc.new do | pkg, build_dir |
32
0872e75d5c5c Use BitBucket repositories instead (mirrors) on swing.fit.cvut.cz
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 31
diff changeset
   235
             repo = :'mirror:swing'
0
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   236
             puts "Checking out #{pkg.name} from #{repo} (cache / staging repo)..."
31
2689201485d0 Oops, fixed few remaining uses of '.' as separator for SWING repositories.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 29
diff changeset
   237
             checkout repo, pkg.directory, :branch => pkg.branch, :package => pkg, :separator => '-'
0
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   238
             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
   239
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   240
             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
   241
                 f.puts "[paths]"
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   242
                 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
   243
             end
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
             repo = pkg.repository
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   246
             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
   247
             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
   248
             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
   249
         end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   250
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   251
     stx_libjava_updater =
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   252
         Proc.new do | pkg, build_dir |
32
0872e75d5c5c Use BitBucket repositories instead (mirrors) on swing.fit.cvut.cz
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 31
diff changeset
   253
             repo = :'mirror:swing'
0
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   254
             puts "Updating #{pkg.name} from #{repo} (cache / staging repo)..."
32
0872e75d5c5c Use BitBucket repositories instead (mirrors) on swing.fit.cvut.cz
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 31
diff changeset
   255
             update repo, pkg.directory, :branch => pkg.branch, :package => pkg, :separator => '-'
0
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   256
             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
   257
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   258
             repo = pkg.repository
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   259
             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
   260
             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
   261
             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
   262
         end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   263
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   264
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   265
     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
   266
  end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   267
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
  # Other nice packages...
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   270
  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
   271
    base = project.repository(pkg.repository).url
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   272
    pkg_comps = pkg.name.sub(':', '/').split("/");
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   273
    pkg_tail = pkg_comps.last
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   274
    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
   275
    wc = build_dir / pkg.directory
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   276
    FileUtils.mkdir_p(File.dirname(wc))
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   277
    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
   278
    puts "Issuing: #{cmd}"
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   279
    if not system cmd
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   280
      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
   281
    end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   282
  end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   283
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   284
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   285
  package 'stx:libscm', :repository => :'bitbucket:janvrany'
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   286
  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
   287
  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
   288
  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
   289
  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
   290
  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
   291
  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
   292
  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
   293
  package "stx:goodies/loggia", :repository => :'exept:public'
32
0872e75d5c5c Use BitBucket repositories instead (mirrors) on swing.fit.cvut.cz
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 31
diff changeset
   294
  package 'stx:goodies/smaCC',:repository => :'bitbucket:janvrany'
28
9d95c1c8f2ec Nuked package squeak:graphviz
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 27
diff changeset
   295
  
10
cb3e0e3ca28f Fixed repository specifications to allow anonymous checkout.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 8
diff changeset
   296
  #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
   297
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   298
  tasks do
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   299
    task "stx:projects/smalltalk" => "stx:libwebkit"
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   300
    task "stx:projects/smalltalk" => "stx:libjava"
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   301
    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
   302
    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
   303
    #task "stx:libjava/examples" => "stx:libjava"
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   304
    #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
   305
    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
   306
    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
   307
    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
   308
    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
   309
    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
   310
    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
   311
    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
   312
    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
   313
    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
   314
  
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
   315
    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
   316
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   317
    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
   318
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   319
    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
   320
      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
   321
	    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
   322
	    version = app_version.split('_').first
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   323
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
   324
	    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
   325
	    bin_dir = install_dir / 'bin'
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   326
13
ba905210e6bb Make more suitable guess of actual version string
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 11
diff changeset
   327
	    
0
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   328
    	cairo_dlls = nil
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   329
    	if ARCH == 'i386'
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   330
	      cairo_dlls =  [ 
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   331
	      	'libcairo-2.dll' ,
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   332
					'libfontconfig-1.dll' ,
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   333
					'libfreetype-6.dll' ,
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   334
					'liblzma-5.dll' ,
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   335
					'libpixman-1-0.dll' ,
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   336
					'libpng15-15.dll' ,
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   337
					'libxml2-2.dll' ,
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   338
					'zlib1.dll'
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   339
					]
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   340
			else
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   341
				cairo_dlls =  [ 
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   342
	      	'fontconfig.dll' ,
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   343
	      	'iconv.dll' ,
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   344
	      	'libcairo-2.dll' ,
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   345
	      	'libpng16.dll' ,
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   346
	      	'libxml2.dll' ,
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   347
	      	'pixman-1.dll' ,
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   348
	      	'zlib1.dll'
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   349
	      ]
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   350
			end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   351
13
ba905210e6bb Make more suitable guess of actual version string
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 11
diff changeset
   352
    	task :'dist:jv:post' => [ :'stx:jv-branch:extractver' , :'dist:jv:variables' ]
0
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   353
    	cairo_dlls.each do | dll |
13
ba905210e6bb Make more suitable guess of actual version string
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 11
diff changeset
   354
    		task :'dist:jv:post' => [ bin_dir / dll ]
0
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   355
				file bin_dir / dll do
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   356
					mkdir_p bin_dir
19
f98626b9ca2d Fixed path to Cairo DLLs for i386 build.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 16
diff changeset
   357
					cp BUILD_DIR / 'stx' / 'goodies' / 'libcairo' / 'support' / 'win32' / (ARCH == 'i386' ? 'i586' : ARCH) / dll , bin_dir / dll
0
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   358
				end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   359
    	end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   360
    end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   361
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
   362
    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
   363
                                :'dist:jv:doc' ]
0
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   364
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
   365
    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
   366
    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
   367
    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
   368
      # 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
   369
      # 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
   370
      # 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
   371
      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
   372
        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
   373
      else
659ebd541dd2 Create extra archives with pre-build stc and librun
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 7
diff changeset
   374
        # 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
   375
        cleanup_stc() 
659ebd541dd2 Create extra archives with pre-build stc and librun
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 7
diff changeset
   376
    	  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
   377
      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
   378
      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
   379
        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
   380
      else
659ebd541dd2 Create extra archives with pre-build stc and librun
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 7
diff changeset
   381
        # 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
   382
        cleanup_librun() 
659ebd541dd2 Create extra archives with pre-build stc and librun
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 7
diff changeset
   383
    	  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
   384
      end
659ebd541dd2 Create extra archives with pre-build stc and librun
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 7
diff changeset
   385
    end
0
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   386
  end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   387
end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   388
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
   389
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
   390
  ver = nil
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   391
  if win32?
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   392
    stx_exe = 'stx.com'
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   393
  else
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   394
    stx_exe = './stx'
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   395
  end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   396
  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
   397
    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
   398
    if $?.exitstatus != 0
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   399
      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
   400
    end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   401
  end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   402
  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
   403
  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
   404
  # 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
   405
  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
   406
end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   407
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   408
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   409
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
   410
  import :'stx:jv-branch'
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   411
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   412
  tasks do
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   413
    task :'stx:projects/smalltalk:pre' do
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   414
      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
   415
         if win32?
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   416
           system "bmake clobber"
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   417
         else
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   418
           system "make clobber"
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
      end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   421
    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
   422
    
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
   423
    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
   424
  end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   425
end
f46260ba26b1 Initial shot of "new" rake-based builder
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   426