⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 build-webkit

📁 linux下开源浏览器WebKit的源码,市面上的很多商用浏览器都是移植自WebKit
💻
📖 第 1 页 / 共 2 页
字号:
my @projects = ("JavaScriptCore", "WebCore", "WebKit");# Only Apple builds JavaScriptGlue, and only on the Macpush @projects, "JavaScriptGlue" if isAppleMacWebKit();my @otherDirs = ("WebKitLibraries");for my $dir (@projects, @otherDirs) {    if (! -d $dir) {        die "Error: No $dir directory found. Please do a fresh checkout.\n";    }}my @options = ();if ($buildSixtyFourBit && isAppleMacWebKit()) {    my $cpuVendor = `sysctl -n machdep.cpu.vendor`;    chomp $cpuVendor;    if ($buildUniversal) {        push(@options, "ARCHS=ppc ppc64 i386 x86_64");    } elsif ($cpuVendor eq "GenuineIntel") {        push(@options, "ARCHS=i386 x86_64");    } else {        push(@options, "ARCHS=ppc ppc64");    }} elsif ($buildUniversal && isAppleMacWebKit()) {    push(@options, "ARCHS=ppc i386");}# enable autotool options accordinglyif (isGtk()) {    push @options, autotoolsFlag($databaseSupport, "database");    push @options, autotoolsFlag($domStorageSupport, "dom-storage");    push @options, autotoolsFlag($gnomeKeyringSupport, "gnomekeyring");    push @options, autotoolsFlag($iconDatabaseSupport, "icon-database");    push @options, autotoolsFlag($offlineWebApplicationSupport, "offline-web-applications");    push @options, autotoolsFlag($threeDTransformsSupport, "3D-transforms");    push @options, autotoolsFlag($channelMessagingSupport, "channel-messaging");    push @options, autotoolsFlag($svgSupport, "svg");    push @options, autotoolsFlag($svgAnimationSupport, "svg-animation");    push @options, autotoolsFlag($svgFiltersSupport, "svg-filters");    push @options, autotoolsFlag($svgForeignObjectSupport, "svg-foreign-object");    push @options, autotoolsFlag($svgFontsSupport, "svg-fonts");    push @options, autotoolsFlag($svgAsImageSupport, "svg-as-image");    push @options, autotoolsFlag($svgUseSupport, "svg-use-element");    push @options, autotoolsFlag($xpathSupport, "xpath");    push @options, autotoolsFlag($xsltSupport, "xslt");    push @options, autotoolsFlag($wmlSupport, "wml");    push @options, autotoolsFlag($videoSupport, "video");    push @options, autotoolsFlag($workersSupport, "web-workers");    push @options, autotoolsFlag($coverageSupport, "coverage");}if (isAppleMacWebKit()) {    push(@options, XcodeOptions());    # Copy library and header from WebKitLibraries to a findable place in the product directory.    my $srcLib = "WebKitLibraries/libWebKitSystemInterfaceTiger.a";    my $lib = "$productDir/libWebKitSystemInterfaceTiger.a";    if (!-e $lib || -M $lib > -M $srcLib) {        print "Updating $lib\n";        system "ditto", $srcLib, $lib;        system "ranlib", $lib;    }    $srcLib = "WebKitLibraries/libWebKitSystemInterfaceLeopard.a";    $lib = "$productDir/libWebKitSystemInterfaceLeopard.a";    if (!-e $lib || -M $lib > -M $srcLib) {        print "Updating $lib\n";        system "ditto", $srcLib, $lib;        system "ranlib", $lib;    }    my $srcHeader = "WebKitLibraries/WebKitSystemInterface.h";    my $header = "$productDir/usr/local/include/WebKitSystemInterface.h";    if (!-e $header || -M $header > -M $srcHeader) {        print "Updating $header\n";        system "mkdir", "-p", "$productDir/usr/local/include";        system "ditto", $srcHeader, $header;    }    $srcLib = "WebKitLibraries/libWebCoreSQLite3.a";    $lib = "$productDir/libWebCoreSQLite3.a";    if (!-e $lib || -M $lib > -M $srcLib) {        print "Updating $lib\n";        system "ditto", $srcLib, $lib;        system "ranlib", $lib;    }    my $srcHeaderDir = "WebKitLibraries/WebCoreSQLite3";    my $headerDir = "$productDir/WebCoreSQLite3";    if (!-e $headerDir || -M $headerDir > -M $srcHeaderDir) {        print "Updating $headerDir\n";        system "ditto", $srcHeaderDir, $headerDir;    }}if (isAppleWinWebKit()) {    # Copy WebKitSupportLibrary to the correct location in WebKitLibraries so it can be found.    # Will fail if WebKitSupportLibrary.zip is not in source root.    (system("perl WebKitTools/Scripts/update-webkit-support-libs") == 0) or die;}# Force re-link of existing libraries if different than expectedremoveLibraryDependingOnSVG("WebCore", $svgSupport);# Build, and abort if the build fails.for my $dir (@projects) {    chdir $dir or die;    my $result = 0;    # For Gtk and Qt the WebKit project builds all others    if ((isGtk() || isQt()) && $dir ne "WebKit") {        chdir ".." or die;        next;    }    if (isGtk()) {        $result = buildGtkProject($dir, $clean,  @options);    } elsif (isQt()) {        $result = buildQMakeQtProject($dir, $clean, @ARGV);    } elsif (isAppleMacWebKit()) {        my @xcodeOptions = ();        push(@xcodeOptions, @options);        push(@xcodeOptions, $overrideFeatureDefinesString);        push(@xcodeOptions, @coverageSupportOption);        push(@xcodeOptions, @ARGV);        $result = buildXCodeProject($dir, $clean, @xcodeOptions);    } elsif (isAppleWinWebKit()) {        if ($dir eq "WebKit") {            $result = buildVisualStudioProject("win/WebKit.vcproj/WebKit.sln", $clean);        }    } elsif (isChromium()) {        $result = buildSconsProject($dir, $clean);    }    if (exitStatus($result)) {        if (isAppleWinWebKit()) {            print "\n\n===== BUILD FAILED ======\n\n";            my $scriptDir = relativeScriptsDir();            print "Please ensure you have run $scriptDir/update-webkit to install depenedencies.\n\n";            my $baseProductDir = baseProductDir();            print "You can view build errors by checking the BuildLog.htm files located at:\n$baseProductDir/obj/<project>/<config>.\n";        }        exit exitStatus($result);    }    chdir ".." or die;}# Don't report the "WebKit is now built" message after a clean operation.exit if $clean;# Write out congratulations message.my $launcherPath = launcherPath();my $launcherName = launcherName();print "\n";print "===========================================================\n";print " WebKit is now built. To run $launcherName with this newly-built\n";print " code, use the \"$launcherPath\" script.\n";if ($svgSupport) {    print "\n NOTE: WebKit has been built with SVG support enabled.\n";    print " $launcherName will have SVG viewing capabilities.\n";}if ($svgAnimationSupport or $svgFiltersSupport or $svgForeignObjectSupport or $svgFontsSupport or $svgAsImageSupport or $svgUseSupport) {    print " Your build supports the following (optional) SVG features: \n";    print "  * Basic SVG animation.\n" if $svgAnimationSupport;    print "  * SVG filters.\n" if $svgFiltersSupport;    print "  * SVG foreign object.\n" if $svgForeignObjectSupport;    print "  * SVG fonts.\n" if $svgFontsSupport;    print "  * SVG as image.\n" if $svgAsImageSupport;    print "  * SVG <use> support.\n" if $svgUseSupport;}print "===========================================================\n";

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -