webkit下载地址:
https://nightly.webkit.org/builds/trunk/src/1
1. 下载官方 cygwin-downloader.py文件去下载安装组件.但是官方脚本中要求的curl版本太低,可能下载不下来,建议使用下面脚本来下载需要的模块并安装到默认位置.
#!/usr/bin/env python import os, random, sys, time, urllib import re,string # # Options # dry_run = len(sys.argv) > 1 and "--dry-run" in set(sys.argv[1:]) quiet = len(sys.argv) > 1 and "--quiet" in set(sys.argv[1:]) # # Functions and constants # def download_progress_hook(block_count, block_size, total_blocks): if quiet or random.random() > 0.5: return sys.stdout.write(".") sys.stdout.flush() def download_url_to_file(url, file,filesize, message): if not quiet: print message + " ", if not dry_run: dir = os.path.dirname(file) if len(dir) and not os.path.exists(dir): os.makedirs(dir) isFileExists = os.path.exists(os.path.abspath(file)) if isFileExists == False: urllib.urlretrieve(url, file, download_progress_hook) else: if filesize != 0: iSize = os.path.getsize(file) if iSize != filesize: urllib.urlretrieve(url, file, download_progress_hook) if not quiet: print # This is mostly just the list of North America http mirrors from http://cygwin.com/mirrors.html, # but a few have been removed that seemed unresponsive from Cupertino. mirror_servers = ["http://mirrors.163.com/cygwin/", "http://cygwin.elite-systems.org/", "http://mirror.mcs.anl.gov/cygwin/", "http://cygwin.osuosl.org/", "http://mirrors.kernel.org/sourceware/cygwin/", "http://mirrors.xmission.com/cygwin/", "http://sourceware.mirrors.tds.net/pub/sourceware.org/cygwin/"] package_mirror_url = mirror_servers[0]; #random.choice(range(len(mirror_servers)))] def download_package(package, message): download_url_to_file(package_mirror_url + package["path"], package["path"],package["size"], message) required_packages = frozenset(["bc", "bison", "curl", "diffutils", "e2fsprogs", "emacs", "flex", "gcc-g++", "gperf", "keychain", "lighttpd", "make", "nano", "openssh", "patch", "perl", "perl-libwin32", "python", "rebase", "rsync", "ruby", "subversion", "unzip", "vim", "zip", "dos2unix"]) required_packages_versions = {"subversion": "1.7.14-1"} # # Main # print "Using Cygwin mirror server " + package_mirror_url + " to download setup.ini..." download_url_to_file(package_mirror_url + "x86/setup.ini", "setup.ini.orig",0,"Downloading setup.ini") #urllib.urlretrieve(package_mirror_url + "x86/setup.ini", "setup.ini.orig") downloaded_packages_file_path = "setup.ini.orig" downloaded_packages_file = file(downloaded_packages_file_path, "r") if not dry_run: modified_packages_file = file("setup.ini", "w") packages = {} current_package = '' for line in downloaded_packages_file.readlines(): if line[0] == "@": current_package = line[2:-1] packages[current_package] = {"name": current_package, "needs_download": False, "requires": [], "path": "","size":0, "version": "", "found_version": False} if current_package in required_packages_versions: packages[current_package]["version"] = required_packages_versions[current_package] elif line[:10] == "category: ": if current_package in required_packages: line = "category: Base\n" if "Base" in set(line[10:-1].split()): packages[current_package]["needs_download"] = True elif line[:10] == "requires: ": packages[current_package]["requires"] = line[10:].split() packages[current_package]["requires"].sort() elif line[:9] == "version: " and not packages[current_package]["found_version"]: if not len(packages[current_package]["version"]): packages[current_package]["version"] = line[9:-1] packages[current_package]["found_version"] = True else: packages[current_package]["found_version"] = (packages[current_package]["version"] == line[9:-1]) elif line[:9] == "install: " and packages[current_package]["found_version"] and not len(packages[current_package]["path"]): arr = re.split(' ',line[9:-1]); packages[current_package]["path"] = arr[0] packages[current_package]["size"] = string.atoi(arr[1],10) #end_of_path = line.find(" ", 9) #if end_of_path != -1: # packages[current_package]["path"] = line[9:end_of_path] if not dry_run: modified_packages_file.write(line) downloaded_packages_file.close() os.remove(downloaded_packages_file_path) if not dry_run: modified_packages_file.close() names_to_download = set() package_names = packages.keys() package_names.sort() def add_package_and_dependencies(name): if name in names_to_download: return if not name in packages: return packages[name]["needs_download"] = True names_to_download.add(name) for dep in packages[name]["requires"]: add_package_and_dependencies(dep) for name in package_names: if packages[name]["needs_download"]: add_package_and_dependencies(name) downloaded_so_far = 0 for name in package_names: if packages[name]["needs_download"]: downloaded_so_far += 1 download_package(packages[name], "Downloading package %3d of %3d (%s)" % (downloaded_so_far, len(names_to_download), name)) download_url_to_file("http://cygwin.com/setup-x86.exe", "setup.exe",0, "Downloading setup.exe") seconds_to_sleep = 10 print """ Finished downloading Cygwin. In %d seconds, I will run setup.exe. All the suitable options have been already selected for you. """ % (seconds_to_sleep) while seconds_to_sleep > 0: print "%d..." % seconds_to_sleep, sys.stdout.flush() time.sleep(1) seconds_to_sleep -= 1 print if not dry_run: os.execv("setup.exe", list(("-L", "-l", os.getcwd(), "-P", ",".join(required_packages))))
3.安装DXSDK 库
4.按照官方网站操作开始执行命令.
https://webkit.org/webkit-on-windows/
5.出现问题看看如下网页
编译参看网页:
http://blog.csdn.net/kimmking/article/details/43910121
http://blog.csdn.net/skymanwww/article/details/20772363
出现curl问题:
打开文件update-webkit-dependency文件,去掉两个curl的–sslv3参数。再重新执行update-webkit。
重新生成.h、.cpp和.idl文件
http://www.cnblogs.com/dongc/p/4606207.html
http://www.cnblogs.com/dongc/p/5225102.html
http://blog.csdn.net/intimater/article/details/6596607
failed to determine path to aas directory问题解决方法:
http://blog.csdn.net/dragoo1/article/details/45198503
http://blog.csdn.net/earbao/article/details/40055047
6.安装Safari并将需要的模块拷贝进去