Ejemplo n.º 1
0
def patch_eclipse_installer(location, oomph_file_location):
    with open(location + '/eclipse-inst.ini', 'a') as iniFile:
        iniFile.write(
            '-Doomph.redirection.myProjectsCatalog=index:/redirectable.projects.setup->https://raw.githubusercontent.com/microHAL/microIDE/devel/eclipse-installer/microideSetups/microhal.projects.setup\n'
        )
        iniFile.write('-Doomph.setup.product.catalog.filter=microide')
    # copying oomph setup files
    fs.make_directory_if_not_exist(location + '/microideLocalSetups')
    fs.copyfile(oomph_file_location + '/microide.product.setup.windows',
                location + '/microideLocalSetups/microide.product.setup')
Ejemplo n.º 2
0
def main():
    components_dir = '../norepo/windows/components'
    fs.make_directory_if_not_exist('../norepo/windows/downloads')
    download_files('../norepo/windows/downloads')
    # do some clenup
    shutil.rmtree(components_dir, ignore_errors=True)
    # start creating installers
    extract_files('../norepo/windows/downloads/', components_dir)
    generateWindowsProductSetup()  # generate oomph setup files for windows
    patch_eclipse_installer(components_dir + '/eclipse-installer',
                            '../eclipse-installer/microideLocalSetups/')
    update_files_information()
    generateInnoSetupFile(microideVersion, '../norepo/windows')
    compile_online_installer()
    compile_offline_installer()
Ejemplo n.º 3
0
def copy_files_from_last_patch(last_patch_location, tmp_patch_dir):
    print("Create copy of files from previous patch.")
    # make directory for copies
    filesystem.make_directory_if_not_exist(tmp_patch_dir)
    # copy gthr.h
    file_path = findFile(last_patch_location, 'gthr.h')
    filesystem.copyfile(file_path, tmp_patch_dir + '/gthr.h.old')
    # copy thread
    file_path = findFile(last_patch_location, 'thread')
    filesystem.copyfile(file_path, tmp_patch_dir + '/thread.old')
    # copy mutex
    file_path = findFile(last_patch_location, 'mutex')
    filesystem.copyfile(file_path, tmp_patch_dir + '/mutex.old')
    # copy condition_variable
    file_path = findFile(last_patch_location, 'condition_variable')
    filesystem.copyfile(file_path, tmp_patch_dir + '/condition_variable.old')
Ejemplo n.º 4
0
def extract_files(download_dir, destination):
    print("Extracting windows instalation files...")
    fs.make_directory_if_not_exist(destination)
    # do some clenup
    shutil.rmtree(destination, ignore_errors=True)

    fs.extract(download_dir + cppcheck['filename'], destination + '/cppcheck')
    fs.extract(download_dir + doxygen['filename'], destination + '/doxygen')
    extract_eclipse_files(download_dir + eclipse['filename'],
                          destination + '/eclipse-installer')
    fs.extract(download_dir + gcc_arm_none_eabi['filename'],
               destination + '/gcc_arm_none_eabi')
    fs.extract(download_dir + graphviz['filename'], destination + '/graphviz')
    fs.extract(download_dir + clang['filename'], destination + '/clang')
    fs.extract(download_dir + msys['filename'], destination + '/msys')
    fs.extract(download_dir + openOCD['filename'], destination + '/openocd')
    fs.extract(download_dir + mingw['filename'], destination + '/mingw')
Ejemplo n.º 5
0
def copy_files_to_tmp_patch_location(toolchain_unpack_dir, tmp_patch_dir):
    print("Create copy of original files")
    # make directory for copies
    filesystem.make_directory_if_not_exist(tmp_patch_dir)
    # copy gthr.h
    file_path = findFile(toolchain_unpack_dir, 'gthr.h')
    filesystem.copyfile(file_path, tmp_patch_dir + '/gthr.h.oryg')
    filesystem.copyfile(file_path, tmp_patch_dir + '/gthr.h')
    # copy thread
    file_path = findFile(toolchain_unpack_dir, 'thread')
    filesystem.copyfile(file_path, tmp_patch_dir + '/thread.oryg')
    filesystem.copyfile(file_path, tmp_patch_dir + '/thread')
    # copy mutex
    file_path = findFile(toolchain_unpack_dir, 'mutex')
    filesystem.copyfile(file_path, tmp_patch_dir + '/mutex.oryg')
    filesystem.copyfile(file_path, tmp_patch_dir + '/mutex')
    # copy condition_variable
    file_path = findFile(toolchain_unpack_dir, 'condition_variable')
    filesystem.copyfile(file_path, tmp_patch_dir + '/condition_variable.oryg')
    filesystem.copyfile(file_path, tmp_patch_dir + '/condition_variable')
Ejemplo n.º 6
0
def main():
    files_utils.make_directory_if_not_exist('../norepo/linux/toolchains')
    files_utils.make_directory_if_not_exist('../norepo/linux/openocd')
    files_utils.make_directory_if_not_exist('../norepo/linux/eclipse')

    print("Generating instalation files...")
    files_utils.getMissingFiles('../norepo/linux/toolchains',
                                [gcc_arm_none_eabi])
    files_utils.getMissingFiles('../norepo/linux/openocd', [openOCD])
    files_utils.getMissingFiles('../norepo/linux/eclipse', [eclipse])
    files_utils.updateFileinfo('../norepo/linux/toolchains',
                               [gcc_arm_none_eabi])
    files_utils.updateFileinfo('../norepo/linux/openocd', [openOCD])
    files_utils.updateFileinfo('../norepo/linux/eclipse', [eclipse])

    generate_linux_product_setup()
    generate_linux_installer()
Ejemplo n.º 7
0
def extract_toolchain(source, destynation):
    print("Extracting toolchain files...")
    filesystem.make_directory_if_not_exist(destynation)
    filesystem.untar(source, destynation)
Ejemplo n.º 8
0
def download_toolchain_if_needed(toolchain, download_dir):
    filesystem.make_directory_if_not_exist(download_dir)
    filesystem.getMissingFiles(download_dir, [toolchain])