Вот, таки настроил автосборку установочников!

Вот тут лежат результаты:
http://blackboxframework.org/dev

Тут больше деталей:
http://redmine.blackboxframework.org/issues/3#note-6


Получился вот такой файл примерно, это некий начальный вариант, который предполагается улучшать. Ваши предложения приветствуются!

## Код:
```
#!/usr/bin/python

from subprocess import Popen, PIPE
import sys, datetime

# this files contains hashes of last commits in master and development branches
DEVHASH = open("/var/www/tribiq/build/devHash", "r+")
STABLEHASH = open("/var/www/tribiq/build/stableHash", "r+")

process1 = Popen("cd /home/git/bbcb.git && git log", stdout=PIPE, stderr=PIPE, shell=True)
(stdout1, stderr1) = process1.communicate()
if stderr1 == "":
   hash1 = stdout1.split("\n")[0].split(" ")[1]
   if STABLEHASH.readline().strip() == hash1:
      rebuildStable = False
      #print "No new commits in 'master'
"
   else:
      rebuildStable = True
      #print "New commit in 'master', need to run build pipeline
"
else:
   print stderr1

process2 = Popen("cd /home/git/bbcb.git && git log development", stdout=PIPE, stderr=PIPE, shell=True)
(stdout2, stderr2) = process2.communicate()
if stderr2 == "":
   hash2 = stdout2.split("\n")[0].split(" ")[1]
   if DEVHASH.readline().strip() == hash2:
      rebuildDev = False
      #print "No new commits in 'developent'
"
   else:
      rebuildDev = True
      #print "New commit in 'development', need to run build pipeline
"
else:
   print stderr2


def log(out, err):
   if out != "":   
      for line1 in out.split("\n"):
         print line1 + "
"
   if err != "":
      for line2 in err.split("\n"):
         print line2 + "
"

#### BUILDING STABLE


if rebuildStable:
   print "Building from 'master' at " + datetime.datetime.now().isoformat() + "
"
   print "The build pipeline for 'master' brunch is not developed..."
   # STABLEHASH.seek(0)
   # STABLEHASH.write(hash1)
   # STABLEHASH.truncate()

#### BUILDING DEVELOPMENT
if rebuildDev:

   print "
<b>Building from 'development' at " + datetime.datetime.now().isoformat() + "</b>
"
   print "Trying to check repository state...
"
   try:
       f = open('/home/git/bbcb.git.lock', 'r')
   except IOError:
       print "Repository is not locked. Continuing.
"
   else:
       print "Repository is locked (possibly because of sync process).
Aborting.
"
       f.close()
       sys.exit()

   print "Trying to clone repository into temporary folder...
"

   process1 = Popen("cd /var/www/tribiq/build && git clone /home/git/bbcb.git bb", stdout=PIPE, stderr=PIPE, shell=True)
   (stdout1, stderr1) = process1.communicate()
   log(stdout1, stderr1)

   print "Checking out development...
"
   process2 = Popen("cd /var/www/tribiq/build/bb && git checkout development", stdout=PIPE, stderr=PIPE, shell=True)
   (stdout2, stderr2) = process2.communicate()
   log(stdout2, stderr2)

   print "Building BlackBox...
"
   process3 = Popen("cd /var/www/tribiq/build/bb && /usr/local/bin/wine dev0.exe < build.txt 2>&1", stdout=PIPE, stderr=PIPE, shell=True)
   (stdout3, stderr3) = process3.communicate()
   log(stdout3, stderr3)

   print "Building Setup File...
"
   process4 = Popen("cd /var/www/tribiq/build/bb && mv Code System/ && mv Sym System/ && cd appbuild && /usr/local/bin/iscc - < ./BlackBox.iss", stdout=PIPE, stderr=PIPE, shell=True)
   (stdout4, stderr4) = process4.communicate()
   log(stdout4, stderr4)

   IN = open("/var/www/tribiq/build/bb/appbuild/BlackBox.iss")

   for line in IN:
      if line.split("=")[0] == "AppVersion":
         version =  line.split("=")[1].strip()
   print "The version of build: " + version + "
"

   print "Moving Setup File to dev folder...
"
   process5 = Popen("mv /var/www/tribiq/build/bb/appbuild/Output/setup.exe /var/www/tribiq/dev/blackbox-" + version + "-setup.exe", stdout=PIPE, stderr=PIPE, shell=True)
   (stdout5, stderr5) = process5.communicate()
   log(stdout5, stderr5)

   if stderr5 == "":
      print "Hash for 'development' brunch updated
"
      DEVHASH.seek(0)
      DEVHASH.write(hash2)
      DEVHASH.truncate()

   print "Cleaning...
"
   process6 = Popen("cd /var/www/tribiq/build && rm bb -R", stdout=PIPE, stderr=PIPE, shell=True)
   (stdout6, stderr6) = process6.communicate()
   log(stdout6, stderr6)
```
