Beispiel #1
0
    def _build(self, client, subsystem):
        main_cpp = gen_function_cpp(name="main")
        client.save({"configure.ac": self.configure_ac,
                     "Makefile.am": self.makefile_am,
                     "main.cpp": main_cpp})

        path = unix_path(client.current_folder, subsystem)
        client.run_command('bash -lc "cd \\"%s\\" && autoreconf -fiv"' % path)
        client.run_command('bash -lc "cd \\"%s\\" && ./configure"' % path)
        client.run_command("make")
        client.run_command("app")
def adjust_path(path, win_bash=False, subsystem=None, compiler=None):
    """
    adjusts path to be safely passed to the compiler command line
    for Windows bash, ensures path is in format according to the subsystem
    for path with spaces, places double quotes around it
    converts slashes to backslashes, or vice versa
    """
    if str(compiler) == 'Visual Studio':
        path = path.replace('/', '\\')
    else:
        path = path.replace('\\', '/')
    if win_bash:
        path = unix_path(path, subsystem)
    return '"%s"' % path if ' ' in path else path
Beispiel #3
0
 def _adjust_path(self, path):
     if self._win_bash:
         path = unix_path(path, path_flavor=self.subsystem)
     return '"%s"' % path if " " in path else path
 def _adjust_path(self, path):
     if self._win_bash:
         path = unix_path(path, path_flavor=self.subsystem)
     return '"%s"' % path if " " in path else path