mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Add support for MSVC builds
This commit is contained in:
parent
e9b1042c25
commit
fcdd52a823
1 changed files with 38 additions and 69 deletions
|
@ -45,74 +45,7 @@
|
|||
Source="${windowize(exe_path)}\servo.exe.manifest"
|
||||
DiskId="1"/>
|
||||
|
||||
<File Id="StdcxxDLL"
|
||||
Name="libstdc++-6.dll"
|
||||
Source="C:\msys64\mingw64\bin\libstdc++-6.dll"
|
||||
DiskId="1"/>
|
||||
<File Id="WinpthreadDll"
|
||||
Name="libwinpthread-1.dll"
|
||||
Source="C:\msys64\mingw64\bin\libwinpthread-1.dll"
|
||||
DiskId="1"/>
|
||||
<File Id="Bzip2Dll"
|
||||
Name="libbz2-1.dll"
|
||||
Source="C:\msys64\mingw64\bin\libbz2-1.dll"
|
||||
DiskId="1"/>
|
||||
<File Id="GccsehDll"
|
||||
Name="libgcc_s_seh-1.dll"
|
||||
Source="C:\msys64\mingw64\bin\libgcc_s_seh-1.dll"
|
||||
DiskId="1"/>
|
||||
<File Id="ExpatDll"
|
||||
Name="libexpat-1.dll"
|
||||
Source="C:\msys64\mingw64\bin\libexpat-1.dll"
|
||||
DiskId="1"/>
|
||||
<File Id="ZlibDll"
|
||||
Name="zlib1.dll"
|
||||
Source="C:\msys64\mingw64\bin\zlib1.dll"
|
||||
DiskId="1"/>
|
||||
<File Id="PngDll"
|
||||
Name="libpng16-16.dll"
|
||||
Source="C:\msys64\mingw64\bin\libpng16-16.dll"
|
||||
DiskId="1"/>
|
||||
<File Id="IconvDll"
|
||||
Name="libiconv-2.dll"
|
||||
Source="C:\msys64\mingw64\bin\libiconv-2.dll"
|
||||
DiskId="1"/>
|
||||
<File Id="GlibDll"
|
||||
Name="libglib-2.0-0.dll"
|
||||
Source="C:\msys64\mingw64\bin\libglib-2.0-0.dll"
|
||||
DiskId="1"/>
|
||||
<File Id="GraphiteDll"
|
||||
Name="libgraphite2.dll"
|
||||
Source="C:\msys64\mingw64\bin\libgraphite2.dll"
|
||||
DiskId="1"/>
|
||||
<File Id="IntlDll"
|
||||
Name="libintl-8.dll"
|
||||
Source="C:\msys64\mingw64\bin\libintl-8.dll"
|
||||
DiskId="1"/>
|
||||
<File Id="PcreDll"
|
||||
Name="libpcre-1.dll"
|
||||
Source="C:\msys64\mingw64\bin\libpcre-1.dll"
|
||||
DiskId="1"/>
|
||||
<File Id="Eay32Dll"
|
||||
Name="libeay32.dll"
|
||||
Source="C:\msys64\mingw64\bin\libeay32.dll"
|
||||
DiskId="1"/>
|
||||
<File Id="Ssleay32Dll"
|
||||
Name="ssleay32.dll"
|
||||
Source="C:\msys64\mingw64\bin\ssleay32.dll"
|
||||
DiskId="1"/>
|
||||
<File Id="HarfbuzzDll"
|
||||
Name="libharfbuzz-0.dll"
|
||||
Source="C:\msys64\mingw64\bin\libharfbuzz-0.dll"
|
||||
DiskId="1"/>
|
||||
<File Id="FreetypeDll"
|
||||
Name="libfreetype-6.dll"
|
||||
Source="C:\msys64\mingw64\bin\libfreetype-6.dll"
|
||||
DiskId="1"/>
|
||||
<File Id="FontconfigDll"
|
||||
Name="libfontconfig-1.dll"
|
||||
Source="C:\msys64\mingw64\bin\libfontconfig-1.dll"
|
||||
DiskId="1"/>
|
||||
${include_dependencies()}
|
||||
</Component>
|
||||
|
||||
${include_directory(path.join(top_path, "resources"), "resources")}
|
||||
|
@ -124,7 +57,7 @@
|
|||
<Directory Id="ProgramMenuFolder" Name="Programs">
|
||||
<Directory Id="ProgramMenuDir" Name="Servo Tech Demo">
|
||||
<Component Id="ProgramMenuDir" Guid="e04737ce-16eb-4977-9b4c-ed2db8a5a77d">
|
||||
<RemoveFolder Id="ProgramMenuDir" On="uninstall"/>
|
||||
<RemoveFolder Id="ProgramMenuDir" On="both"/>
|
||||
<RegistryValue Root="HKCU"
|
||||
Key="Software\Mozilla Research\Servo Tech Demo"
|
||||
Type="string"
|
||||
|
@ -151,6 +84,7 @@ import os
|
|||
import os.path as path
|
||||
import re
|
||||
import uuid
|
||||
from servo.command_base import host_triple
|
||||
|
||||
def make_id(s):
|
||||
s = s.replace(os.getcwd(), "").replace("-", "_").replace("/", "_").replace("\\", "_")
|
||||
|
@ -166,6 +100,31 @@ def listdirs(directory):
|
|||
return [f for f in os.listdir(directory)
|
||||
if path.isdir(path.join(directory, f))]
|
||||
|
||||
def listdeps(exe_path):
|
||||
if "msvc" in host_triple():
|
||||
return [path.join(windowize(exe_path), d) for d in ["libeay32md.dll", "ssleay32md.dll"]]
|
||||
elif "gnu" in host_triple():
|
||||
deps = [
|
||||
"libstdc++-6.dll",
|
||||
"libwinpthread-1.dll",
|
||||
"libbz2-1.dll",
|
||||
"libgcc_s_seh-1.dll",
|
||||
"libexpat-1.dll",
|
||||
"zlib1.dll",
|
||||
"libpng16-16.dll",
|
||||
"libiconv-2.dll",
|
||||
"libglib-2.0-0.dll",
|
||||
"libgraphite2.dll",
|
||||
"libfreetype-6.dll",
|
||||
"libfontconfig-1.dll",
|
||||
"libintl-8.dll",
|
||||
"libpcre-1.dll",
|
||||
"libeay32.dll",
|
||||
"ssleay32.dll",
|
||||
"libharfbuzz-0.dll",
|
||||
]
|
||||
return [path.join("C:\\msys64\\mingw64\\bin", d) for d in deps]
|
||||
|
||||
def windowize(p):
|
||||
if not p.startswith("/"):
|
||||
return p
|
||||
|
@ -173,6 +132,16 @@ def windowize(p):
|
|||
|
||||
components = []
|
||||
%>
|
||||
|
||||
<%def name="include_dependencies()">
|
||||
% for f in listdeps(exe_path):
|
||||
<File Id="${make_id(path.basename(f)).replace(".","").replace("+","x")}"
|
||||
Name="${path.basename(f)}"
|
||||
Source="${f}"
|
||||
DiskId="1"/>
|
||||
% endfor
|
||||
</%def>
|
||||
|
||||
<%def name="include_directory(d, n)">
|
||||
<Directory Id="${make_id(path.basename(d))}" Name="${n}">
|
||||
<Component Id="${make_id(path.basename(d))}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue