Files
servo/support/windows/Servo.wxs.mako
Jonathan Schwender 1632e61ed6 servoshell: Rename executable to servoshell. (#42958)
This should help clarify the difference between servo the library /
engine and servoshell the browser (demo).

Other changes: 

- Removed etc/servo.sb ( [apple sandbox profile
format](https://angelica.gitbook.io/hacktricks/macos-hardening/macos-security-and-privilege-escalation/macos-security-protections/macos-sandbox#sandbox-profiles))
since it is not needed anymore. See [this
comment](https://github.com/servo/servo/pull/42958#discussion_r2876253489)
for more details.

Testing: This is a very invasive change, and there are bound to be
scripts / places I have overlooked. Searching for usages of `servo` is
very hard, since it's also the name of the library.
Try run: https://github.com/servo/servo/actions/runs/22637676818

---------

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
Signed-off-by: Jonathan Schwender <55576758+jschwe@users.noreply.github.com>
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
2026-03-07 08:08:38 +00:00

134 lines
4.3 KiB
Mako

<?xml version="1.0" encoding="utf-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="*"
Name="Servo Tech Demo"
Manufacturer="The Servo Authors"
UpgradeCode="060cd15d-eab1-4614-b438-3988e3efdcf1"
Language="1033"
Codepage="1252"
Version="0.0.6">
<Package Id="*"
Keywords="Installer"
Description="Servo Tech Demo Installer"
Manufacturer="The Servo Authors"
InstallerVersion="200"
Platform="x64"
Languages="1033"
SummaryCodepage="1252"
Compressed="yes"/>
<MajorUpgrade AllowDowngrades="yes"/>
<Media Id="1"
Cabinet="Servo.cab"
EmbedCab="yes"/>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFiles64Folder" Name="PFiles">
<Directory Id="Servo" Name="Servo">
<Directory Id="INSTALLDIR" Name="Servo Tech Demo">
<Component Id="Servo"
Guid="95bcea71-78bb-4ec8-9766-44bc01443840"
Win64="yes">
<File Id="ServoEXE"
Name="servoshell.exe"
DiskId="1"
Source="${windowize(exe_path)}\servoshell.exe"
KeyPath="yes">
<Shortcut Id="StartMenuServoTechDemo"
Directory="ProgramMenuDir"
Name="Servo Tech Demo"
WorkingDirectory="INSTALLDIR"
Icon="servoshell.exe"
Advertise="yes"/>
</File>
${include_dependencies()}
</Component>
${include_directory(resources_path, "resources")}
</Directory>
</Directory>
</Directory>
<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="both"/>
<RegistryValue Root="HKCU"
Key="Software\Servo\Servo Tech Demo"
Type="string"
Value=""
KeyPath="yes"/>
</Component>
</Directory>
</Directory>
</Directory>
<Feature Id="Complete" Level="1">
<ComponentRef Id="Servo"/>
% for c in components:
<ComponentRef Id="${c}"/>
% endfor
<ComponentRef Id="ProgramMenuDir"/>
</Feature>
<Icon Id="servoshell.exe" SourceFile="${windowize(exe_path)}\servoshell.exe"/>
</Product>
</Wix>
<%!
import os
import os.path as path
import re
import uuid
from servo.platform import host_triple
def make_id(s):
s = s.replace("-", "_").replace("/", "_").replace("\\", "_")
return "Id{}".format(s)
def listfiles(directory):
return [f for f in os.listdir(directory)
if path.isfile(path.join(directory, f))]
def listdirs(directory):
return [f for f in os.listdir(directory)
if path.isdir(path.join(directory, f))]
def listdeps(temp_dir):
return [path.join(temp_dir, f) for f in os.listdir(temp_dir) if os.path.isfile(path.join(temp_dir, f)) and f != "servoshell.exe"]
def windowize(p):
if not p.startswith("/"):
return p
return re.sub("^/([^/])+", "\\1:", p)
components = []
%>
<%def name="include_dependencies()">
% for f in listdeps(dir_to_temp):
<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))}"
Guid="${uuid.uuid4()}"
Win64="yes">
<CreateFolder/>
<% components.append(make_id(path.basename(d))) %>
% for f in listfiles(d):
<File Id="${make_id(path.join(d, f).replace(dir_to_temp, ""))}"
Name="${f}"
Source="${windowize(path.join(d, f))}"
DiskId="1"/>
% endfor
</Component>
% for f in listdirs(d):
${include_directory(path.join(d, f), f)}
% endfor
</Directory>
</%def>