Rakefiles: distribute demos in the "toy" archive
authorJan Vrany <jan.vrany@fit.cvut.cz>
Tue, 02 Jan 2018 10:25:15 +0000
changeset 155 31e32b21a711
parent 154 bca6821cadad
child 156 95218ea5df58
Rakefiles: distribute demos in the "toy" archive ...so people can have a look. Beware that these demos are not maintained even by eXept and many, many of them are actually broken or depend on some obscure packages that are not maintained. Too bad. See https://swing.fit.cvut.cz/projects/stx-jv/ticket/189 (grafted from 6899f0183a0d3b097cdb3afa7b1bce7b8e80f41d)
specs/stx-jv.rbspec
--- a/specs/stx-jv.rbspec	Mon Dec 18 22:08:00 2017 +0000
+++ b/specs/stx-jv.rbspec	Tue Jan 02 10:25:15 2018 +0000
@@ -239,6 +239,44 @@
       checkout(:'exept:public', 'stx/goodies/CharacterEncoderCodeGenerator.st')
     end
 
+    # Checkout & install demos. Too bad that demos are not in a package itself but
+    # rather a set of scaterred files here and there. So we have to checkout
+    # and install them manually
+    task 'checkout:post' => 'checkout:demos'
+    task 'checkout:demos' => [ BUILD_DIR / 'stx' / 'doc' / 'coding' ,
+                               BUILD_DIR / 'stx' / 'goodies'  / 'demos' ,
+                               BUILD_DIR / 'stx' / 'clients' ]
+    file BUILD_DIR / 'stx' / 'doc' / 'coding' do
+      checkout(:'exept:public', 'stx/doc/coding')
+    end
+    file BUILD_DIR / 'stx' / 'goodies'  / 'demos' do
+      checkout(:'exept:public', 'stx/goodies/demos')
+    end
+    file BUILD_DIR / 'stx' / 'clients' do
+      checkout(:'exept:public', 'stx/clients')
+    end
+
+    task 'dist:jv:post' => 'dist:jv:demos'
+    task 'dist:jv:demos' do
+      cp_rx BUILD_DIR / 'stx' / 'doc' / 'coding', $install_jv_dirs[:pkg_dir] / 'stx' / 'doc' do |fname|
+        # fname is full path!!!
+        /\.svn|CVS|\.cvsignore|tests/.match(fname).nil?
+      end
+
+      cp_rx BUILD_DIR / 'stx' / 'goodies' / 'demos', $install_jv_dirs[:pkg_dir] / 'stx' / 'goodies'  do |fname|
+        # fname is full path!!!
+        /\.svn|CVS|\.cvsignore|tests/.match(fname).nil?
+      end
+
+      cp_rx BUILD_DIR / 'stx' / 'clients', $install_jv_dirs[:pkg_dir] / 'stx' do |fname|
+        # fname is full path!!!
+        /\.svn|CVS|\.cvsignore|tests/.match(fname).nil?
+      end
+    end
+
+
+
+
     task :'install:main' => :'dist:jv-branch'
 
     task :'dist:jv:pre' => :'stx:jv-branch:extractver'