Example #1
0
def clean():
    megarun(""" find jbrout -name "*.pyc" | xargs rm -fr
                find jbrout -name "*.orig" | xargs rm -fr
                find jbrout -name "*.rej" | xargs rm -fr
                find jbrout -name "*.bak" | xargs rm -fr
                find jbrout -name "*.gladep" | xargs rm -fr
                find jbrout -name "*.*~" | xargs rm -fr
                find dist -name "*.pyc" | xargs rm -fr
                rm -f jbrout/data/version.txt
                """)
Example #2
0
def writeVersionFiles():
    if os.path.isdir(os.path.join(basePath, '.git')):
        infoCmd = ["git","svn","info"]
    else:
        infoCmd = ["svn","info"]
    try:
        version=baseVersion + "." + re.search("(?<=Revision\: )\d+", run(infoCmd)).group()
        megarun(""" rm -f jbrout/data/version.txt
                    rm -f dist/version.nsi""")
        open("jbrout/data/version.txt","w").write(version)
        open("dist/version.nsi","w").write('!define PRODUCT_VERSION "' + version + '"')
    except:
        print """Unable to build windows version without version number from svn,
Example #3
0
def writeVersionFiles():
    if os.path.isdir(os.path.join(basePath, '.git')):
        infoCmd = ["git", "svn", "info"]
    else:
        infoCmd = ["svn", "info"]
    try:
        version = baseVersion + "." + re.search("(?<=Revision\: )\d+",
                                                run(infoCmd)).group()
        megarun(""" rm -f jbrout/data/version.txt
                    rm -f dist/version.nsi""")
        open("jbrout/data/version.txt", "w").write(version)
        open("dist/version.nsi",
             "w").write('!define PRODUCT_VERSION "' + version + '"')
    except:
        print """Unable to build windows version without version number from svn,
Example #4
0
import os
from libs import run,megarun,glob

if __name__ == "__main__":
    #==========================================================================
    # CHDIR at the root of jbrout app
    #==========================================================================
    os.chdir(os.path.join(os.path.dirname(__file__),"..","jbrout"))


    #==========================================================================
    # Update and compile PO/MO of jbrout
    #==========================================================================
    # extract glade in tmp/*.h
    for i in glob(".",["glade"],excludes=["plugins/*"]):
        megarun('intltool-extract -l --type=gettext/glade %s'%i)

    # build a POTFILES.in for py and tmp/*.glade.h
    l=glob(".",["h","py"],excludes=["plugins/*"],absolute=False)
    open("po/POTFILES.in","w").write("\n".join(["[encoding: UTF-8]"]+l+[""]))

    # update the pot file
    megarun("""
        cd po; intltool-update --pot --gettext-package=jbrout
        rm -rf tmp
        rm po/POTFILES.in
        """)

    # updates all po file, and compile to mo
    for i in glob("po",["po"]):
        f=i[:-3]
Example #5
0
        try:
            src = glob("packages/*.tar.gz")[0]
        except:
            src = None
        try:
            rpm = glob("packages/*.rpm")[0]
        except:
            rpm = None

        if deb:
            # make the 'binary' repository
            if not os.path.isdir("packages/binary"):
                os.makedirs("packages/binary")
            shutil.copy2(deb, "packages/binary")
            megarun("""
                cd packages && dpkg-scanpackages binary /dev/null | gzip -9c > binary/Packages.gz
                """)
            debs = glob("packages/binary/*")
        else:
            debs = []

        print "-" * 75
        print "DEBIAN : ", debs
        print "RPM : ", rpm
        print "SOURCE : ", src
        print "-" * 75
    else:
        print "packages are not here ?!?"

    home = os.environ['HOME']
Example #6
0
def mkWinStandAlone():
    megarun('rm -f dist/jBrout-*-Setup.exe')
    megarun('makensis %s'% os.path.join('dist','StandAlone-py2.5.nsi'))
Example #7
0
def mkWinLauncher():
    megarun('rm -f dist/jBrout.exe')
    megarun('makensis %s'% os.path.join('dist','launcher.nsi'))
Example #8
0
"""
import os
from libs import run, megarun, glob

if __name__ == "__main__":
    # ==========================================================================
    # CHDIR at the root of jbrout app
    # ==========================================================================
    os.chdir(os.path.join(os.path.dirname(__file__), "..", "jbrout"))

    # ==========================================================================
    # Update and compile PO/MO of jbrout
    # ==========================================================================
    # extract glade in tmp/*.h
    for i in glob(".", ["glade"], excludes=["plugins/*"]):
        megarun("intltool-extract -l --type=gettext/glade %s" % i)

    # build a POTFILES.in for py and tmp/*.glade.h
    l = glob(".", ["h", "py"], excludes=["plugins/*"], absolute=False)
    open("po/POTFILES.in", "w").write("\n".join(["[encoding: UTF-8]"] + l + [""]))

    # update the pot file
    megarun(
        """
        cd po; intltool-update --pot --gettext-package=jbrout
        rm -rf tmp
        rm po/POTFILES.in
        """
    )

    # updates all po file, and compile to mo
Example #9
0
            src = glob("packages/*.tar.gz")[0]
        except:
            src = None
        try:
            rpm = glob("packages/*.rpm")[0]
        except:
            rpm = None

        if deb:
            # make the 'binary' repository
            if not os.path.isdir("packages/binary"):
                os.makedirs("packages/binary")
            shutil.copy2(deb, "packages/binary")
            megarun(
                """
                cd packages && dpkg-scanpackages binary /dev/null | gzip -9c > binary/Packages.gz
                """
            )
            debs = glob("packages/binary/*")
        else:
            debs = []

        print "-" * 75
        print "DEBIAN : ", debs
        print "RPM : ", rpm
        print "SOURCE : ", src
        print "-" * 75
    else:
        print "packages are not here ?!?"

    home = os.environ["HOME"]
Example #10
0
def mkWinStandAlone():
    megarun('rm -f dist/jBrout-*-Setup.exe')
    megarun('makensis %s' % os.path.join('dist', 'StandAlone-py2.5.nsi'))
Example #11
0
def mkWinLauncher():
    megarun('rm -f dist/jBrout.exe')
    megarun('makensis %s' % os.path.join('dist', 'launcher.nsi'))