Пример #1
0
def main():
    """ Creates NSIS installer for BLAST command line binaries """
    global VERBOSE  #IGNORE:W0603
    parser = OptionParser("%prog <blast_version> <installation directory>")
    parser.add_option("-v",
                      "--verbose",
                      action="store_true",
                      default=False,
                      help="Show verbose output",
                      dest="VERBOSE")
    options, args = parser.parse_args()
    if len(args) != 2:
        parser.error("Incorrect number of arguments")
        return 1

    blast_version, installdir = args
    VERBOSE = options.VERBOSE

    apps = [
        "magicblast.exe", "ncbi-vdb-md.dll", "makeblastdb.exe",
        "libgcc_s_seh-1.dll", "libgmp-10.dll", "libgnutls-30.dll",
        "libhogweed-4-2.dll", "libnettle-6-2.dll", "libp11-kit-0.dll",
        "msvcp140.dll"
        #             "msvcr120.dll"
    ]

    cwd = os.getcwd()
    for app in apps:
        app = os.path.join(installdir, "bin", app)
        if VERBOSE:
            print("Copying", app, "to", cwd)
        shutil.copy(app, cwd)

    update_blast_version(NSIS_CONFIG, blast_version)
    # Copy necessary files to the current working directory
    shutil.copy(NSIS_CONFIG, cwd)
    license_file = os.path.join(SCRIPT_DIR, "..", "..", "LICENSE")
    shutil.copy(license_file, cwd)

    # Copy the README file from the parent directory
    readme_file = os.path.join(SCRIPT_DIR, "..", "..", "README")
    shutil.copy(readme_file, cwd)

    for aux_file in ("EnvVarUpdate.nsh", "ncbilogo.ico", "unix2dos.nsh"):
        src = os.path.join(SCRIPT_DIR, aux_file)
        if VERBOSE:
            print("Copying", src, "to", cwd)
        shutil.copy(src, cwd)

    # makensis is in the path of the script courtesy of the release framework
    cmd = "makensis " + os.path.basename(NSIS_CONFIG)
    safe_exec(cmd)

    installer_dir = os.path.join(installdir, "installer")
    if not os.path.exists(installer_dir):
        os.makedirs(installer_dir)

    installer = extract_installer()
    shutil.copy(installer, installer_dir)
Пример #2
0
def main():
    """ Creates NSIS installer for BLAST command line binaries """
    global VERBOSE #IGNORE:W0603
    parser = OptionParser("%prog <blast_version> <installation directory>")
    parser.add_option("-v", "--verbose", action="store_true", default=False,
                      help="Show verbose output", dest="VERBOSE")
    options, args = parser.parse_args()
    if len(args) != 2:
        parser.error("Incorrect number of arguments")
        return 1
    
    blast_version, installdir = args
    VERBOSE = options.VERBOSE
    
    apps = [ "cobalt.exe",
             "libgcc_s_seh-1.dll",
             "libgmp-10.dll",
             "libgnutls-30.dll",
             "libhogweed-4-2.dll",
             "libnettle-6-2.dll",
             "libp11-kit-0.dll",
             "msvcp120.dll",
             "msvcr120.dll"
             ]
    
    cwd = os.getcwd()
    for app in apps:
        app = os.path.join(installdir, "bin", app)
        if VERBOSE: 
            print("Copying", app, "to", cwd)
        shutil.copy(app, cwd)
    
    
    update_blast_version(NSIS_CONFIG, blast_version)
    # Copy necessary files to the current working directory
    shutil.copy(NSIS_CONFIG, cwd)
    license_file = os.path.join(SCRIPT_DIR, "..", "..", "LICENSE")
    shutil.copy(license_file, cwd)

    # Copy the README file from the parent directory
    readme_file = os.path.join(SCRIPT_DIR, "..", "..", "README")
    shutil.copy(readme_file, cwd)    

    for aux_file in ("EnvVarUpdate.nsh", "ncbilogo.ico", "unix2dos.nsh"):
        src = os.path.join(SCRIPT_DIR, aux_file)
        if VERBOSE:
            print("Copying", src, "to", cwd)
        shutil.copy(src, cwd)
        
    # makensis is in the path of the script courtesy of the release framework
    cmd = "makensis " + os.path.basename(NSIS_CONFIG)
    safe_exec(cmd)

    installer_dir = os.path.join(installdir, "installer")
    if not os.path.exists(installer_dir):
        os.makedirs(installer_dir)

    installer = extract_installer()
    shutil.copy(installer, installer_dir)
Пример #3
0
def main():
    """ Creates NSIS installer for BLAST command line binaries """
    global VERBOSE  #IGNORE:W0603
    parser = OptionParser("%prog <blast_version> <installation directory>")
    parser.add_option("-v",
                      "--verbose",
                      action="store_true",
                      default=False,
                      help="Show verbose output",
                      dest="VERBOSE")
    options, args = parser.parse_args()
    if len(args) != 2:
        parser.error("Incorrect number of arguments")
        return 1

    blast_version, installdir = args
    VERBOSE = options.VERBOSE

    apps = [
        "blastn.exe", "blastp.exe", "blastx.exe", "tblastx.exe", "tblastn.exe",
        "rpsblast.exe", "rpstblastn.exe", "psiblast.exe", "blastdbcmd.exe",
        "makeblastdb.exe", "blastdb_aliastool.exe", "segmasker.exe",
        "dustmasker.exe", "windowmasker.exe", "legacy_blast.pl"
    ]

    cwd = os.getcwd()
    for app in apps:
        app = os.path.join(installdir, "bin", app)
        if VERBOSE:
            print "Copying", app, "to", cwd
        copy(app, cwd)

    update_blast_version(NSIS_CONFIG, blast_version)
    # Copy necessary files to the current working directory
    copy(NSIS_CONFIG, cwd)
    license_file = os.path.join(SCRIPT_DIR, "..", "..", "LICENSE")
    copy(license_file, cwd)

    (manual_path, headers) = urlretrieve(MANUAL_URL, "user_manual.pdf")
    for aux_file in ("EnvVarUpdate.nsh", "ncbilogo.ico"):
        src = os.path.join(SCRIPT_DIR, aux_file)
        if VERBOSE:
            print "Copying", src, "to", cwd
        copy(src, cwd)

    # makensis is in the path of the script courtesy of the release framework
    cmd = "makensis " + os.path.basename(NSIS_CONFIG)
    safe_exec(cmd)

    installer_dir = os.path.join(installdir, "installer")
    if not os.path.exists(installer_dir):
        os.makedirs(installer_dir)

    installer = extract_installer()
    copy(installer, installer_dir)
Пример #4
0
def main():
    """ Creates NSIS installer for BLAST command line binaries """
    global VERBOSE #IGNORE:W0603
    parser = OptionParser("%prog <blast_version> <installation directory>")
    parser.add_option("-v", "--verbose", action="store_true", default=False,
                      help="Show verbose output", dest="VERBOSE")
    options, args = parser.parse_args()
    if len(args) != 2:
        parser.error("Incorrect number of arguments")
        return 1
    
    blast_version, installdir = args
    VERBOSE = options.VERBOSE
    
    apps = [ "blastn.exe", 
             "blastp.exe",
             "blastx.exe",
             "tblastx.exe",
             "tblastn.exe",
             "rpsblast.exe",
             "rpstblastn.exe",
             "psiblast.exe",
             "blastdbcmd.exe",
             "makeblastdb.exe",
             "makembindex.exe",
             "makeprofiledb.exe",
             "blastdb_aliastool.exe",
             "segmasker.exe",
             "dustmasker.exe",
             "windowmasker.exe",
             "convert2blastmask.exe",
             "blastdbcheck.exe",
             "blast_formatter.exe",
             "deltablast.exe",
             "legacy_blast.pl",
             "update_blastdb.pl" ]
    
    cwd = os.getcwd()
    for app in apps:
        app = os.path.join(installdir, "bin", app)
        if VERBOSE: 
            print "Copying", app, "to", cwd
        shutil.copy(app, cwd)
    
    
    update_blast_version(NSIS_CONFIG, blast_version)
    # Copy necessary files to the current working directory
    shutil.copy(NSIS_CONFIG, cwd)
    license_file = os.path.join(SCRIPT_DIR, "..", "..", "LICENSE")
    shutil.copy(license_file, cwd)

    # User manual PDF is replaced by README.txt
    f = open("README.txt", "w")
    f.write("Documentation available in http://www.ncbi.nlm.nih.gov/books/NBK1762\n")
    f.close()

    for aux_file in ("EnvVarUpdate.nsh", "ncbilogo.ico"):
        src = os.path.join(SCRIPT_DIR, aux_file)
        if VERBOSE:
            print "Copying", src, "to", cwd
        shutil.copy(src, cwd)
        
    # makensis is in the path of the script courtesy of the release framework
    cmd = "makensis " + os.path.basename(NSIS_CONFIG)
    safe_exec(cmd)

    installer_dir = os.path.join(installdir, "installer")
    if not os.path.exists(installer_dir):
        os.makedirs(installer_dir)

    installer = extract_installer()
    shutil.copy(installer, installer_dir)
Пример #5
0
def main():
    """ Creates NSIS installer for BLAST command line binaries """
    global VERBOSE #IGNORE:W0603
    parser = OptionParser("%prog <blast_version> <installation directory>")
    parser.add_option("-v", "--verbose", action="store_true", default=False,
                      help="Show verbose output", dest="VERBOSE")
    options, args = parser.parse_args()
    if len(args) != 2:
        parser.error("Incorrect number of arguments")
        return 1
    
    blast_version, installdir = args
    VERBOSE = options.VERBOSE
    
    apps = [ "igblastn.exe", "igblastp.exe" ]
    
    cwd = os.getcwd()
    for app in apps:
        app = os.path.join(installdir, "bin", app)
        if VERBOSE: 
            print("Copying", app, "to", cwd)
        shutil.copy(app, cwd)
    
    
    update_blast_version(NSIS_CONFIG, blast_version)
    # Copy necessary files to the current working directory
    shutil.copy(NSIS_CONFIG, cwd)
    license_file = os.path.join(SCRIPT_DIR, "..", "..", "LICENSE")
    shutil.copy(license_file, cwd)

    # Copy the README file from the parent directory
    readme_file = os.path.join(SCRIPT_DIR, "..", "..", "README")
    shutil.copy(readme_file, cwd)

    # Copy the data directories, make sure there are no .svn directories
    for directory in ("internal_data", "optional_file"):
        newdir = os.path.join(SCRIPT_DIR, "..", "..", "..", "..", "..", 
                           "src", "app", "igblast")
        os.chdir(newdir)
        dest = os.path.join(cwd, directory)
        if VERBOSE:
            print("Copying", directory, "to", dest)
        shutil.copytree(directory, dest)
    os.chdir(cwd)
    for root, dirs, files in os.walk(cwd):
        for subdir in dirs:
            path = os.path.join(root, subdir)
            if subdir == ".svn":
                if VERBOSE:
                    print("Removing", path)
                shutil.rmtree(path)

    for aux_file in ("EnvVarUpdate.nsh", "unix2dos.nsh", "ncbilogo.ico"):
        src = os.path.join(SCRIPT_DIR, aux_file)
        if VERBOSE:
            print("Copying", src, "to", cwd)
        shutil.copy(src, cwd)
        
    # makensis is in the path of the script courtesy of the release framework
    cmd = "makensis " + os.path.basename(NSIS_CONFIG)
    safe_exec(cmd)

    installer_dir = os.path.join(installdir, "installer")
    if not os.path.exists(installer_dir):
        os.makedirs(installer_dir)

    installer = extract_installer()
    shutil.copy(installer, installer_dir)
Пример #6
0
def main():
    """ Creates NSIS installer for BLAST command line binaries """
    global VERBOSE  #IGNORE:W0603
    parser = OptionParser("%prog <blast_version> <installation directory>")
    parser.add_option("-v",
                      "--verbose",
                      action="store_true",
                      default=False,
                      help="Show verbose output",
                      dest="VERBOSE")
    options, args = parser.parse_args()
    if len(args) != 2:
        parser.error("Incorrect number of arguments")
        return 1

    blast_version, installdir = args
    VERBOSE = options.VERBOSE

    apps = [
        "igblastn.exe", "igblastp.exe", "edit_imgt_file.pl", "ncbi-vdb-md.dll",
        "makeblastdb.exe"
    ]

    cwd = os.getcwd()
    for app in apps:
        app = os.path.join(installdir, "bin", app)
        if VERBOSE:
            print("Copying", app, "to", cwd)
        shutil.copy(app, cwd)

    dll = os.path.join('\\\\', 'snowman', 'win-coremake', 'Lib', 'ThirdParty',
                       'nghttp2', 'vs2017.64', '1.33.0', 'bin', 'ReleaseDLL',
                       'nghttp2.dll')
    shutil.copy(dll, cwd)

    update_blast_version(NSIS_CONFIG, blast_version)
    # Copy necessary files to the current working directory
    shutil.copy(NSIS_CONFIG, cwd)
    license_file = os.path.join(SCRIPT_DIR, "..", "..", "LICENSE")
    shutil.copy(license_file, cwd)

    # Copy the README file from the parent directory
    readme_file = os.path.join(SCRIPT_DIR, "..", "..", "README")
    shutil.copy(readme_file, cwd)

    # Copy the data directories, make sure there are no .svn directories
    for directory in ("internal_data", "optional_file"):
        newdir = os.path.join(SCRIPT_DIR, "..", "..", "..", "..", "..", "src",
                              "app", "igblast")
        os.chdir(newdir)
        dest = os.path.join(cwd, directory)
        if VERBOSE:
            print("Copying", directory, "to", dest)
        shutil.copytree(directory, dest)
    os.chdir(cwd)
    for root, dirs, files in os.walk(cwd):
        for subdir in dirs:
            path = os.path.join(root, subdir)
            if subdir == ".svn":
                if VERBOSE:
                    print("Removing", path)
                shutil.rmtree(path)

    for aux_file in ("EnvVarUpdate.nsh", "unix2dos.nsh", "ncbilogo.ico"):
        src = os.path.join(SCRIPT_DIR, aux_file)
        if VERBOSE:
            print("Copying", src, "to", cwd)
        shutil.copy(src, cwd)

    # makensis is in the path of the script courtesy of the release framework
    cmd = "makensis " + os.path.basename(NSIS_CONFIG)
    safe_exec(cmd)

    installer_dir = os.path.join(installdir, "installer")
    if not os.path.exists(installer_dir):
        os.makedirs(installer_dir)

    installer = extract_installer()
    shutil.copy(installer, installer_dir)
Пример #7
0
def main():
    """ Creates NSIS installer for BLAST command line binaries """
    global VERBOSE  #IGNORE:W0603
    parser = OptionParser("%prog <blast_version> <installation directory>")
    parser.add_option("-v",
                      "--verbose",
                      action="store_true",
                      default=False,
                      help="Show verbose output",
                      dest="VERBOSE")
    options, args = parser.parse_args()
    if len(args) != 2:
        parser.error("Incorrect number of arguments")
        return 1

    blast_version, installdir = args
    VERBOSE = options.VERBOSE

    apps = [
        "blastn.exe", "blastp.exe", "blastx.exe", "tblastx.exe", "tblastn.exe",
        "rpsblast.exe", "rpstblastn.exe", "psiblast.exe", "blastdbcmd.exe",
        "makeblastdb.exe", "makembindex.exe", "makeprofiledb.exe",
        "blastdb_aliastool.exe", "segmasker.exe", "dustmasker.exe",
        "windowmasker.exe", "convert2blastmask.exe", "blastdbcheck.exe",
        "blast_formatter.exe", "deltablast.exe", "legacy_blast.pl",
        "update_blastdb.pl"
    ]

    cwd = os.getcwd()
    for app in apps:
        app = os.path.join(installdir, "bin", app)
        if VERBOSE:
            print "Copying", app, "to", cwd
        shutil.copy(app, cwd)

    update_blast_version(NSIS_CONFIG, blast_version)
    # Copy necessary files to the current working directory
    shutil.copy(NSIS_CONFIG, cwd)
    license_file = os.path.join(SCRIPT_DIR, "..", "..", "LICENSE")
    shutil.copy(license_file, cwd)

    # User manual PDF is replaced by README.txt
    f = open("README.txt", "w")
    f.write(
        "Documentation available in http://www.ncbi.nlm.nih.gov/books/NBK1762\n"
    )
    f.close()

    for aux_file in ("EnvVarUpdate.nsh", "ncbilogo.ico"):
        src = os.path.join(SCRIPT_DIR, aux_file)
        if VERBOSE:
            print "Copying", src, "to", cwd
        shutil.copy(src, cwd)

    # makensis is in the path of the script courtesy of the release framework
    cmd = "makensis " + os.path.basename(NSIS_CONFIG)
    safe_exec(cmd)

    installer_dir = os.path.join(installdir, "installer")
    if not os.path.exists(installer_dir):
        os.makedirs(installer_dir)

    installer = extract_installer()
    shutil.copy(installer, installer_dir)