def get_msbuild_tools_path(): reg = winreg.ConnectRegistry(None, winreg.HKEY_LOCAL_MACHINE) key = winreg.OpenKey(reg, r"SOFTWARE\Microsoft\MSBuild\ToolsVersions\4.0") path = winreg.QueryValueEx(key, 'MSBuildToolsPath')[0] if not os.path.exists(path): raise FatalError("MSBuild tools not found") return fix_winpath(path)
def get_sdk_path(): reg = winreg.ConnectRegistry(None, winreg.HKEY_LOCAL_MACHINE) key = winreg.OpenKey( reg, r"SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.1") path = winreg.QueryValueEx(key, 'InstallationFolder')[0] if not os.path.exists(path): raise FatalError("Windows SDK not found") return fix_winpath(path)
def get_sdk_path(): reg = winreg.ConnectRegistry(None, winreg.HKEY_LOCAL_MACHINE) key = winreg.OpenKey(reg, r"SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.1") path = winreg.QueryValueEx(key, 'InstallationFolder')[0] if not os.path.exists(path): raise FatalError("Windows SDK not found") return fix_winpath(path)
def get_winddk_path(): path = None if 'WINDOWS_DRIVER_KIT' in os.environ: path = os.environ['WINDOWS_DRIVER_KIT'] else: path = "C:/WinDDK/7600.16385.1" if not os.path.exists(path): raise FatalError("Windows driver kit not found") return fix_winpath(path)
def install_pthreads(self): pthreadszip = os.path.join(self.prefix, 'pthreads.zip') shell.download(PTHREADS_URL, pthreadszip) temp = fix_winpath(os.path.abspath(tempfile.mkdtemp())) # real pthreads stuff is in a zip file inside the previous zip file # under mingwxx/pthreads-xx.zip shell.unpack(pthreadszip, temp) shell.unpack(os.path.join(temp, 'pthreads-20100604', 'ming%s' % self.version, 'pthreads-%s.zip' % self.version), self.prefix)
def install_pthreads(self): pthreadszip = os.path.join(self.prefix, 'pthreads.zip') shell.download(PTHREADS_URL, pthreadszip) temp = fix_winpath(os.path.abspath(tempfile.mkdtemp())) # real pthreads stuff is in a zip file inside the previous zip file # under mingwxx/pthreads-xx.zip shell.unpack(pthreadszip, temp) shell.unpack( os.path.join(temp, 'pthreads-20100604', 'ming%s' % self.version, 'pthreads-%s.zip' % self.version), self.prefix)
def install_bin_deps(self): # FIXME: build intltool as part of the build tools bootstrap for url in WINDOWS_BIN_DEPS: temp = fix_winpath(tempfile.mkdtemp()) path = os.path.join(temp, 'download.zip') shell.download(GNOME_FTP + url, path) shell.unpack(path, self.config.toolchain_prefix) # replace /opt/perl/bin/perl in intltool files = shell.ls_files(['bin/intltool*'], self.config.toolchain_prefix) for f in files: shell.replace(os.path.join(self.config.toolchain_prefix, f), {'/opt/perl/bin/perl': '/bin/perl'}) return
def install_bin_deps(self): # On windows, we need to install first wget and pkg-config. # pkg-config can't be installed otherwise because it depends # on glib and glib depends on pkg-config for url in WINDOWS_BIN_DEPS: temp = fix_winpath(tempfile.mkdtemp()) path = os.path.join(temp, 'download.zip') shell.download(GNOME_FTP + url, path) shell.unpack(path, self.config.toolchain_prefix) # replace /opt/perl/bin/perl in intltool files = shell.ls_files(['bin/intltool*'], self.config.toolchain_prefix) for f in files: shell.replace(os.path.join(self.config.toolchain_prefix, f), {'/opt/perl/bin/perl': '/bin/perl'}) return
def get_msbuild_tools_path(): reg = winreg.ConnectRegistry(None, winreg.HKEY_LOCAL_MACHINE) key = winreg.OpenKey(reg, r"SOFTWARE\Microsoft\MSBuild\ToolsVersions\4.0") path = winreg.QueryValueEx(key, 'MSBuildToolsPath')[0] return fix_winpath(path)