Compare commits

..

3 commits

Author SHA1 Message Date
Philip Rebohle
ad5162d03e vrclient: Add DXVK support for D3D11 submissions 2018-05-03 03:28:48 +02:00
Philip Rebohle
ed1b2364c9 vrclient: Add DXVK interop header 2018-05-03 03:20:41 +02:00
Pierre-Loup A. Griffais
be42f80ad2
Update LICENSE.proton 2018-04-30 12:55:48 -07:00
2186 changed files with 77388 additions and 1298902 deletions

2
.gitattributes vendored
View file

@ -1,2 +0,0 @@
*.sc linguist-detectable=false
*.SC linguist-detectable=false

View file

@ -1,46 +0,0 @@
---
name: Compatibility Report
about: Game compatibility issues.
---
# Compatibility Report
- Name of the game with compatibility issues:
- Steam AppID of the game:
## System Information
- GPU: <!-- e.g. RX 580 or GTX 970 -->
- Video driver version: <!-- e.g. Mesa 18.2 or nvidia 396.54 -->
- Kernel version: <!-- e.g. 4.17 -->
- Link to full system information report as [Gist](https://gist.github.com/):
- Proton version:
## I confirm:
- [ ] that I haven't found an existing compatibility report for this game.
- [ ] that I have checked whether there are updates for my system available.
<!-- Please add `PROTON_LOG=1 %command%` to the game's launch options and
attach the generated $HOME/steam-$APPID.log to this issue report as a file.
(Proton logs compress well if needed.)-->
## Symptoms <!-- What's the problem? -->
## Reproduction
<!--
1. You can find the Steam AppID in the URL of the shop page of the game.
e.g. for `The Witcher 3: Wild Hunt` the AppID is `292030`.
2. You can find your driver and Linux version, as well as your graphics
processor's name in the system information report of Steam.
3. You can retrieve a full system information report by clicking
`Help` > `System Information` in the Steam client on your machine.
4. Please copy it to your clipboard by pressing `Ctrl+A` and then `Ctrl+C`.
Then paste it in a [Gist](https://gist.github.com/) and post the link in
this issue.
5. Also, please copy the contents of `Help` > `Steam Runtime Diagnostics` to
the gist.
6. Please search for open issues and pull requests by the name of the game and
find out whether they are relevant and should be referenced above.
-->

View file

@ -1 +0,0 @@
blank_issues_enabled: false

View file

@ -1,20 +0,0 @@
---
name: Feature Request
about: Suggest an idea for this project
---
# Feature Request
## I confirm:
- [ ] that I haven't found another request for this feature.
- [ ] that I have checked whether there are updates for my system available that
contain this feature already.
## Description <!-- What do you want to be added? -->
## Justification [optional] <!-- Why integration in Proton instead of Wine? -->
## Risks [optional]
## References [optional] <!-- Which issues are related? -->

View file

@ -1,9 +0,0 @@
---
name: Other
about: No other issue template makes sense
---
<!--
Please always mention the Proton version and the titles of any games you are seeing an issue with.
-->

View file

@ -1,40 +0,0 @@
---
name: Whitelist Request
about: Games tested and found to have no issues.
---
# Whitelist Request
- Name of the game to be whitelisted:
- Steam AppID of the game:
## System Information
- GPU: <!-- e.g. RX 580 or GTX 970 -->
- Video driver version: <!-- e.g. Mesa 18.2 or nvidia 396.54 -->
- Distro version: <!-- e.g. Ubuntu 18.04 -->
- Link to full system information report as [Gist](https://gist.github.com/):
- Proton version:
## I confirm:
- [ ] that pressing the `Play` button in the Steam client is sufficient.
- [ ] that [runtime config options](https://github.com/ValveSoftware/Proton#runtime-config-options) are necessary to run the game.
- [ ] that no workarounds other than PROTON_* env variables are necessary.
## Issues
- [ ] I haven't experienced any issues.
- [ ] There are no issues left open for this game.
- [ ] Although I consider the gaming experience equal to Windows there are remaining issues:
<!--
1. You can find the Steam AppID in the URL of the shop page of the game.
e.g. for `The Witcher 3: Wild Hunt` the AppID is `292030`.
2. You can find your driver and Linux version, as well as your graphics
processor's name in the system information report of Steam.
3. You can retrieve a full system information report by clicking
`Help` > `System Information` in the Steam client on your machine.
4. Please copy it to your clipboard by pressing `Ctrl+A` and then `Ctrl+C`.
Then paste it in a [Gist](https://gist.github.com/) and post the link in
this issue to prevent chaos by too much info in one place.
5. Please search for open issues and pull requests by the name of the game and
find out whether they are relevant and should be referenced above.
-->

10
.gitignore vendored
View file

@ -1,8 +1,2 @@
/dist
/dist-*
/obj-*
/syn-*
/.vagrant/
/vagrant_share/
/build/
dist/
build/

73
.gitmodules vendored
View file

@ -1,57 +1,24 @@
[submodule "wine"]
path = wine
url = ../wine
path = wine
url = https://github.com/ValveSoftware/wine/
[submodule "dxvk"]
path = dxvk
url = https://github.com/doitsujin/dxvk.git
[submodule "openvr"]
path = openvr
url = https://github.com/ValveSoftware/openvr
[submodule "fonts/liberation-fonts"]
path = fonts/liberation-fonts
url = https://github.com/liberationfonts/liberation-fonts
[submodule "gstreamer"]
path = gstreamer
url = https://github.com/GStreamer/gstreamer.git
[submodule "gst-orc"]
path = gst-orc
url = https://github.com/GStreamer/orc.git
[submodule "vkd3d-proton"]
path = vkd3d-proton
url = https://github.com/HansKristian-Work/vkd3d-proton
[submodule "OpenXR-SDK"]
path = OpenXR-SDK
url = https://github.com/KhronosGroup/OpenXR-SDK
[submodule "dxvk-nvapi"]
path = dxvk-nvapi
url = https://github.com/jp7677/dxvk-nvapi
[submodule "vkd3d"]
path = vkd3d
url = https://github.com/ValveSoftware/vkd3d
[submodule "Vulkan-Headers"]
path = Vulkan-Headers
url = https://github.com/KhronosGroup/Vulkan-Headers
[submodule "SPIRV-Headers"]
path = SPIRV-Headers
url = https://github.com/KhronosGroup/SPIRV-Headers
[submodule "Vulkan-Loader"]
path = Vulkan-Loader
url = https://github.com/KhronosGroup/Vulkan-Loader
[submodule "gst-libav"]
path = gst-libav
url = https://github.com/GStreamer/gst-libav
[submodule "ffmpeg"]
path = ffmpeg
url = https://github.com/FFmpeg/FFmpeg
[submodule "dav1d"]
path = dav1d
url = https://github.com/videolan/dav1d.git
[submodule "gst-plugins-rs"]
path = gst-plugins-rs
url = https://github.com/sdroege/gst-plugin-rs
[submodule "graphene"]
path = graphene
url = https://github.com/ebassi/graphene
[submodule "glslang"]
path = glslang
url = https://github.com/KhronosGroup/glslang
[submodule "freetype2"]
path = freetype2
url = git://git.sv.nongnu.org/freetype/freetype2.git
[submodule "libpng"]
path = libpng
url = https://github.com/glennrp/libpng.git
[submodule "libjpeg-turbo"]
path = libjpeg-turbo
url = https://github.com/libjpeg-turbo/libjpeg-turbo.git
[submodule "SDL-mirror"]
path = SDL-mirror
url = https://github.com/spurious/SDL-mirror.git
[submodule "openal-soft"]
path = openal-soft
url = https://github.com/kcat/openal-soft.git
[submodule "MoltenVK"]
path = MoltenVK
url = https://github.com/KhronosGroup/MoltenVK.git

View file

@ -1,10 +1,10 @@
Copyright (c) 2018-2022, Valve Corporation
Copyright (c) 2018, Valve Corporation
All rights reserved.
Redistribution and use of Proton in source and binary forms is governed
by a variety of licenses.
Refer to the contents of LICENSE.proton for the license for the top
Refer to the contents of LICENCE.proton for the license for the top
level contents of the Proton project.
Proton uses a variety of other software, each of which is governed

View file

@ -1,4 +1,4 @@
Copyright (c) 2018-2022, Valve Corporation
Copyright (c) 2018, Valve Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,

225
Makefile
View file

@ -1,225 +0,0 @@
#See help target below for documentation
ifeq ($(build_name),)
_build_name := $(shell git symbolic-ref --short HEAD 2>/dev/null)-local
else
_build_name := $(build_name)
endif
ifeq ($(_build_name),)
$(error ERROR: Unable to auto-detect build name. Check out a branch or specify with "build_name=...")
endif
# remove special chars
override _build_name := $(shell echo $(_build_name) | tr -dc '[:alnum:] ._-')
BUILD_ROOT := build
# make doesn't handle spaces well... replace them with underscores in paths
BUILD_DIR := $(BUILD_ROOT)/build-$(shell echo $(_build_name) | sed -e 's/ /_/g')
STEAM_DIR := $(HOME)/.steam/root
ifeq ($(build_name),)
DEPLOY_DIR := $(shell git describe --tags --always --exclude proton-sdk*)
else
DEPLOY_DIR := $(_build_name)
endif
ifneq ($(module),)
ifneq ($(findstring .drv,$(module)),)
MODULE_PEFILE := $(module)
MODULE_SOFILE := $(subst .drv,.so,$(module))
else ifneq ($(findstring .sys,$(module)),)
MODULE_PEFILE := $(module)
MODULE_SOFILE := $(subst .sys,.so,$(module))
else
MODULE_PEFILE := $(module).dll
MODULE_SOFILE := $(module).so
endif
endif
ifneq ($(unstripped),)
UNSTRIPPED := UNSTRIPPED_BUILD=1
DEPLOY_DIR := $(DEPLOY_DIR)_unstripped
endif
CONFIGURE_CMD := ../../configure.sh \
--build-name="$(_build_name)"
ifneq ($(protonsdk_version),)
CONFIGURE_CMD += --proton-sdk-image=registry.gitlab.steamos.cloud/proton/soldier/sdk:$(protonsdk_version)
else
protonsdk_version := $(shell grep '^arg_protonsdk_image=' configure.sh|xargs echo|cut -d: -f2)
endif
enable_ccache := 1
ifneq ($(enable_ccache),0)
CONFIGURE_CMD += --enable-ccache
endif
TOPLEVELGOALS := all any clean configure deploy downloads help install module proton protonsdk redist
CONTAINERGOALS := $(filter-out $(TOPLEVELGOALS),$(MAKECMDGOALS))
CONTAINERGOALS := $(filter-out $(BUILD_ROOT)/%,$(CONTAINERGOALS))
all: help
.PHONY: $(TOPLEVELGOALS)
help:
@echo "Proton Makefile instructions"
@echo ""
@echo "\"Quick start\" Makefile targets:"
@echo " install - Install Proton into current user's Steam installation"
@echo " redist - Build a package suitable for manual installation or distribution"
@echo " to other users in $(BUILD_ROOT)/ named after the nearest git tag"
@echo " deploy - Build Steam deployment files into a directory in $(BUILD_ROOT)/ named"
@echo " after the nearest git tag"
@echo " clean - Delete the Proton build directory"
@echo ""
@echo "Configuration variables:"
@echo " build_name - The name of the build, will be displayed in Steam. Defaults to"
@echo " current proton.git branch name if available. A new build dir"
@echo " will be created for each build_name, so if you override this,"
@echo " remember to always set it!"
@echo " Current build name: $(_build_name)"
@echo " unstripped - Set to non-empty to avoid stripping installed library files."
@echo " enable_ccache - Enabled by default, set to 0 prior to configuring to disable ccache."
@echo " protonsdk_version - Version of the proton sdk image to use for building,"
@echo " use protonsdk_version=local to build it locally."
@echo ""
@echo "Development targets:"
@echo " configure - Configure Proton build directory"
@echo " proton - Build Proton"
@echo ""
@echo " The following targets are development targets only useful after building Proton."
@echo " module - Rebuild a single Wine module and copy into $(BUILD_ROOT)/<module>/."
@echo " Specify module variable: make module=kernel32 module"
@echo " dxvk - Rebuild DXVK and copy it into $(BUILD_ROOT)/."
@echo " lsteamclient - Rebuild the Steam client wrapper and copy it into $(BUILD_ROOT)/."
@echo ""
@echo "Examples:"
@echo " make install - Build Proton and install into this user's Steam installation,"
@echo " with the current Proton branch name as the tool's name."
@echo ""
@echo " make redist - Build a Proton redistribution package in a tagged directory"
@echo " in $(BUILD_ROOT)/."
@echo ""
@echo " make build_name=mytest install - Build Proton with the tool name \"mytest\" and"
@echo " install into this user's Steam installation."
@echo ""
@echo " make build_name=mytest module=dsound module - Build only the dsound module"
@echo " in the \"mytest\" build directory and place it into $(BUILD_ROOT)/dsound/."
clean:
rm -rf $(BUILD_DIR)
protonsdk:
$(MAKE) $(MFLAGS) $(MAKEOVERRIDES) -C docker $(UNSTRIPPED) PROTONSDK_VERSION=$(protonsdk_version) proton
configure: | $(BUILD_DIR)
if [ ! -e $(BUILD_DIR)/Makefile ]; then \
(cd $(BUILD_DIR) && $(CONFIGURE_CMD)); \
fi
ifeq ($(protonsdk_version),local)
configure: protonsdk
endif
proton: configure
$(MAKE) $(MFLAGS) $(MAKEOVERRIDES) -C $(BUILD_DIR)/ $(UNSTRIPPED) dist && \
echo "Proton built locally. Use 'install', 'deploy' or 'redist' targets."
install: configure
rm -rf $(STEAM_DIR)/compatibilitytools.d/$(_build_name)/files/ #remove proton's internal files, but preserve user_settings etc from top-level
$(MAKE) $(MFLAGS) $(MAKEOVERRIDES) -C $(BUILD_DIR)/ $(UNSTRIPPED) install
echo "Proton installed to your local Steam installation"
redist: | $(BUILD_ROOT)/$(DEPLOY_DIR)
redist: configure
rm -rf $(BUILD_ROOT)/$(DEPLOY_DIR)/* && \
$(MAKE) $(MFLAGS) $(MAKEOVERRIDES) -C $(BUILD_DIR)/ $(UNSTRIPPED) redist && \
cp -Rf $(BUILD_DIR)/redist/* $(BUILD_ROOT)/$(DEPLOY_DIR) && \
echo "Proton build available at $(BUILD_ROOT)/$(DEPLOY_DIR)"
deploy: | $(BUILD_ROOT)/$(DEPLOY_DIR)-deploy
deploy: configure
rm -rf $(BUILD_ROOT)/$(DEPLOY_DIR)-deploy/* && \
$(MAKE) $(MFLAGS) $(MAKEOVERRIDES) -C $(BUILD_DIR)/ $(UNSTRIPPED) deploy && \
cp -Rf $(BUILD_DIR)/deploy/* $(BUILD_ROOT)/$(DEPLOY_DIR)-deploy && \
echo "Proton deployed to $(BUILD_ROOT)/$(DEPLOY_DIR)-deploy"
module: | $(BUILD_ROOT)/$(module)/lib/wine/i386-windows
module: | $(BUILD_ROOT)/$(module)/lib/wine/i386-unix
module: | $(BUILD_ROOT)/$(module)/lib64/wine/x86_64-windows
module: | $(BUILD_ROOT)/$(module)/lib64/wine/x86_64-unix
module: configure
$(MAKE) $(MFLAGS) $(MAKEOVERRIDES) -C $(BUILD_DIR)/ $(UNSTRIPPED) module=$(module) module && \
cp -f $(BUILD_DIR)/obj-wine32/dlls/$(module)/$(MODULE_PEFILE) $(BUILD_ROOT)/$(module)/lib/wine/i386-windows/ && \
cp -f $(BUILD_DIR)/obj-wine64/dlls/$(module)/$(MODULE_PEFILE) $(BUILD_ROOT)/$(module)/lib64/wine/x86_64-windows/ && \
if [ -e $(BUILD_DIR)/obj-wine32/dlls/$(module)/$(MODULE_PEFILE).so ]; then \
cp -f $(BUILD_DIR)/obj-wine32/dlls/$(module)/$(MODULE_PEFILE).so $(BUILD_ROOT)/$(module)/lib/wine/i386-unix/ && \
cp -f $(BUILD_DIR)/obj-wine64/dlls/$(module)/$(MODULE_PEFILE).so $(BUILD_ROOT)/$(module)/lib64/wine/x86_64-unix/; \
fi
if [ -e $(BUILD_DIR)/obj-wine32/dlls/$(module)/$(MODULE_SOFILE) ]; then \
cp -f $(BUILD_DIR)/obj-wine32/dlls/$(module)/$(MODULE_SOFILE) $(BUILD_ROOT)/$(module)/lib/wine/i386-unix/ && \
cp -f $(BUILD_DIR)/obj-wine64/dlls/$(module)/$(MODULE_SOFILE) $(BUILD_ROOT)/$(module)/lib64/wine/x86_64-unix/; \
fi
any $(CONTAINERGOALS): configure
$(MAKE) $(MFLAGS) $(MAKEOVERRIDES) -C $(BUILD_DIR)/ $(UNSTRIPPED) $(CONTAINERGOALS)
dxvk: | $(BUILD_ROOT)/dxvk/lib/wine/dxvk
dxvk: | $(BUILD_ROOT)/dxvk/lib64/wine/dxvk
dxvk: any
cp -f $(BUILD_DIR)/dist/files/lib/wine/dxvk/*.dll $(BUILD_ROOT)/dxvk/lib/wine/dxvk/ && \
cp -f $(BUILD_DIR)/dist/files/lib64/wine/dxvk/*.dll $(BUILD_ROOT)/dxvk/lib64/wine/dxvk/
dxvk-nvapi: | $(BUILD_ROOT)/dxvk-nvapi/lib/wine/nvapi
dxvk-nvapi: | $(BUILD_ROOT)/dxvk-nvapi/lib64/wine/nvapi
dxvk-nvapi: any
cp -f $(BUILD_DIR)/dist/files/lib/wine/nvapi/*.dll $(BUILD_ROOT)/dxvk-nvapi/lib/wine/nvapi/ && \
cp -f $(BUILD_DIR)/dist/files/lib64/wine/nvapi/*.dll $(BUILD_ROOT)/dxvk-nvapi/lib64/wine/nvapi/
vkd3d-proton: | $(BUILD_ROOT)/vkd3d-proton/lib/wine/vkd3d-proton
vkd3d-proton: | $(BUILD_ROOT)/vkd3d-proton/lib64/wine/vkd3d-proton
vkd3d-proton: any
cp -f $(BUILD_DIR)/dist/files/lib/wine/vkd3d-proton/*.dll $(BUILD_ROOT)/vkd3d-proton/lib/wine/vkd3d-proton/ && \
cp -f $(BUILD_DIR)/dist/files/lib64/wine/vkd3d-proton/*.dll $(BUILD_ROOT)/vkd3d-proton/lib64/wine/vkd3d-proton/
lsteamclient: | $(BUILD_ROOT)/lsteamclient/lib/wine/i386-windows
lsteamclient: | $(BUILD_ROOT)/lsteamclient/lib/wine/i386-unix
lsteamclient: | $(BUILD_ROOT)/lsteamclient/lib64/wine/x86_64-windows
lsteamclient: | $(BUILD_ROOT)/lsteamclient/lib64/wine/x86_64-unix
lsteamclient: any
cp -f $(BUILD_DIR)/dist/files/lib/wine/i386-windows/lsteamclient.dll $(BUILD_ROOT)/lsteamclient/lib/wine/i386-windows/ && \
cp -f $(BUILD_DIR)/dist/files/lib/wine/i386-unix/lsteamclient.dll.so $(BUILD_ROOT)/lsteamclient/lib/wine/i386-unix/ && \
cp -f $(BUILD_DIR)/dist/files/lib64/wine/x86_64-windows/lsteamclient.dll $(BUILD_ROOT)/lsteamclient/lib64/wine/x86_64-windows/ && \
cp -f $(BUILD_DIR)/dist/files/lib64/wine/x86_64-unix/lsteamclient.dll.so $(BUILD_ROOT)/lsteamclient/lib64/wine/x86_64-unix/
vrclient: | $(BUILD_ROOT)/vrclient/lib/wine/i386-windows
vrclient: | $(BUILD_ROOT)/vrclient/lib/wine/i386-unix
vrclient: | $(BUILD_ROOT)/vrclient/lib64/wine/x86_64-windows
vrclient: | $(BUILD_ROOT)/vrclient/lib64/wine/x86_64-unix
vrclient: any
cp -f $(BUILD_DIR)/dist/files/lib/wine/i386-windows/vrclient.dll $(BUILD_ROOT)/vrclient/lib/wine/i386-windows/ && \
cp -f $(BUILD_DIR)/dist/files/lib/wine/i386-unix/vrclient.dll.so $(BUILD_ROOT)/vrclient/lib/wine/i386-unix/ && \
cp -f $(BUILD_DIR)/dist/files/lib64/wine/x86_64-windows/vrclient_x64.dll $(BUILD_ROOT)/vrclient/lib64/wine/x86_64-windows/ && \
cp -f $(BUILD_DIR)/dist/files/lib64/wine/x86_64-unix/vrclient_x64.dll.so $(BUILD_ROOT)/vrclient/lib64/wine/x86_64-unix/
wineopenxr: | $(BUILD_ROOT)/wineopenxr/lib64/wine/x86_64-windows
wineopenxr: | $(BUILD_ROOT)/wineopenxr/lib64/wine/x86_64-unix
wineopenxr: any
cp -f $(BUILD_DIR)/dist/files/lib64/wine/x86_64-windows/wineopenxr.dll $(BUILD_ROOT)/wineopenxr/lib64/wine/x86_64-windows/ && \
cp -f $(BUILD_DIR)/dist/files/lib64/wine/x86_64-unix/wineopenxr.dll.so $(BUILD_ROOT)/wineopenxr/lib64/wine/x86_64-unix/
battleye: | $(BUILD_ROOT)/battleye/v1/lib/wine/i386-windows
battleye: | $(BUILD_ROOT)/battleye/v1/lib/wine/i386-unix
battleye: | $(BUILD_ROOT)/battleye/v1/lib64/wine/x86_64-windows
battleye: | $(BUILD_ROOT)/battleye/v1/lib64/wine/x86_64-unix
battleye: any
cp -f $(BUILD_DIR)/dist-battleye/v1/lib/wine/i386-windows/beclient.dll $(BUILD_ROOT)/battleye/v1/lib/wine/i386-windows/ && \
cp -f $(BUILD_DIR)/dist-battleye/v1/lib/wine/i386-unix/beclient.dll.so $(BUILD_ROOT)/battleye/v1/lib/wine/i386-unix/ && \
cp -f $(BUILD_DIR)/dist-battleye/v1/lib64/wine/x86_64-windows/beclient_x64.dll $(BUILD_ROOT)/battleye/v1/lib64/wine/x86_64-windows/ && \
cp -f $(BUILD_DIR)/dist-battleye/v1/lib64/wine/x86_64-unix/beclient_x64.dll.so $(BUILD_ROOT)/battleye/v1/lib64/wine/x86_64-unix/
$(BUILD_ROOT)/%:
mkdir -p $@

File diff suppressed because it is too large Load diff

1
MoltenVK Submodule

@ -0,0 +1 @@
Subproject commit 823bc18cd8c98dee1ea4904ab3ca4ea179c433ca

@ -1 +0,0 @@
Subproject commit 8899a91c17ce9618f565f42408b47db1d6e9ccc7

383
README.md
View file

@ -1,316 +1,145 @@
---
Introduction
------------
---
Proton is a tool for use with the Steam client which allows games which are
exclusive to Windows to run on Linux and macOS operating systems. It uses Wine
to facilitate this.
**Proton** is a tool for use with the Steam client which allows games which are
exclusive to Windows to run on the Linux operating system. It uses Wine to
facilitate this.
Most users will prefer to use Proton provided by the Steam client itself. The
source code is provided to enable advanced users the ability to alter
Proton. For example, some users may wish to use a different version of Wine with
a particular title.
**Most users should use Proton provided by the Steam Client itself.** See
[this Steam Community post][steam-play-introduction] for more details.
**NOTE:** If you are not comfortable in a command line terminal, or if you find
any of the information presented in here strange and uncomfortable, then
this is probably not for you. The instructions are likely to be incomplete
and require some knowledge and skill on your part, and there is no warranty
or guarantee that anyone will help you with this process.
The source code is provided to enable advanced users the ability to alter
Proton. For example, some users may wish to use a different version of Wine
with a particular title.
We strongly recommend that most users use the production build of Proton.
**The changelog** is available on [our wiki][changelog].
---
Obtaining Proton
---
The most current source for Proton is here:
<https://github.com/ValveSoftware/Proton>
[steam-play-introduction]: https://steamcommunity.com/games/221410/announcements/detail/1696055855739350561
[changelog]: https://github.com/ValveSoftware/Proton/wiki/Changelog
Which you can clone to your system with this command:
git clone https://github.com/ValveSoftware/Proton.git proton
Obtaining Proton sources
------------------------
After cloning the Proton git repository, the next step will be to
obtain the various submodules that go into building Proton:
Acquire Proton's source by cloning <https://github.com/ValveSoftware/Proton>
and checking out the branch you desire.
cd proton
#for linux:
git submodule update --init wine dxvk
#for macos:
git submodule update --init
You can clone the latest Proton to your system with this command:
If you wish to change any subcomponent, now is the time to do so.
For example, if you wish make changes to Wine, you would apply those
changes to the <tt>wine/</tt> directory.
```bash
git clone --recurse-submodules https://github.com/ValveSoftware/Proton.git proton
```
---
Building for Linux
---
To build Proton for Linux, set up a Debian machine with the Steam chroots as
documented in the Steam Runtime repository:
Be sure to update submodules when switching between branches:
<https://github.com/ValveSoftware/steam-runtime>
```bash
git checkout experimental_6.3
git submodule update --init --recursive
```
In addition, you will need to install gcc-5 and a long list of dependencies
required for Wine. The following set of commands is an example session, and may
not be complete.
If you want to change any subcomponent, now is the time to do so. For
example, if you wish to make changes to Wine, you would apply them to the
`wine/` directory.
cd ~
git clone https://github.com/ValveSoftware/steam-runtime.git
cd steam-runtime
#install the 32-bit scout_beta runtime:
./setup_chroot.sh --beta --i386
#enter the 32-bit runtime:
schroot --chroot steamrt_scout_beta_i386
This will enter the chroot environment, where you would issue the following commands:
Building Proton
---------------
sudo apt-get install gcc-5 g++-5 g++-5-multilib flex bison libosmesa6-dev libpcap-dev libhal-dev libsane-dev libv4l-dev libgphoto2-2-dev libcapi20-dev libgsm1-dev libmpg123-dev libvulkan-dev libxslt1-dev
sudo update-alternatives --install `which gcc` gcc `which gcc-5` 50
sudo update-alternatives --set gcc `which gcc-5`
sudo update-alternatives --install `which g++` g++ `which g++-5` 50
sudo update-alternatives --set g++ `which g++-5`
sudo update-alternatives --install `which cpp` cpp-bin `which cpp-5` 50
sudo update-alternatives --set cpp-bin `which cpp-5`
exit
Most of Proton builds inside the Proton SDK container with very few
dependencies on the host side.
Next, you need to repeat the process, but for amd64:
## Preparing the build environment
./setup_chroot.sh --beta --amd64
schroot --chroot steamrt_scout_beta_amd64
You need either a Docker or a Podman setup. We highly recommend [the rootless
Podman setup][rootless-podman]. Please refer to your distribution's
documentation for setup instructions (e.g. Arch [Podman][arch-podman] /
[Docker][arch-docker], Debian [Podman][debian-podman] /
[Docker][debian-docker]).
And then repeat all of the commands to install gcc and Wine depenedencies again.
[rootless-podman]: https://github.com/containers/podman/blob/main/docs/tutorials/rootless_tutorial.md
[arch-podman]: https://wiki.archlinux.org/title/Podman
[arch-docker]: https://wiki.archlinux.org/title/Docker
[debian-podman]: https://wiki.debian.org/Podman
[debian-docker]: https://wiki.debian.org/Docker
Finally, change your directory back to proton, and run:
cd ../proton
./build_proton.sh
## The Easy Way
That should configure and build Wine, and then package the result up into
<tt>dist/</tt>. It is important to examine the output near the end of
<tt>build/wine.win{64,32}/config.log</tt> to ensure that you have all of the relevant
libraries in each chroot. Search for '<tt>executing Makefile commands</tt>' in
<tt>config.log</tt> to find messages about missing libraries. It is normal to be missing
a few libraries, including OpenCL, OSS, and libav.
We provide a top-level Makefile which will execute most of the build commands
for you.
**NOTE:** For now, dxvk requires build-time components that are too new for
Debian 9. It's recommended to build the DLLs on Arch Linux, where dxvk is
actively being developed. This may be resolved in dxvk in the future, or may
be worked around by using a newer Debian release. See comments in <tt>build_proton.sh</tt>.
After checking out the repository and updating its submodules, assuming that
you have a working Docker or Podman setup, you can build and install Proton
with a simple:
---
Building for macOS
---
To build Proton for macOS, install the latest Xcode command line tools, as
well as cmake (for openal-soft) and a recent nasm (for libjpeg-turbo). You can
use a packager like Homebrew to find these packages. Then run:
```bash
make install
```
./build_proton.sh
If your build system is missing dependencies, it will fail quickly with a clear
error message.
TODO - Surely there are other dependencies we have not listed there.
After the build finishes, you may need to restart the Steam client to see the
new Proton tool. The tool's name in the Steam client will be based on the
currently checked out branch of Proton. You can override this name using the
`build_name` variable.
It is important to examine the output near the end of
<tt>build/wine.win{64,32}/config.log</tt> to ensure that you have all of the
relevant libraries required to build Wine properly.
See `make help` for other build targets and options.
## Manual building
### Configuring the build
```bash
mkdir ../build && cd ../build
../proton/configure.sh --enable-ccache --build-name=my_build
```
Running `configure.sh` will create a `Makefile` allowing you to build Proton.
The scripts checks if containers are functional and prompt you if any
host-side dependencies are missing. You should run the command from a
directory created specifically for your build.
The configuration script tries to discover a working Docker or Podman setup
to use, but you can force a compatible engine with
`--container-engine=<executable_name>`.
You can enable ccache with `--enable-cache` flag. This will mount your
`$CCACHE_DIR` or `$HOME/.ccache` inside the container.
`--proton-sdk-image=registry.gitlab.steamos.cloud/proton/soldier/sdk:<version>`
can be used to build with a custom version of the Proton SDK images.
Check `--help` for other configuration options.
NOTE: If **SELinux** is in use, the Proton build container may fail to access
your user's files. This is caused by [SELinux's filesystem
labels][selinux-labels]. You may pass the `--relabel-volumes` switch to
configure to cause the [container engine to relabel its
bind-mounts][bind-mounts] and allow access to those files from within the
container. This can be dangerous when used with system directories. Proceed
with caution and refer your container engine's manual.
[selinux-labels]: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/security-enhanced_linux/sect-security-enhanced_linux-working_with_selinux-selinux_contexts_labeling_files
[bind-mounts]: https://docs.docker.com/storage/bind-mounts/
### Building
```
make
```
**Important make targets:**
`make install` - install Proton into your user's Steam directory, see the [install Proton
locally](#install-proton-locally) section for details.
`make redist` - create a redistribute build (`redist/`) that can be copied to
`~/.steam/root/compatibilitytools.d/`.
`make deploy` - create a deployment build (`deploy/`). This is what we use to
deploy Proton to Steam users via Steamworks.
`make module=<module> module` - build both 32- and 64-bit versions of the
specified wine module. This allows rapid iteration on one module. This target
is only useful after building Proton.
`make dxvk` / `make vkd3d-proton` - rebuild DXVK / vkd3d-proton.
### Debug Builds
To prevent symbol stripping add `UNSTRIPPED_BUILD=1` to the `make`
invocation. This should be used only with a clean build directory.
E.g.:
```
mkdir ../debug-proton-build && cd ../debug-proton-build
../proton/configure.sh --enable-ccache --build-name=debug_build
make UNSTRIPPED_BUILD=1 install
```
Install Proton locally
----------------------
Steam ships with several versions of Proton, which games will use by default or
that you can select in Steam Settings' Steam Play page. Steam also supports
running games with local builds of Proton, which you can install on your
machine.
To install a local build of Proton into Steam, make a new directory in
`~/.steam/root/compatibilitytools.d/` with a tool name of your choosing and
place the directory containing your redistributable build under that path.
The `make install` target will perform this task for you, installing the
Proton build into the Steam folder for the current user. You will have to
restart the Steam client for it to pick up on a new tool.
A correct local tool installation should look similar to this:
```
compatibilitytools.d/my_proton/
├── compatibilitytool.vdf
├── filelock.py
├── LICENSE
├── proton
├── proton_dist.tar
├── toolmanifest.vdf
├── user_settings.sample.py
└── version
```
To enable your local build in Steam, go to the Steam Play section of the
Settings window. If the build was correctly installed, you should see
"proton-localbuild" in the drop-down list of compatibility tools.
---
Deploying
---
Once built, the <tt>dist/</tt> directory will contain the files which can be distributed
through Steam. For testing purposes, you should be able to clear out the files
in your <tt>steamapps/common/Proton</tt> directory and replace them with the contents of
<tt>dist/</tt>. The <tt>proton</tt> script will unpack the files on first run. Note that if you
use the Steam client to verify local files, it will restore the production version
of Proton.
Each component of this software is used under the terms of their licenses.
See the `LICENSE` files here, as well as the `LICENSE`, `COPYING`, etc files
in each submodule and directory for details. If you distribute a built
version of Proton to other users, you must adhere to the terms of these
licenses.
Debugging
---------
Proton builds have their symbols stripped by default. You can switch to
"debug" beta branch in Steam (search for Proton in your library,
Properties... -> BETAS -> select "debug") or build without stripping (see
[Debug Builds section](#debug-builds)).
The symbols are provided through the accompanying `.debug` files which may
need to be explicitly loaded by the debugging tools. For GDB there's a helper
script `wine/tools/gdbinit.py` (source it) that provides `load-symbol-files`
(or `lsf` for short) command which loads the symbols for all the mapped files.
For tips on debugging see [docs/DEBUGGING.md](docs/DEBUGGING.md).
`compile_commands.json`
-----------------------
For use with [clangd](https://clangd.llvm.org/) LSP server and similar tooling.
Projects built using cmake or meson (e.g. vkd3d-proton) automatically come with
`compile_commands.json`. For autotools (e.g. wine) you have to [configure the
build](#configuring-the-build) with `--enable-bear` that uses
[bear](https://github.com/rizsotto/Bear) to create the compilation database.
It's not on by default as it make the build slightly slower.
The build system collects all the created compile_commands.json files in a
build subdirectory named `compile_commands/`.
The paths are translated to point to the real source (i.e. not the rsynced
copy). It still may depend on build directory for things like auto-generated
`config.h` though and for wine it may be beneficial to run `tools/make_requests`
in you source directories as those changes are not committed.
You can then configure your editor to use that file for clangd in a few ways:
1) directly - some editors/plugins allow you to specify the path to `compile_commands.json`
2) via `.clangd` file, e.g.
```bash
cd src/proton/wine/
cat > .clangd <<EOF
CompileFlags:
CompilationDatabase: ../build/current-dev/compile_commands/wine64/
EOF
```
3) by symlinking:
```bash
ln -s ../build/current-dev/compile_commands/wine64/compile_commands.json .
```
See the <tt>LICENSE</tt> files here, as well as the <tt>LICENSE</tt>, <tt>COPYING</tt>, etc files in each
submodule and directory for details.
----
Runtime Config Options
----------------------
Proton can be tuned at runtime to help certain games run. The Steam client sets
some options for known games using the `STEAM_COMPAT_CONFIG` variable.
You can override these options using the environment variables described below.
The best way to set these environment overrides for all games is by renaming
`user_settings.sample.py` to `user_settings.py` and modifying it appropriately.
This file is located in the Proton installation directory in your Steam library
(often `~/.steam/steam/steamapps/common/Proton #.#`).
If you want to change the runtime configuration for a specific game, you can
use the `Set Launch Options` setting in the game's `Properties` dialog in the
Steam client. Set the variable, followed by `%command%`. For example, input
"`PROTON_USE_WINED3D=1 %command%`" to use the OpenGL-based wined3d renderer
instead of the Vulkan-based DXVK renderer.
To enable an option, set the variable to a non-`0` value. To disable an
option, set the variable to `0`. To use Steam's default configuration, do
not specify the variable at all.
----
Proton can be tuned at runtime to help certain games run. Options can either
be defined in a comma-separated list stored in the <tt>STEAM_COMPAT_CONFIG</tt>
environment variable when running Proton (the Steam client does this),
or passed through the presence of individual environment variables as documented below.
All of the below are runtime options. They do not effect permanent changes to
the Wine prefix. Removing the option will revert to the previous behavior.
| Compat config string | Environment Variable | Description |
| :-------------------- | :--------------------------------- | :----------- |
| | `PROTON_LOG` | Convenience method for dumping a useful debug log to `$PROTON_LOG_DIR/steam-$APPID.log`. Set to `1` to enable default logging, or set to a string to be appended to the default `WINEDEBUG` channels. |
| | `PROTON_LOG_DIR` | Output log files into the directory specified. Defaults to your home directory. |
| | `PROTON_WAIT_ATTACH` | Wait for a debugger to attach to steam.exe before launching the game process. To attach to the game process at startup, debuggers should be set to follow child processes. |
| | `PROTON_CRASH_REPORT_DIR` | Write crash logs into this directory. Does not clean up old logs, so may eat all your disk space eventually. |
| `wined3d` | `PROTON_USE_WINED3D` | Use OpenGL-based wined3d instead of Vulkan-based DXVK for d3d11, d3d10, and d3d9. |
| `nod3d11` | `PROTON_NO_D3D11` | Disable `d3d11.dll`, for d3d11 games which can fall back to and run better with d3d9. |
| `nod3d10` | `PROTON_NO_D3D10` | Disable `d3d10.dll` and `dxgi.dll`, for d3d10 games which can fall back to and run better with d3d9. |
| `dxvkd3d8` | `PROTON_DXVK_D3D8` | Use DXVK's `d3d8.dll`. |
| `noesync` | `PROTON_NO_ESYNC` | Do not use eventfd-based in-process synchronization primitives. |
| `nofsync` | `PROTON_NO_FSYNC` | Do not use futex-based in-process synchronization primitives. (Automatically disabled on systems with no `FUTEX_WAIT_MULTIPLE` support.) |
| `noxim` | `PROTON_NO_XIM` | Enabled by default. Do not attempt to use XIM (X Input Methods) support. XIM support is known to cause crashes with libx11 older than version 1.7. |
| `disablenvapi` | `PROTON_DISABLE_NVAPI` | Disable NVIDIA's NVAPI GPU support library. |
| `nativevulkanloader` | | Use the Vulkan loader shipped with the game instead of Proton's built-in Vulkan loader. This breaks VR support, but is required by a few games. |
| `forcelgadd` | `PROTON_FORCE_LARGE_ADDRESS_AWARE` | Force Wine to enable the LARGE_ADDRESS_AWARE flag for all executables. Enabled by default. |
| `heapdelayfree` | `PROTON_HEAP_DELAY_FREE` | Delay freeing some memory, to work around application use-after-free bugs. |
| `gamedrive` | `PROTON_SET_GAME_DRIVE` | Create an S: drive which points to the Steam Library which contains the game. |
| `noforcelgadd` | | Disable forcelgadd. If both this and `forcelgadd` are set, enabled wins. |
| `oldglstr` | `PROTON_OLD_GL_STRING` | Set some driver overrides to limit the length of the GL extension string, for old games that crash on very long extension strings. |
| `vkd3dfl12` | | Force the Direct3D 12 feature level to 12, regardless of driver support. |
| `vkd3dbindlesstb` | | Put `force_bindless_texel_buffer` into `VKD3D_CONFIG`. |
| `nomfdxgiman` | `WINE_DO_NOT_CREATE_DXGI_DEVICE_MANAGER` | Enable hack to work around video issues in some games due to incomplete IMFDXGIDeviceManager support. |
| `noopwr` | `WINE_DISABLE_VULKAN_OPWR` | Enable hack to disable Vulkan other process window rendering which sometimes causes issues on Wayland due to blit being one frame behind. |
| `hidenvgpu` | `PROTON_HIDE_NVIDIA_GPU` | Force Nvidia GPUs to always be reported as AMD GPUs. Some games require this if they depend on Windows-only Nvidia driver functionality. See also DXVK's nvapiHack config, which only affects reporting from Direct3D. |
| | `WINE_FULLSCREEN_INTEGER_SCALING` | Enable integer scaling mode, to give sharp pixels when upscaling. |
| `cmdlineappend:` | | Append the string after the colon as an argument to the game command. May be specified more than once. Escape commas and backslashes with a backslash. |
| `xalia` | `PROTON_USE_XALIA` | Enable Xalia, a program that can add a gamepad UI for some keyboard/mouse interfaces. |
| `seccomp` | `PROTON_USE_SECCOMP` | **Note: Obsoleted in Proton 5.13.** In older versions, enable seccomp-bpf filter to emulate native syscalls, required for some DRM protections to work. |
| `d9vk` | `PROTON_USE_D9VK` | **Note: Obsoleted in Proton 5.0.** In older versions, use Vulkan-based DXVK instead of OpenGL-based wined3d for d3d9. |
| Compat config string | Environment Variable | Description |
| :-------------------- | :----------------------------- | :----------- |
| <tt>dxvk</tt> | <tt>PROTON_USE_DXVK</tt> | Run the game with DXVK instead of wined3d. |
| <tt>nod3d11</tt> | <tt>PROTON_NO_D3D11</tt> | Disable <tt>d3d11.dll</tt>, for games which can fall back to and run better with d3d9. |
<!-- Target: GitHub Flavor Markdown. To test locally: pandoc -f markdown_github -t html README.md -->

1
SDL-mirror Submodule

@ -0,0 +1 @@
Subproject commit 14531cf0fcdac6939d1d511d478c795a05cea34f

@ -1 +0,0 @@
Subproject commit 6cae8216a6ea19ff3f237af01e54378c1ff81fcd

@ -1 +0,0 @@
Subproject commit 8c1c27d5a9b9de8a17f500053bd08c7ca6bba19c

34
build_dxvk.sh Executable file
View file

@ -0,0 +1,34 @@
#!/bin/bash
set -e
if [ x"$1" == x ]; then
echo missing build type, give win32 or win64
exit 1
fi
TOP="$PWD"
TYPE="$1"
cd "$TOP"/dxvk
sed -i -e 's/^exe_wrapper.*$//' build-$TYPE.txt
meson --prefix="$TOP"/dxvk/dist.$TYPE --cross-file build-$TYPE.txt build.$TYPE
cd build.$TYPE
meson configure -Dprefix="$TOP"/dxvk -Dbuildtype=release
ninja
#build on Arch Linux and deploy into git, see build_proton.sh
mkdir -p "$TOP"/dxvk.$TYPE
cp src/dxgi/dxgi.dll "$TOP"/dxvk.$TYPE/
strip "$TOP"/dxvk.$TYPE/dxgi.dll
cp src/d3d11/d3d11.dll "$TOP"/dxvk.$TYPE/
strip "$TOP"/dxvk.$TYPE/d3d11.dll
echo "build_dxvk: $TYPE build done"
#mark as built
#touch "$TOP"/dxvk/proton.$TYPE.built

510
build_proton.sh Executable file
View file

@ -0,0 +1,510 @@
#!/bin/bash
usage()
{
echo "$1: [--build component] [--release] [--package]"
echo "Build the Proton Steam Tool"
echo "Component can be one or more of:"
echo " wine, wine32, wine64"
echo " vrclient, vrclient32, vrclient64"
echo " lsteamclient, lsteamclient32, lsteamclient64"
echo "or all, which is the default. The 'all' component also implies --package"
echo "--release causes symbols to be stripped of debug info."
echo "--package creates the tar ball in dist/."
}
set -e
JOBS=-j5
PLATFORM=$(uname)
#./wine/ <-- wine source
#./build/ <-- built files
#./dist/ <-- proton build, ready to distribute
build_freetype()
{
cd "$TOP"/freetype2
sed -i -e 's/^LIBRARY.*/LIBRARY=libprotonfreetype/' builds/unix/unix-cc.in
bash ./autogen.sh
#freetype 32-bit
cd "$TOP"
mkdir -p build/freetype.win32
cd build/freetype.win32
"$TOP"/freetype2/configure --prefix="$TOOLS_DIR32" --without-png --host i686-apple-darwin CFLAGS='-m32 -g -O2' LDFLAGS=-m32 PKG_CONFIG=false
make $JOBS
make install
cp ./.libs/libprotonfreetype.dylib "$DST_DIR"/lib
if [ x"$RELEASE_BUILD" != x ]; then
$STRIP "$DST_DIR"/lib/libprotonfreetype.dylib
fi
#freetype 64-bit
cd "$TOP"
mkdir -p build/freetype.win64
cd build/freetype.win64
"$TOP"/freetype2/configure --prefix="$TOOLS_DIR64" --without-png --host x86_64-apple-darwin PKG_CONFIG=false
make $JOBS
make install
cp ./.libs/libprotonfreetype.dylib "$DST_DIR"/lib64
if [ x"$RELEASE_BUILD" != x ]; then
$STRIP "$DST_DIR"/lib64/libprotonfreetype.dylib
fi
}
build_libpng()
{
cd "$TOP"/libpng
if [ ! -e 'configure' ]; then
sed -i -e 's/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@/libprotonpng@PNGLIB_MAJOR@@PNGLIB_MINOR@/' Makefile.am
bash ./autogen.sh
fi
#libpng 32-bit
cd "$TOP"
mkdir -p build/libpng.win32
cd build/libpng.win32
"$TOP"/libpng/configure --prefix="$TOOLS_DIR32" --host i686-apple-darwin CFLAGS='-m32 -g -O2' LDFLAGS=-m32
make $JOBS
make install
cp ./.libs/libprotonpng16.dylib "$DST_DIR"/lib
if [ x"$RELEASE_BUILD" != x ]; then
$STRIP "$DST_DIR"/lib/libprotonpng16.dylib
fi
#libpng 64-bit
cd "$TOP"
mkdir -p build/libpng.win64
cd build/libpng.win64
"$TOP"/libpng/configure --prefix="$TOOLS_DIR64" --host x86_64-apple-darwin
make $JOBS
make install
cp ./.libs/libprotonpng16.dylib "$DST_DIR"/lib64
if [ x"$RELEASE_BUILD" != x ]; then
$STRIP "$DST_DIR"/lib64/libprotonpng16.dylib
fi
}
build_libjpeg()
{
cd "$TOP"/libjpeg-turbo
if [ ! -e 'configure' ]; then
autoreconf -fiv
fi
#if this fails with an nasm error, install a newer nasm with
#homebrew or the like and put it into your PATH
#libjpeg 32-bit
cd "$TOP"
mkdir -p build/libjpeg.win32
cd build/libjpeg.win32
"$TOP"/libjpeg-turbo/configure --prefix="$TOOLS_DIR32" --host i686-apple-darwin CFLAGS='-O3 -g -m32' LDFLAGS=-m32
make $JOBS
make install
mv "$TOOLS_DIR32"/lib/lib{,proton}jpeg.dylib
cp ./.libs/libjpeg.dylib "$DST_DIR"/lib/libprotonjpeg.dylib
if [ x"$RELEASE_BUILD" != x ]; then
$STRIP "$DST_DIR"/lib/libprotonjpeg.dylib
fi
#libjpeg 64-bit
cd "$TOP"
mkdir -p build/libjpeg.win64
cd build/libjpeg.win64
"$TOP"/libjpeg-turbo/configure --prefix="$TOOLS_DIR64" --host x86_64-apple-darwin
make $JOBS
make install
mv "$TOOLS_DIR64"/lib/lib{,proton}jpeg.dylib
cp ./.libs/libjpeg.dylib "$DST_DIR"/lib64/libprotonjpeg.dylib
if [ x"$RELEASE_BUILD" != x ]; then
$STRIP "$DST_DIR"/lib64/libprotonjpeg.dylib
fi
}
build_openal()
{
#openal 32-bit
cd "$TOP"
mkdir -p build/openal.win32
cd build/openal.win32
cmake "$TOP"/openal-soft -DCMAKE_C_FLAGS="-m32" -DCMAKE_INSTALL_PREFIX="$TOOLS_DIR32"
make $JOBS VERBOSE=1
make install VERBOSE=1
cp ./libopenal.dylib "$DST_DIR"/lib/libopenal.1.dylib
if [ x"$RELEASE_BUILD" != x ]; then
$STRIP "$DST_DIR"/lib/libopenal.1.dylib
fi
#openal 64-bit
cd "$TOP"
mkdir -p build/openal.win64
cd build/openal.win64
cmake "$TOP"/openal-soft -DCMAKE_INSTALL_PREFIX="$TOOLS_DIR64"
make $JOBS VERBOSE=1
make install VERBOSE=1
cp ./libopenal.dylib "$DST_DIR"/lib64/libopenal.1.dylib
if [ x"$RELEASE_BUILD" != x ]; then
$STRIP "$DST_DIR"/lib64/libopenal.1.dylib
fi
}
build_libSDL()
{
cd "$TOP"/SDL-mirror
bash ./autogen.sh
#libsdl2 32-bit
cd "$TOP"
mkdir -p build/SDL2.win32
cd build/SDL2.win32
"$TOP"/SDL-mirror/configure --prefix="$TOOLS_DIR32" --host i686-apple-darwin CFLAGS='-m32 -g -O2' LDFLAGS=-m32
make $JOBS
make install-hdrs
make install-lib
cp ./build/.libs/libSDL2.dylib "$DST_DIR"/lib
if [ x"$RELEASE_BUILD" != x ]; then
$STRIP "$DST_DIR"/lib/libSDL2.dylib
fi
#libsdl2 64-bit
cd "$TOP"
mkdir -p build/SDL2.win64
cd build/SDL2.win64
"$TOP"/SDL-mirror/configure --prefix="$TOOLS_DIR64" --host x86_64-apple-darwin
make $JOBS
make install-hdrs
make install-lib
cp ./build/.libs/libSDL2.dylib "$DST_DIR"/lib64
if [ x"$RELEASE_BUILD" != x ]; then
$STRIP "$DST_DIR"/lib64/libSDL2.dylib
fi
}
build_moltenvk()
{
#requires Xcode >= 9
cd "$TOP"/MoltenVK/
./fetchDependencies
xcodebuild -scheme 'MoltenVK (Release)' build
cp -a Package/Release/MoltenVK/include/* "$TOOLS_DIR64"/include/
cp -a Package/Release/MoltenVK/macOS/libMoltenVK.dylib "$TOOLS_DIR64"/lib/
cp -a Package/Release/MoltenVK/macOS/libMoltenVK.dylib "$DST_DIR"/lib64/
}
if [ "$PLATFORM" == "Darwin" ]; then
STRIP='strip -x'
else
STRIP='strip'
fi
PACKAGE=false
BUILD_COMPONENTS='all'
INSTALL_PROGRAM_FLAGS=''
for (( i=1; i <= $#; i++)); do
param="${!i}"
if [ "$param" == "--release" ]; then
RELEASE_BUILD=1
INSTALL_PROGRAM_FLAGS='-s'
elif [ "$param" == "--package" ]; then
PACKAGE=true
elif [ "$param" == "--build" ]; then
i=$((i+1))
if [ "$i" -gt "$#" ]; then
usage `basename $0`
exit 1
fi
BUILD_COMPONENTS="${!i}"
else
usage `basename $0`
exit 1
fi
done
if [ "$BUILD_COMPONENTS" == "all" ]; then
PACKAGE=true
fi
TOP="$PWD"
MAKE=make
if [ x"$RELEASE_BUILD" == x ]; then
set +e; CCACHE=`which ccache`; set -e
fi
if [ "$PLATFORM" == "Darwin" ]; then
CC="$CCACHE clang"
AMD64_WRAPPER=""
I386_WRAPPER=""
else
CC="$CCACHE gcc"
AMD64_WRAPPER="schroot --chroot steamrt_scout_beta_amd64 --"
I386_WRAPPER="schroot --chroot steamrt_scout_beta_i386 --"
gcc_ver=$($AMD64_WRAPPER gcc -v 2>&1 | grep 'gcc version' | cut -d' ' -f3)
gcc_maj=$(echo $gcc_ver | cut -d'.' -f1)
gcc_min=$(echo $gcc_ver | cut -d'.' -f2)
if [ $gcc_maj -lt 5 -o '(' $gcc_maj -eq 5 -a $gcc_min -lt 3 ')' ]; then
echo "need gcc >= 5.3"
exit 1
fi
fi
DST_DIR="$TOP/build/dist"
TOOLS_DIR64="$TOP/build/tools.win64"
TOOLS_DIR32="$TOP/build/tools.win32"
mkdir -p "$TOP"/dist "$DST_DIR"/bin "$TOP"/build/wine.win32 "$TOP"/build/dist.win32 "$TOP"/build/wine.win64
mkdir -p "$DST_DIR"/lib "$DST_DIR"/lib64 "$TOOLS_DIR64"/lib64 "$TOOLS_DIR32"/lib
if [ "$PLATFORM" == "Darwin" ]; then
build_freetype
FREETYPE32_CFLAGS="-I$TOOLS_DIR32/include/freetype2"
FREETYPE32_LIBS="-L$TOOLS_DIR32/lib -lprotonfreetype -framework CoreServices -framework ApplicationServices -lz"
ac_cv_lib_soname_freetype32=libprotonfreetype.dylib
FREETYPE64_CFLAGS="-I$TOOLS_DIR64/include/freetype2"
FREETYPE64_LIBS="-L$TOOLS_DIR64/lib -lprotonfreetype"
ac_cv_lib_soname_freetype64=libprotonfreetype.dylib
build_libpng
PNG32_CFLAGS="-I$TOOLS_DIR32/include"
PNG32_LIBS="-L$TOOLS_DIR32/lib -lprotonpng"
ac_cv_lib_soname_png32=libprotonpng16.dylib
PNG64_CFLAGS="-I$TOOLS_DIR64/include"
PNG64_LIBS="-L$TOOLS_DIR64/lib -lprotonpng"
ac_cv_lib_soname_png64=libprotonpng16.dylib
build_libjpeg
JPEG32_CFLAGS="-I$TOOLS_DIR32/include"
JPEG32_LIBS="-L$TOOLS_DIR32/lib -lprotonjpeg"
ac_cv_lib_soname_jpeg32=libprotonjpeg.dylib
JPEG64_CFLAGS="-I$TOOLS_DIR64/include"
JPEG64_LIBS="-L$TOOLS_DIR64/lib -lprotonjpeg"
ac_cv_lib_soname_jpeg64=libprotonjpeg.dylib
build_openal
build_libSDL
build_moltenvk
fi
function build_wine64
{
cd "$TOP"/build/wine.win64
STRIP="$STRIP" CFLAGS="-I$TOOLS_DIR64/include -g -O2" LDFLAGS="-L$TOOLS_DIR64/lib" PKG_CONFIG_PATH="$TOOLS_DIR64/lib/pkgconfig" CC="$CC" \
PNG_CFLAGS="$PNG64_CFLAGS" PNG_LIBS="$PNG64_LIBS" ac_cv_lib_soname_png="$ac_cv_lib_soname_png64" \
JPEG_CFLAGS="$JPEG64_CFLAGS" JPEG_LIBS="$JPEG64_LIBS" ac_cv_lib_soname_jpeg="$ac_cv_lib_soname_jpeg64" \
FREETYPE_CFLAGS="$FREETYPE64_CFLAGS" FREETYPE_LIBS="$FREETYPE64_LIBS" ac_cv_lib_soname_freetype="$ac_cv_lib_soname_freetype64" \
$AMD64_WRAPPER "$TOP"/wine/configure \
--enable-win64 --disable-tests --prefix="$DST_DIR"
STRIP="$STRIP" $AMD64_WRAPPER make $JOBS
INSTALL_PROGRAM_FLAGS="$INSTALL_PROGRAM_FLAGS" STRIP="$STRIP" $AMD64_WRAPPER make install-lib
INSTALL_PROGRAM_FLAGS="$INSTALL_PROGRAM_FLAGS" STRIP="$STRIP" $AMD64_WRAPPER make prefix="$TOOLS_DIR64" libdir="$TOOLS_DIR64/lib64" dlldir="$TOOLS_DIR64/lib64/wine" install-dev install-lib
rm -f "$DST_DIR"/bin/{msiexec,notepad,regedit,regsvr32,wineboot,winecfg,wineconsole,winedbg,winefile,winemine,winepath}
rm -rf "$DST_DIR/share/man/"
}
function build_wine32
{
cd "$TOP"/build/wine.win32
STRIP="$STRIP" CFLAGS="-I$TOOLS_DIR32/include -g -O2" LDFLAGS="-L$TOOLS_DIR32/lib" PKG_CONFIG_PATH="$TOOLS_DIR32/lib/pkgconfig" CC="$CC" \
PNG_CFLAGS="$PNG32_CFLAGS" PNG_LIBS="$PNG32_LIBS" ac_cv_lib_soname_png="$ac_cv_lib_soname_png32" \
JPEG_CFLAGS="$JPEG32_CFLAGS" JPEG_LIBS="$JPEG32_LIBS" ac_cv_lib_soname_jpeg="$ac_cv_lib_soname_jpeg32" \
FREETYPE_CFLAGS="$FREETYPE32_CFLAGS" FREETYPE_LIBS="$FREETYPE32_LIBS" ac_cv_lib_soname_freetype="$ac_cv_lib_soname_freetype32" \
$I386_WRAPPER "$TOP"/wine/configure \
--disable-tests --prefix="$TOP/build/dist.win32/"
STRIP="$STRIP" $I386_WRAPPER make $JOBS
INSTALL_PROGRAM_FLAGS="$INSTALL_PROGRAM_FLAGS" STRIP="$STRIP" $I386_WRAPPER make install-lib
INSTALL_PROGRAM_FLAGS="$INSTALL_PROGRAM_FLAGS" STRIP="$STRIP" $I386_WRAPPER make prefix="$TOOLS_DIR32" libdir="$TOOLS_DIR32/lib" dlldir="$TOOLS_DIR32/lib/wine" install-dev install-lib
#install 32-bit stuff manually, see
# https://wiki.winehq.org/Packaging#WoW64_Workarounds
cd "$TOP"/build/dist.win32/
cp -a lib "$DST_DIR"/
cp -a bin/wine "$DST_DIR"/bin/
if [ "$PLATFORM" != "Darwin" ]; then
cp -a bin/wine-preloader "$DST_DIR"/bin/
fi
cp -a bin/wineserver "$DST_DIR"/bin/wineserver32
}
function build_lsteamclient64
{
cd "$TOP"
rm -rf build/lsteamclient.win64
cp -a lsteamclient build/lsteamclient.win64
cd "$TOP"/build/lsteamclient.win64/
$AMD64_WRAPPER "$TOP"/wine/tools/winemaker/winemaker \
--nosource-fix --nolower-include --nodlls --nomsvcrt \
-DSTEAM_API_EXPORTS \
-I"$TOOLS_DIR64"/include/ \
-I"$TOOLS_DIR64"/include/wine/ \
-I"$TOOLS_DIR64"/include/wine/windows/ \
-L"$TOOLS_DIR64"/lib64/ \
-L"$TOOLS_DIR64"/lib64/wine/ \
--dll .
CXXFLAGS="-Wno-attributes -O2" CFLAGS="-O2 -g" PATH="$TOOLS_DIR64/bin:$PATH" $AMD64_WRAPPER make $JOBS
if [ x"$STRIP" != x ]; then
$AMD64_WRAPPER $STRIP lsteamclient.dll.so
fi
cp -a lsteamclient.dll.so "$DST_DIR"/lib64/wine/
}
function build_lsteamclient32
{
cd "$TOP"
rm -rf build/lsteamclient.win32
cp -a lsteamclient build/lsteamclient.win32
cd "$TOP"/build/lsteamclient.win32/
$I386_WRAPPER "$TOP"/wine/tools/winemaker/winemaker \
--nosource-fix --nolower-include --nodlls --nomsvcrt --wine32 \
-DSTEAM_API_EXPORTS \
-I"$TOOLS_DIR32"/include/ \
-I"$TOOLS_DIR32"/include/wine/ \
-I"$TOOLS_DIR32"/include/wine/windows/ \
-L"$TOOLS_DIR32"/lib/ \
-L"$TOOLS_DIR32"/lib/wine/ \
--dll .
CXXFLAGS="-Wno-attributes -O2" CFLAGS="-O2 -g" PATH="$TOOLS_DIR32/bin:$PATH" $I386_WRAPPER make $JOBS
if [ x"$STRIP" != x ]; then
$I386_WRAPPER $STRIP lsteamclient.dll.so
fi
cp -a lsteamclient.dll.so "$DST_DIR"/lib/wine/
}
function build_vrclient64
{
cd "$TOP"
rm -rf build/vrclient_x64
cp -a vrclient_x64 build/vrclient_x64
cd "$TOP"/build/vrclient_x64/
$AMD64_WRAPPER "$TOP"/wine/tools/winemaker/winemaker \
--nosource-fix --nolower-include --nodlls --nomsvcrt \
-I"$TOOLS_DIR64"/include/ \
-I"$TOOLS_DIR64"/include/wine/ \
-I"$TOOLS_DIR64"/include/wine/windows/ \
-L"$TOOLS_DIR64"/lib64/ \
-L"$TOOLS_DIR64"/lib64/wine/ \
--dll .
CXXFLAGS="-Wno-attributes -std=c++0x -O2 -g" CFLAGS="-O2 -g" PATH="$TOOLS_DIR64/bin:$PATH" $AMD64_WRAPPER make $JOBS
PATH="$TOOLS_DIR64/bin:$PATH" $AMD64_WRAPPER winebuild --dll --fake-module -E vrclient_x64.spec -o vrclient_x64.dll.fake
if [ x"$STRIP" != x ]; then
$AMD64_WRAPPER $STRIP vrclient_x64.dll.so
fi
cp -a vrclient_x64.dll.so "$DST_DIR"/lib64/wine/
cp -a vrclient_x64.dll.fake "$DST_DIR"/lib64/wine/fakedlls/vrclient_x64.dll
}
function build_vrclient32
{
cd "$TOP"
rm -rf build/vrclient
cp -a vrclient_x64 build/vrclient
cd "$TOP"/build/vrclient/
mv vrclient_x64.spec vrclient.spec
$I386_WRAPPER "$TOP"/wine/tools/winemaker/winemaker \
--nosource-fix --nolower-include --nodlls --nomsvcrt --wine32 \
-I"$TOOLS_DIR32"/include/ \
-I"$TOOLS_DIR32"/include/wine/ \
-I"$TOOLS_DIR32"/include/wine/windows/ \
-L"$TOOLS_DIR32"/lib/ \
-L"$TOOLS_DIR32"/lib/wine/ \
--dll .
CXXFLAGS="-Wno-attributes -std=c++0x -O2 -g" CFLAGS="-O2 -g" PATH="$TOOLS_DIR32/bin:$PATH" $I386_WRAPPER make $JOBS
PATH="$TOOLS_DIR32/bin:$PATH" $I386_WRAPPER winebuild --dll --fake-module -E vrclient.spec -o vrclient.dll.fake
if [ x"$STRIP" != x ]; then
$I386_WRAPPER $STRIP vrclient.dll.so
fi
cp -a vrclient.dll.so "$DST_DIR"/lib/wine/
cp -a vrclient.dll.fake "$DST_DIR"/lib/wine/fakedlls/vrclient.dll
}
#build dxvk
#Debian 9 is too old to build dxvk, so I gave up and I'm building it on my Arch
#Linux box and checking the binaries into Git instead. Blech. --aeikum
cd "$TOP"
mkdir -p "$DST_DIR"/lib64/wine/dxvk
cp "dxvk.win64/dxgi.dll" "$DST_DIR"/lib64/wine/dxvk/
cp "dxvk.win64/d3d11.dll" "$DST_DIR"/lib64/wine/dxvk/
mkdir -p "$DST_DIR"/lib/wine/dxvk
cp "dxvk.win32/dxgi.dll" "$DST_DIR"/lib/wine/dxvk/
cp "dxvk.win32/d3d11.dll" "$DST_DIR"/lib/wine/dxvk/
#unfortunately the Steam runtime chroot is too old to build dxvk, so
#we have to build it in the host system
#requires meson >= 0.43 and posix thread enabled mingw-w64, on debian:
# update-alternatives --config i686-w64-mingw32-g++
# update-alternatives --config i686-w64-mingw32-gcc
# update-alternatives --config x86_64-w64-mingw32-g++
# update-alternatives --config x86_64-w64-mingw32-gcc
#cd "$TOP"
#if [ ! -e dxvk/proton.win64.built ]; then
# PATH="$TOP"/glslang/bin/:"$PATH" bash ./build_dxvk.sh win64
#fi
#if [ ! -e dxvk/proton.win32.built ]; then
# PATH="$TOP"/glslang/bin/:"$PATH" bash ./build_dxvk.sh win32
#fi
#
#mkdir -p "$DST_DIR"/lib/wine/dxvk
#cp -a dxvk/dist.win32/bin/dxgi.dll "$DST_DIR"/lib/wine/dxvk/
#cp -a dxvk/dist.win32/bin/d3d11.dll "$DST_DIR"/lib/wine/dxvk/
#
#mkdir -p "$DST_DIR"/lib64/wine/dxvk
#cp -a dxvk/dist.win64/bin/dxgi.dll "$DST_DIR"/lib64/wine/dxvk/
#cp -a dxvk/dist.win64/bin/d3d11.dll "$DST_DIR"/lib64/wine/dxvk/
case "$BUILD_COMPONENTS" in
"all")
build_wine64
build_wine32
build_lsteamclient64
build_lsteamclient32
build_vrclient64
build_vrclient32
;;
"wine") build_wine64; build_wine32 ;;
"wine32") build_wine64 ;;
"wine64") build_wine64 ;;
"vrclient") build_vrclient32; build_vrclient64 ;;
"vrclient32") build_vrclient32 ;;
"vrclient64") build_vrclient64 ;;
"lsteamclient") build_lsteamclient32; build_lsteamclient64 ;;
"lsteamclient32") build_lsteamclient32 ;;
"lsteamclient64") build_lsteamclient64 ;;
*) echo "Invalid build components: $BUILD_COMPONENTS" ;;
esac
if [ "$PACKAGE" = true ]; then
echo "Packaging..."
cd "$TOP"
#the difference between -1 and -9 is about 20 MB, so prioritize quick startup over file size
tar -C build/dist -c . | gzip -c -1 > dist/proton_dist.tar.gz
cp -a toolmanifest.vdf dist/
cp -a filelock.py dist/
cp -a proton dist/
if [ "$PLATFORM" == "Darwin" ]; then
cp -a dist.LICENSE.osx dist/LICENSE
else
cp -a dist.LICENSE.lin dist/LICENSE
fi
date '+%s' > dist/version
echo "Proton ready in dist/"
fi

View file

@ -1,23 +0,0 @@
"compatibilitytools"
{
"compat_tools"
{
"##BUILD_NAME##" // Internal name of this tool
{
// Can register this tool with Steam in two ways:
//
// - The tool can be placed as a subdirectory in compatibilitytools.d, in which case this
// should be '.'
//
// - This manifest can be placed directly in compatibilitytools.d, in which case this should
// be the relative or absolute path to the tool's dist directory.
"install_path" "."
// For this template, we're going to substitute the display_name key in here, e.g.:
"display_name" "##BUILD_NAME##"
"from_oslist" "windows"
"to_oslist" "linux"
}
}
}

View file

@ -1,316 +0,0 @@
#!/bin/bash
set -eu
SRCDIR="$(dirname "$0")"
DEFAULT_BUILD_NAME="proton-localbuild" # If no --build-name specified
# Output helpers
COLOR_ERR=""
COLOR_STAT=""
COLOR_INFO=""
COLOR_CMD=""
COLOR_CLEAR=""
if [[ $(tput colors 2>/dev/null || echo 0) -gt 0 ]]; then
COLOR_ERR=$'\e[31;1m'
COLOR_STAT=$'\e[32;1m'
COLOR_INFO=$'\e[30;1m'
COLOR_CMD=$'\e[93;1m'
COLOR_CLEAR=$'\e[0m'
fi
sh_quote() {
local quoted
quoted="$(printf '%q ' "$@")"; [[ $# -eq 0 ]] || echo "${quoted:0:-1}";
}
err() { echo >&2 "${COLOR_ERR}!!${COLOR_CLEAR} $*"; }
stat() { echo >&2 "${COLOR_STAT}::${COLOR_CLEAR} $*"; }
info() { echo >&2 "${COLOR_INFO}::${COLOR_CLEAR} $*"; }
showcmd() { echo >&2 "+ ${COLOR_CMD}$(sh_quote "$@")${COLOR_CLEAR}"; }
die() { err "$@"; exit 1; }
finish() { stat "$@"; exit 0; }
cmd() { showcmd "$@"; "$@"; }
#
# Dependency Checks
#
MISSING_DEPENDENCIES=0
dependency_command() {
local COMMAND=$1
shift
if ! command -v "$COMMAND" &> /dev/null; then
err "Couldn't find command '$COMMAND'. Please install ${@:-$COMMAND}."
MISSING_DEPENDENCIES=1
fi
}
CONTAINER_MOUNT_OPTS=""
check_container_engine() {
stat "Trying $1."
if ! cmd $1 run --rm $2; then
info "$1 is unable to run the container."
return 1
fi
touch permission_check
local inner_uid="$($1 run -v "$(pwd):/test$CONTAINER_MOUNT_OPTS" \
--rm $2 \
stat --format "%u" /test/permission_check 2>&1)"
rm permission_check
if [[ $inner_uid == *"Permission denied"* ]]; then
err "The container cannot access files. Are you using SELinux?"
die "Please read README.md and check your $1 setup works."
elif [ "$inner_uid" -eq 0 ]; then
# namespace maps the user as root or the build is performed as host's root
ROOTLESS_CONTAINER=1
elif [ "$inner_uid" -eq "$(id -u)" ]; then
ROOTLESS_CONTAINER=0
else
err "File owner's UID doesn't map to 0 or $(id -u) in the container."
die "Don't know how to map permissions. Please check your $1 setup."
fi
}
#
# Configure
#
THIS_COMMAND="$0 $*" # For printing, not evaling
MAKEFILE="./Makefile"
# This is not rigorous. Do not use this for untrusted input. Do not. If you need a version of
# this for untrusted input, rethink the path that got you here.
function escape_for_make() {
local escape="$1"
escape="${escape//\\/\\\\}" # '\' -> '\\'
escape="${escape//#/\\#}" # '#' -> '\#'
escape="${escape//\$/\$\$}" # '$' -> '$$'
escape="${escape// /\\ }" # ' ' -> '\ '
echo "$escape"
}
function configure() {
local steamrt_image="$arg_protonsdk_image"
local srcdir
srcdir="$(dirname "$0")"
if [[ "$srcdir" = "." ]]; then
err "Cannot do a top level in-tree build."
die "Create a subdirectory in build/ or outside of the tree and run configure.sh from there."
fi
# nothing specified, getting the default value from the Makefile to test the
# container engine
if [[ -z $steamrt_image ]]; then
steamrt_image="$(sed -n 's/STEAMRT_IMAGE ?= //p' $SRCDIR/Makefile.in)"
fi
# Build name
local build_name="$arg_build_name"
if [[ -n $build_name ]]; then
info "Configuring with build name: $build_name"
else
build_name="$DEFAULT_BUILD_NAME"
info "No build name specified, using default: $build_name"
fi
dependency_command make "GNU Make"
if [ "$MISSING_DEPENDENCIES" -ne 0 ]; then
die "Missing dependencies, cannot continue."
fi
if [[ -n "$arg_relabel_volumes" ]]; then
CONTAINER_MOUNT_OPTS=:Z
fi
if [[ -n "$arg_container_engine" ]]; then
check_container_engine "$arg_container_engine" "$steamrt_image" || die "Specified container engine \"$arg_container_engine\" doesn't work"
else
stat "Trying to find usable container engine."
if check_container_engine docker "$steamrt_image"; then
arg_container_engine="docker"
elif check_container_engine podman "$steamrt_image"; then
arg_container_engine="podman"
else
die "${arg_container_engine:-Container engine discovery} has failed. Please fix your setup."
fi
fi
stat "Using $arg_container_engine."
## Write out config
# Don't die after this point or we'll have rather unhelpfully deleted the Makefile
[[ ! -e "$MAKEFILE" ]] || rm "$MAKEFILE"
{
# Config
echo "# Generated by: $THIS_COMMAND"
echo ""
echo "SRCDIR := $(escape_for_make "$srcdir")"
echo "BUILD_NAME := $(escape_for_make "$build_name")"
# SteamRT was specified, baking it into the Makefile
if [[ -n $arg_protonsdk_image ]]; then
echo "STEAMRT_IMAGE := $(escape_for_make "$arg_protonsdk_image")"
fi
echo "ROOTLESS_CONTAINER := $ROOTLESS_CONTAINER"
echo "CONTAINER_ENGINE := $arg_container_engine"
if [[ -n "$arg_docker_opts" ]]; then
echo "DOCKER_OPTS := $arg_docker_opts"
fi
if [[ -n "$CONTAINER_MOUNT_OPTS" ]]; then
echo "CONTAINER_MOUNT_OPTS := $CONTAINER_MOUNT_OPTS"
fi
if [[ -n "$arg_enable_ccache" ]]; then
echo "ENABLE_CCACHE := 1"
fi
if [[ -n "$arg_enable_bear" ]]; then
echo "ENABLE_BEAR := 1"
fi
# Include base
echo ""
echo "include \$(SRCDIR)/Makefile.in"
} >> "$MAKEFILE"
stat "Created $MAKEFILE, now run make to build."
stat " See README.md for make targets and instructions"
}
#
# Parse arguments
#
arg_protonsdk_image=""
arg_build_name=""
arg_container_engine=""
arg_docker_opts=""
arg_relabel_volumes=""
arg_enable_ccache=""
arg_enable_bear=""
arg_help=""
invalid_args=""
function parse_args() {
local arg;
local val;
local val_used;
local val_passed;
while [[ $# -gt 0 ]]; do
arg="$1"
val=''
val_used=''
val_passed=''
if [[ -z $arg ]]; then # Sanity
err "Unexpected empty argument"
return 1
elif [[ ${arg:0:2} != '--' ]]; then
err "Unexpected positional argument ($1)"
return 1
fi
# Looks like an argument does it have a --foo=bar value?
if [[ ${arg%=*} != "$arg" ]]; then
val="${arg#*=}"
arg="${arg%=*}"
val_passed=1
else
# Otherwise for args that want a value, assume "--arg val" form
val="${2:-}"
fi
# The args
if [[ $arg = --help || $arg = --usage ]]; then
arg_help=1
elif [[ $arg = --build-name ]]; then
arg_build_name="$val"
val_used=1
elif [[ $arg = --container-engine ]]; then
arg_container_engine="$val"
val_used=1
elif [[ $arg = --docker-opts ]]; then
arg_docker_opts="$val"
val_used=1
elif [[ $arg = --relabel-volumes ]]; then
arg_relabel_volumes="1"
elif [[ $arg = --enable-ccache ]]; then
arg_enable_ccache="1"
elif [[ $arg = --enable-bear ]]; then
arg_enable_bear="1"
elif [[ $arg = --proton-sdk-image ]]; then
val_used=1
arg_protonsdk_image="$val"
else
err "Unrecognized option $arg"
return 1
fi
# Check if this arg used the value and shouldn't have or vice-versa
if [[ -n $val_used && -z $val_passed ]]; then
# "--arg val" form, used $2 as the value.
# Don't allow this if it looked like "--arg --val"
if [[ ${val#--} != "$val" ]]; then
err "Ambiguous format for argument with value \"$arg $val\""
err " (use $arg=$val or $arg='' $val)"
return 1
fi
# Error if this was the last positional argument but expected $val
if [[ $# -le 1 ]]; then
err "$arg takes a parameter, but none given"
return 1
fi
shift # consume val
elif [[ -z $val_used && -n $val_passed ]]; then
# Didn't use a value, but passed in --arg=val form
err "$arg does not take a parameter"
return 1
fi
shift # consume arg
done
}
usage() {
"$1" "Usage: $0 { --proton-sdk-image=<image> }"
"$1" " Generate a Makefile for building Proton. May be run from another directory to create"
"$1" " out-of-tree build directories (e.g. mkdir mybuild && cd mybuild && ../configure.sh)"
"$1" ""
"$1" " Options"
"$1" " --help / --usage Show this help text and exit"
"$1" ""
"$1" " --build-name=<name> Set the name of the build that displays when used in Steam"
"$1" ""
"$1" " --container-engine=<engine> Which Docker-compatible container engine to use,"
"$1" " e.g. podman. Tries to do autodiscovery when not specified."
"$1" ""
"$1" " --docker-opts='<options>' Extra options to pass to Docker when invoking the runtime."
"$1" ""
"$1" " --relabel-volumes Bind-mounted volumes will be relabeled. Use with caution."
"$1" ""
"$1" " --enable-ccache Mount \$CCACHE_DIR or \$HOME/.ccache inside of the container and use ccache for the build."
"$1" ""
"$1" " --enable-bear Invokes make via bear creating compile_commands.json."
"$1" ""
"$1" " Steam Runtime"
"$1" " Proton builds that are to be installed & run under the steam client must be built with"
"$1" " the Steam Runtime SDK to ensure compatibility. See README.md for more information."
"$1" ""
"$1" " --proton-sdk-image=<image> Automatically invoke the Steam Runtime SDK in <image>"
"$1" " for build steps that must be run in an SDK"
"$1" " environment. See README.md for instructions to"
"$1" " create this image."
exit 1;
}
parse_args "$@" || usage err
[[ -z $arg_help ]] || usage info
configure

1
dav1d

@ -1 +0,0 @@
Subproject commit 8a6f054ef1e0f7886bc6e53e6be97c427154fe85

View file

@ -1,145 +0,0 @@
#!/usr/bin/env python3
# usage: default_pfx.py path/to/default_pfx_dir path/to/dist
"Helper module for building the default prefix"
import os
import subprocess
import re
def file_is_wine_builtin_dll(path):
if not os.path.exists(path):
return False
try:
sfile = open(path, "rb")
sfile.seek(0x40)
tag = sfile.read(20)
return tag.startswith((b"Wine placeholder DLL", b"Wine builtin DLL"))
except IOError:
return False
def little_endian_bytes_to_uint(b):
result = 0
multiplier = 1
for i in b:
result += i * multiplier
multiplier <<= 8
return result
def dll_bitness(path):
if not os.path.exists(path):
return 0
try:
sfile = open(path, "rb")
sfile.seek(0x3c)
ntheader_ofs = little_endian_bytes_to_uint(sfile.read(4))
sfile.seek(0x18 + ntheader_ofs)
magic = sfile.read(2)
if magic == bytes((11, 1)):
return 32
if magic == bytes((11, 2)):
return 64
return 0
except IOError:
return 0
def make_relative_symlink(target, linkname):
target = os.path.abspath(target)
linkname = os.path.abspath(linkname)
rel = os.path.relpath(target, os.path.dirname(linkname))
os.symlink(rel, linkname)
def setup_dll_symlinks(default_pfx_dir, dist_dir):
skip_dlls = [ 'amd_ags_x64.dll' ]
for walk_dir, dirs, files in os.walk(default_pfx_dir):
for file_ in files:
filename = os.path.join(walk_dir, file_)
if file_ in skip_dlls:
continue
if os.path.isfile(filename) and file_is_wine_builtin_dll(filename):
bitness = dll_bitness(filename)
if bitness == 32:
libdir = os.path.join(dist_dir, 'lib/wine/i386-windows')
elif bitness == 64:
libdir = os.path.join(dist_dir, 'lib64/wine/x86_64-windows')
else:
continue
if os.path.exists(os.path.join(libdir, file_)):
target = os.path.join(libdir, file_)
else:
continue
os.unlink(filename)
make_relative_symlink(target, filename)
KEY_RE = re.compile(r'\[(.+)\] ([0-9]+)')
VALUE_RE = re.compile(r'"(.*)"="(.+)"')
def filter_registry(filename):
"""Remove registry values that contain a fully qualified path
inside some well-known registry keys. These paths are devised on
the build machine and it makes no sense to distribute them. Plus,
they are known to cause bugs."""
FILTER_KEYS = [
r'Software\\Microsoft\\Windows\\CurrentVersion\\Fonts',
r'Software\\Microsoft\\Windows NT\\CurrentVersion\\Fonts',
r'Software\\Wine\\Fonts\\External Fonts',
]
filtering = False
with open(filename) as fin:
with open(filename + '.tmp', 'w') as fout:
for line in fin:
line = line.strip()
match = KEY_RE.match(line)
if match is not None:
fout.write(line + '\n')
filtering = match.group(1) in FILTER_KEYS
continue
match = VALUE_RE.match(line)
if match is not None:
if not filtering or match.group(2)[1:2] != ':':
fout.write(line + '\n')
continue
fout.write(line + '\n')
os.rename(filename + '.tmp', filename)
#steampipe can't handle filenames with colons, so we remove them here
#and restore them in the proton script
def fixup_drive_links(default_pfx_dir):
for walk_dir, dirs, files in os.walk(os.path.join(default_pfx_dir, "dosdevices")):
for dir_ in dirs:
if ":" in dir_:
os.remove(os.path.join(walk_dir, dir_))
def make_default_pfx(default_pfx_dir, dist_dir):
local_env = dict(os.environ)
ld_path = dist_dir + "/lib64:" + dist_dir + "/lib"
dll_path = dist_dir + "/lib64/vkd3d:" + dist_dir + "/lib/vkd3d"
local_env["LD_LIBRARY_PATH"] = ld_path
local_env["WINEPREFIX"] = default_pfx_dir
local_env["WINEDEBUG"] = "-all"
local_env["WINEDLLPATH"] = dll_path
runtime_args = []
subprocess.run(runtime_args + ["/bin/bash", "-c",
os.path.join(dist_dir, 'bin', 'wine') + " wineboot && " +
os.path.join(dist_dir, 'bin', 'wineserver') + " -w"],
env=local_env, check=True)
setup_dll_symlinks(default_pfx_dir, dist_dir)
fixup_drive_links(default_pfx_dir)
filter_registry(os.path.join(default_pfx_dir, 'user.reg'))
filter_registry(os.path.join(default_pfx_dir, 'system.reg'))
if __name__ == '__main__':
import sys
make_default_pfx(sys.argv[1], sys.argv[2])

View file

@ -1,467 +0,0 @@
Copyright (c) 2018-2022, Valve Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation and/or
other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors
may be used to endorse or promote products derived from this software without
specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Browse the source code for more information
https://github.com/ValveSoftware/Proton
---- ---- ---- ----
This software contains a modified version of Wine licensed under the LGPL 2.1. Wine is
Copyright (c) 1993-2022 the Wine project authors
Visit Wine at
https://winehq.org
View our modifications at
https://github.com/ValveSoftware/wine
---- ---- ---- ----
This software contains a modified version of DXVK licensed under the zlib/libpng license. DXVK is
Copyright (c) 2017-2022 Philip Rebohle
Copyright (c) 2019-2022 Joshua Ashton
Visit DXVK at
https://github.com/doitsujin/dxvk
View our modifications at
https://github.com/ValveSoftware/dxvk
---- ---- ---- ----
This software contains vkd3d-proton licensed under the LGPL 2.1. vkd3d-proton is
Copyright 2016-2022 the vkd3d-proton project authors
Visit vkd3d-proton at
https://github.com/HansKristian-Work/vkd3d-proton
---- ---- ---- ----
This software contains FAudio licensed under the zlib license. FAudio is
Copyright (c) 2011-2022 Ethan Lee, Luigi Auriemma, and the MonoGame Team
Visit FAudio at
https://github.com/FNA-XNA/FAudio
---- ---- ---- ----
This software contains gstreamer, gst-plugins-base, and gst-plugins-good licensed under the LGPL 2.
Visit gstreamer at
https://gstreamer.freedesktop.org/
---- ---- ---- ----
This software contains some Liberation Fonts licensed under the SIL Open Font License, available at LICENSE.OFL. These fonts are
Copyright (c) 2010 Google Corporation
Copyright (c) 2012 Red Hat, Inc.
Visit Liberation Fonts at
https://github.com/liberationfonts/liberation-fonts
---- ---- ---- ----
This software contains Source Han Sans licensed under the SIL Open Font License, available at LICENSE.OFL. This font is
Copyright 2014-2021 Adobe (http://www.adobe.com/)
Visit Source Han Sans at
https://github.com/adobe-fonts/source-han-sans
---- ---- ---- ----
This software contains Ume fonts distributed under the following license:
These fonts are free software. Unlimited permission is granted to
use, copy, and distribute it, with or without modification, either
commercially and noncommercially. THESE FONTS ARE PROVIDED "AS
IS" WITHOUT WARRANTY.
Visit Ume fonts home page at
https://osdn.net/projects/ume-font/
---- ---- ---- ----
This software contains some fonts from the Google Noto collection, licensed under the SIL Open Font License, available at LICENSE.OFL. They are
Copyright 2015 Google Inc.
Visit the Google Noto fonts collection at
https://www.google.com/get/noto/
---- ---- ---- ----
This software contains wine-mono, parts of which are included under a variety of licenses.
Parts of Mono (mono/) are variously licensed under the GPL, LGPL, and MIT X11 licenses. All parts are available as LGPL or MIT X11 except for the following:
* The ICSharpCode.SharpZipLib library is available as GPL with an exception (see mono/mcs/class/ICSharpCode.SharpZipLib/README).
* mcs/jay is BSD-licensed.
The Visual Basic class libraries (mono-basic/) are MIT X11. The compiler is LGPL v2.
FNA is a mix of MSPL and MIT. It has the following library dependencies:
* FAudio, MojoShader, Theorafile, SDL2, SDL_image_compact, and SDL2-CS are zlib-licensed. SDL2-CS is built into FNA.dll.
* FNA.NetStub is MSPL.
The winforms and wpf libraries are MIT.
wine-mono itself is included under the MIT license. wine-mono is
Copyright (c) 2012 Vincent Povirk for CodeWeavers
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
Visit wine-mono at
https://github.com/madewokherd/wine-mono
View wine-mono's complete license at
https://github.com/madewokherd/wine-mono/blob/master/COPYING
---- ---- ---- ----
This software contains wine-gecko, parts of which are included under a variety of licenses.
wine-gecko itself is included under the Mozilla Public License 2.0.
wine-gecko is available in Source Code form at
https://sourceforge.net/p/wine/wine-gecko
---- ---- ---- ----
This software contains orc. Orc is
Copyright 2002 - 2009 David A. Schleef <ds@schleef.org>
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
The source code implementing the Mersenne Twister algorithm is
subject to the following license:
Copyright (C) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura,
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. The names of its contributors may not be used to endorse or promote
products derived from this software without specific prior written
permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Visit orc at
https://gitlab.freedesktop.org/gstreamer/orc
---- ---- ---- ----
This software contains the following Rust libraries under the MIT license:
gstreamer-rs <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs>
gst-plugins-rs <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs>
array-init <https://github.com/Manishearth/array-init/>
Copyright (c) 2017-2020 The array-init developers
bitflags <https://github.com/bitflags/bitflags>
num-integer <https://github.com/rust-num/num-integer>
num-rational <https://github.com/rust-num/num-rational>
num-traits <https://github.com/rust-num/num-traits>
Copyright (c) 2014 The Rust Project Developers
cfg-if <https://github.com/alexcrichton/cfg-if>
proc-macro2 <https://github.com/dtolnay/proc-macro2>
toml <https://github.com/alexcrichton/toml-rs>
Copyright (c) 2014 Alex Crichton
crc32fast <https://github.com/srijs/rust-crc32fast>
Copyright (c) 2018 Sam Rijs, Alex Crichton and contributors
dav1d-rs <https://github.com/rust-av/dav1d-rs>
Copyright (c) 2018 Luca Barbato
futures-channel <https://github.com/rust-lang/futures-rs>
futures-core <https://github.com/rust-lang/futures-rs>
futures-executor <https://github.com/rust-lang/futures-rs>
futures-task <https://github.com/rust-lang/futures-rs>
futures-util <https://github.com/rust-lang/futures-rs>
Copyright (c) 2016 Alex Crichton
Copyright (c) 2017 The Tokio Authors
heck <https://github.com/withoutboats/heck>
unicode-segmentation <https://github.com/unicode-rs/unicode-segmentation>
unicode-xid <https://github.com/unicode-rs/unicode-xid>
Copyright (c) 2015 The Rust Project Developers
libc <https://github.com/rust-lang/libc>
Copyright (c) 2014-2020 The Rust Project Developers
muldiv <https://github.com/sdroege/rust-muldiv>
Copyright (c) 2017 Sebastian Dröge <sebastian@centricular.com>
murmur3 <https://github.com/stusmall/murmur3>
Copyright (c) 2016 Stu Small
pin-utils <https://github.com/rust-lang-nursery/pin-utils>
Copyright (c) 2018 The pin-utils authors
pretty-hex <https://github.com/wolandr/pretty-hex>
Copyright (c) 2018 Andrei Volnin
proc-macro-error <https://gitlab.com/CreepySkeleton/proc-macro-error>
proc-macro-error-attr <https://gitlab.com/CreepySkeleton/proc-macro-error>
Copyright (c) 2019-2020 CreepySkeleton
quote <https://github.com/dtolnay/quote>
Copyright (c) 2016 The Rust Project Developers
slab <https://github.com/tokio-rs/slab>
Copyright (c) 2019 Carl Lerche
smallvec <https://github.com/servo/rust-smallvec>
Copyright (c) 2018 The Servo Project Developers
anyhow <https://github.com/dtolnay/anyhow>
glib <https://github.com/gtk-rs/gtk-rs-core>
once_cell <https://github.com/matklad/once_cell>
paste <https://github.com/dtolnay/paste>
pin-project-lite <https://github.com/taiki-e/pin-project-lite>
proc-macro-crate <https://github.com/bkchr/proc-macro-crate>
serde <https://github.com/serde-rs/serde>
syn <https://github.com/dtolnay/syn>
thiserror <https://github.com/dtolnay/thiserror>
thiserror-impl <https://github.com/dtolnay/thiserror>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
---- ---- ---- ----
Parts of this software are based on the OpenVR SDK, which is
Copyright (c) 2015, Valve Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation and/or
other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors
may be used to endorse or promote products derived from this software without
specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Visit OpenVR at
https://github.com/ValveSoftware/openvr
---- ---- ---- ----
Parts of this software are based on the AMD AGS library, which is
Copyright (c) 2017 Advanced Micro Devices, Inc. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
---- ---- ---- ----
This software contains the jxrlib library, which is
Copyright (c) Microsoft Corp. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
---- ---- ---- ----
This software contains the dav1d library, which is
Copyright © 2018-2019, VideoLAN and dav1d authors
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Distribution of dav1d is also covered by the Alliance for Open Media Patent License 1.0, available at PATENTS.AV1.

32
dist.LICENSE.lin Normal file
View file

@ -0,0 +1,32 @@
This software contains Wine licensed under the LGPL 2.1. Wine is
Copyright (c) 1993-2018 the Wine project authors
Browse the source code for more information
https://github.com/ValveSoftware/wine/
---- ---- ---- ----
This software contains DXVK licensed under the zlib/libpng license. DXVK is
Copyright (c) 2017 Philip Rebohle
Visit DXVK at
https://github.com/doitsujin/dxvk/
---- ---- ---- ----
Parts of this software are based on the OpenVR SDK, which is
Copyright (c) 2015, Valve Corporation
Visit OpenVR at
https://github.com/ValveSoftware/openvr/
---- ---- ---- ----
The rest of this software is available under Steam's standard licensing,
included with your Steam client.

61
dist.LICENSE.osx Normal file
View file

@ -0,0 +1,61 @@
This software contains Wine licensed under the LGPL 2.1. Wine is
Copyright (c) 1993-2018 the Wine project authors
Browse the source code for more information
https://github.com/ValveSoftware/wine/
---- ---- ---- ----
This software contains DXVK licensed under the zlib/libpng license. DXVK is
Copyright (c) 2017 Philip Rebohle
Visit DXVK at
https://github.com/doitsujin/dxvk/
---- ---- ---- ----
This software contains libSDL2 licensed under the zlib license. Visit libSDL at
https://libsdl.org/
---- ---- ---- ----
This software contains FreeType2 licensed under the FreeType License.
Portions of this software are copyright © 2018 The FreeType Project
(www.freetype.org). All rights reserved.
---- ---- ---- ----
This software is based in part on the work of the Independent JPEG Group.
Visit the libjpeg-turbo homepage at
https://libjpeg-turbo.org/
---- ---- ---- ----
This software is based in part on the work of the libpng authors.
Visit the libpng homepage at
http://libpng.org/pub/png/libpng.html
---- ---- ---- ----
Parts of this software are based on the OpenVR SDK, which is
Copyright (c) 2015, Valve Corporation
Visit OpenVR at
https://github.com/ValveSoftware/openvr/
---- ---- ---- ----
The rest of this software is available under Steam's standard licensing,
included with your Steam client.

View file

@ -1,228 +0,0 @@
STEAMRT_VERSION = 0.20240307.80401
STEAMRT_URLBASE = registry.gitlab.steamos.cloud
PROTONSDK_URLBASE = $(STEAMRT_URLBASE)/proton/sniper/sdk
PROTONSDK_VERSION = $(STEAMRT_VERSION)-0-dev
# this is just for building toolchain, as we do static builds it should
# not have any impact on the end result, but changing it will invalidate
# docker caches, so we need something that don't change much
BASE_IMAGE = $(STEAMRT_URLBASE)/steamrt/sniper/sdk:0.20221017.1
BINUTILS_VERSION = 2.42
GCC_VERSION = 10.3.0
MINGW_VERSION = 9.0.0
RUST_VERSION = 1.68.0
NINJA_VERSION = 1.11.1
SOURCES_URLBASE = https://repo.steampowered.com/proton-sdk
BINUTILS_URLBASE = $(SOURCES_URLBASE)
GCC_URLBASE = $(SOURCES_URLBASE)
MINGW_URLBASE = $(SOURCES_URLBASE)
RUST_URLBASE = $(SOURCES_URLBASE)
NINJA_URLBASE = $(SOURCES_URLBASE)
BINUTILS_SOURCE = binutils-$(BINUTILS_VERSION).tar.xz
GCC_SOURCE = gcc-$(GCC_VERSION).tar.xz
MINGW_SOURCE = mingw-w64-v$(MINGW_VERSION).tar.bz2
RUST_SOURCE_x86_64 = rust-$(RUST_VERSION)-x86_64-unknown-linux-gnu.tar.gz
RUST_SOURCE_i686 = rust-$(RUST_VERSION)-i686-unknown-linux-gnu.tar.gz
NINJA_SOURCE = ninja-build_$(NINJA_VERSION).orig.tar.gz
BINUTILS_SHA256 = f6e4d41fd5fc778b06b7891457b3620da5ecea1006c6a4a41ae998109f85a800
GCC_SHA256 = 64f404c1a650f27fc33da242e1f2df54952e3963a49e06e73f6940f3223ac344
MINGW_SHA256 = 1929b94b402f5ff4d7d37a9fe88daa9cc55515a6134805c104d1794ae22a4181
RUST_SHA256_x86_64 = 7be1acdac656d0b0b7e909e5c0d4ddf61c755c203ec26ebafbd306322335b361
RUST_SHA256_i686 = dc931adeb2943dcadfbd29546481f0296fcb97a511421053ecae6586a85869b1
NINJA_SHA256 = 31747ae633213f1eda3842686f83c2aa1412e0f5691d1c14dbbcc67fe7400cea
DOCKER = docker
%.Dockerfile: %.Dockerfile.in Makefile
sed -re 's!@PROTONSDK_URLBASE@!$(PROTONSDK_URLBASE)!g' \
-re 's!@BASE_IMAGE@!$(BASE_IMAGE)!g' \
-re 's!@BINUTILS_VERSION@!$(BINUTILS_VERSION)!g' \
-re 's!@BINUTILS_URLBASE@!$(BINUTILS_URLBASE)!g' \
-re 's!@BINUTILS_SOURCE@!$(BINUTILS_SOURCE)!g' \
-re 's!@BINUTILS_SHA256@!$(BINUTILS_SHA256)!g' \
-re 's!@GCC_VERSION@!$(GCC_VERSION)!g' \
-re 's!@GCC_URLBASE@!$(GCC_URLBASE)!g' \
-re 's!@GCC_SOURCE@!$(GCC_SOURCE)!g' \
-re 's!@GCC_SHA256@!$(GCC_SHA256)!g' \
-re 's!@MINGW_VERSION@!$(MINGW_VERSION)!g' \
-re 's!@MINGW_URLBASE@!$(MINGW_URLBASE)!g' \
-re 's!@MINGW_SOURCE@!$(MINGW_SOURCE)!g' \
-re 's!@MINGW_SHA256@!$(MINGW_SHA256)!g' \
-re 's!@RUST_VERSION@!$(RUST_VERSION)!g' \
-re 's!@RUST_URLBASE@!$(RUST_URLBASE)!g' \
-re 's!@RUST_SOURCE_x86_64@!$(RUST_SOURCE_x86_64)!g' \
-re 's!@RUST_SOURCE_i686@!$(RUST_SOURCE_i686)!g' \
-re 's!@RUST_SHA256_x86_64@!$(RUST_SHA256_x86_64)!g' \
-re 's!@RUST_SHA256_i686@!$(RUST_SHA256_i686)!g' \
-re 's!@NINJA_VERSION@!$(NINJA_VERSION)!g' \
-re 's!@NINJA_URLBASE@!$(NINJA_URLBASE)!g' \
-re 's!@NINJA_SOURCE@!$(NINJA_SOURCE)!g' \
-re 's!@NINJA_SHA256@!$(NINJA_SHA256)!g' \
-re 's!@J@!$(shell nproc)!g' \
$< >$@
%-i686.Dockerfile.in: %.Dockerfile.in
sed -re 's!@ARCH@!i686!g' \
-re 's!@ARCH_FLAGS@!$(ARCH_FLAGS)!g' \
$< >$@
%-x86_64.Dockerfile.in: %.Dockerfile.in
sed -re 's!@ARCH@!x86_64!g' \
-re 's!@ARCH_FLAGS@!$(ARCH_FLAGS)!g' \
$< >$@
%-linux-gnu.Dockerfile.in: %.Dockerfile.in
sed -re 's!@TARGET@!linux-gnu!g' \
-re 's!@ARCH_FLAGS@!$(ARCH_FLAGS)!g' \
-re 's!@TARGET_FLAGS@!$(TARGET_FLAGS)!g' \
$< >$@
%-w64-mingw32.Dockerfile.in: %.Dockerfile.in
sed -re 's!@TARGET@!w64-mingw32!g' \
-re 's!@ARCH_FLAGS@!$(ARCH_FLAGS)!g' \
-re 's!@TARGET_FLAGS@!$(TARGET_FLAGS)!g' \
$< >$@
define create-build-base-rules
.PHONY: build-base-$(1)
all build-base: build-base-$(1)
build-base-$(1): build-base-$(1).Dockerfile
$(DOCKER) build -f $$< \
--cache-from=$(PROTONSDK_URLBASE)/build-base-$(1) \
-t $(PROTONSDK_URLBASE)/build-base-$(1):latest \
context
pull::
-$(DOCKER) pull $(PROTONSDK_URLBASE)/build-base-$(1):latest
push::
$(DOCKER) push $(PROTONSDK_URLBASE)/build-base-$(1):latest
endef
$(eval $(call create-build-base-rules,i686))
$(eval $(call create-build-base-rules,x86_64))
define create-binutils-rules
.PHONY: binutils-$(1)-$(2)
all binutils: binutils-$(1)-$(2)
binutils-$(1)-$(2): binutils-$(1)-$(2).Dockerfile | build-base
$(DOCKER) build -f $$< \
--cache-from=$(PROTONSDK_URLBASE)/binutils-$(1)-$(2) \
-t $(PROTONSDK_URLBASE)/binutils-$(1)-$(2):$(BINUTILS_VERSION) \
-t $(PROTONSDK_URLBASE)/binutils-$(1)-$(2):latest \
context
pull::
-$(DOCKER) pull $(PROTONSDK_URLBASE)/binutils-$(1)-$(2):$(BINUTILS_VERSION)
push::
$(DOCKER) push $(PROTONSDK_URLBASE)/binutils-$(1)-$(2):$(BINUTILS_VERSION)
$(DOCKER) push $(PROTONSDK_URLBASE)/binutils-$(1)-$(2):latest
endef
$(eval $(call create-binutils-rules,i686,w64-mingw32))
$(eval $(call create-binutils-rules,i686,linux-gnu))
$(eval $(call create-binutils-rules,x86_64,w64-mingw32))
$(eval $(call create-binutils-rules,x86_64,linux-gnu))
MINGW_ARCH_FLAGS_crt-x86_64 = --disable-lib32 CFLAGS="-mcmodel=small"
MINGW_ARCH_FLAGS_crt-i686 = --disable-lib64
MINGW_ARCH_FLAGS_pthread-x86_64 = CFLAGS="-mcmodel=small"
MINGW_ARCH_FLAGS_pthread-i686 =
define create-mingw-rules
.PHONY: mingw-$(2)-$(1)
all mingw: mingw-$(2)-$(1)
mingw-$(2)-$(1): ARCH_FLAGS = $(MINGW_ARCH_FLAGS_$(2)-$(1))
mingw-$(2)-$(1): mingw-$(2)-$(1).Dockerfile | binutils
$(DOCKER) build -f $$< \
--cache-from=$(PROTONSDK_URLBASE)/mingw-$(2)-$(1) \
-t $(PROTONSDK_URLBASE)/mingw-$(2)-$(1):$(MINGW_VERSION) \
-t $(PROTONSDK_URLBASE)/mingw-$(2)-$(1):latest \
context
pull::
-$(DOCKER) pull $(PROTONSDK_URLBASE)/mingw-$(2)-$(1):$(MINGW_VERSION)
push::
$(DOCKER) push $(PROTONSDK_URLBASE)/mingw-$(2)-$(1):$(MINGW_VERSION)
$(DOCKER) push $(PROTONSDK_URLBASE)/mingw-$(2)-$(1):latest
endef
$(eval $(call create-mingw-rules,i686,headers))
$(eval $(call create-mingw-rules,i686,gcc))
$(eval $(call create-mingw-rules,i686,crt))
$(eval $(call create-mingw-rules,i686,pthreads))
$(eval $(call create-mingw-rules,i686,widl))
$(eval $(call create-mingw-rules,x86_64,headers))
$(eval $(call create-mingw-rules,x86_64,gcc))
$(eval $(call create-mingw-rules,x86_64,crt))
$(eval $(call create-mingw-rules,x86_64,pthreads))
$(eval $(call create-mingw-rules,x86_64,widl))
GCC_ARCH_FLAGS_x86_64 = CFLAGS_FOR_TARGET="-mcmodel=small" CXXFLAGS_FOR_TARGET="-mcmodel=small"
GCC_ARCH_FLAGS_i686 =
GCC_TARGET_FLAGS_w64-mingw32 = --disable-shared
GCC_TARGET_FLAGS_linux-gnu =
define create-gcc-rules
.PHONY: gcc-$(1)-$(2)
all gcc: gcc-$(1)-$(2)
gcc-$(1)-$(2): ARCH_FLAGS = $(GCC_ARCH_FLAGS_$(1))
gcc-$(1)-$(2): TARGET_FLAGS = $(GCC_TARGET_FLAGS_$(2))
gcc-$(1)-$(2): gcc-$(1)-$(2).Dockerfile | mingw
$(DOCKER) build -f $$< \
--cache-from=$(PROTONSDK_URLBASE)/gcc-$(1)-$(2) \
-t $(PROTONSDK_URLBASE)/gcc-$(1)-$(2):$(GCC_VERSION) \
-t $(PROTONSDK_URLBASE)/gcc-$(1)-$(2):latest \
context
pull::
-$(DOCKER) pull $(PROTONSDK_URLBASE)/gcc-$(1)-$(2):$(GCC_VERSION)
push::
$(DOCKER) push $(PROTONSDK_URLBASE)/gcc-$(1)-$(2):$(GCC_VERSION)
$(DOCKER) push $(PROTONSDK_URLBASE)/gcc-$(1)-$(2):latest
endef
$(eval $(call create-gcc-rules,i686,linux-gnu))
$(eval $(call create-gcc-rules,x86_64,linux-gnu))
$(eval $(call create-gcc-rules,i686,w64-mingw32))
$(eval $(call create-gcc-rules,x86_64,w64-mingw32))
define create-proton-rules
.PHONY: proton
all: proton
proton: BASE_IMAGE = $(STEAMRT_URLBASE)/steamrt/sniper/sdk:$(STEAMRT_VERSION)
proton: proton.Dockerfile | gcc
$(DOCKER) build -f $$< \
--cache-from=$(PROTONSDK_URLBASE) \
-t $(PROTONSDK_URLBASE):$(PROTONSDK_VERSION) \
-t $(PROTONSDK_URLBASE):latest \
context
pull::
-$(DOCKER) pull $(PROTONSDK_URLBASE):$(PROTONSDK_VERSION)
push::
$(DOCKER) push $(PROTONSDK_URLBASE):$(PROTONSDK_VERSION)
$(DOCKER) push $(PROTONSDK_URLBASE):latest
endef
$(eval $(call create-proton-rules))
sources::
rm -f $(BINUTILS_SOURCE)
rm -f $(MINGW_SOURCE)
rm -f $(GCC_SOURCE)
rm -f $(RUST_SOURCE_x86_64)
rm -f $(RUST_SOURCE_i686)
rm -f $(NINJA_SOURCE)
wget $(BINUTILS_URLBASE)/$(BINUTILS_SOURCE)
wget $(MINGW_URLBASE)/$(MINGW_SOURCE)
wget $(GCC_URLBASE)/$(GCC_SOURCE)
wget $(RUST_URLBASE)/$(RUST_SOURCE_x86_64)
wget $(RUST_URLBASE)/$(RUST_SOURCE_i686)
wget $(NINJA_URLBASE)/$(NINJA_SOURCE)
echo $(BINUTILS_SHA256) $(BINUTILS_SOURCE) | sha256sum -c -
echo $(MINGW_SHA256) $(MINGW_SOURCE) | sha256sum -c -
echo $(GCC_SHA256) $(GCC_SOURCE) | sha256sum -c -
echo $(RUST_SHA256_x86_64) $(RUST_SOURCE_x86_64) | sha256sum -c -
echo $(RUST_SHA256_i686) $(RUST_SOURCE_i686) | sha256sum -c -
echo $(NINJA_SHA256) $(NINJA_SOURCE) | sha256sum -c -

View file

@ -1,81 +0,0 @@
Proton (sniper) SDK
====================
These are the build rules that are used to create docker images to build
Proton. The automated creation of the official images lives in
<https://gitlab.steamos.cloud/proton/sniper/sdk>, but this can be
used to create local images too.
Local usage
-----------
The `protonsdk_version` make variable will override which image is used
to build Proton, but may not trigger a full rebuild, so building from
scratch may be necessary.
Building Proton with a locally build docker image, instead of using the
official images, can be done by using `protonsdk_version=local`. This
may be used for instance to test changes to the docker image recipes.
Or, it is also possible to build the docker images first by invoking
`make protonsdk` and it will tag the images with the `protonsdk_version`
variable value.
Official images
---------------
To update the official Proton SDK images:
1) Update the image build rules, `STEAMRT_VERSION` and
`PROTONSDK_VERSION` version numbers in this folder, test locally,
commit and push the changes.
2) Update `.gitlab-ci.yml` in the
[Proton SDK](https://gitlab.steamos.cloud/proton/sniper/sdk)
repository to point to the new commit, commit and push to trigger a
new build of "-dev" images.
3) Once the images are satisfying, tag the version in Proton SDK
repository and push the tag, this will trigger a new build of the
images and version them with the same tag as the Git tag.
4) Once the images have been published, update the default
`arg_protonsdk_image` version number in `configure.sh` to use the
newly built images by default.
Any change or addition to GPL-ed source first requires to update or add
the corresponding source to <https://repo.steampowered.com/proton-sdk>.
The `SOURCES_URLBASE` variable must be used to download the sources
from there, and its sha256 must be added to validate the sources in the
same way the existing code does.
Technical details
-----------------
The images are built incrementally, with intermediate images created
for each component of the toolchain, then assembled together in a single
`proton` image.
The reason behind this is to optimize the use of docker cache, so that
components that didn't change do not require to be rebuilt every time,
saving a lot of time in the build process, when only small additions are
made.
It also lets us build several components of the toolchain separately,
in parallel. This is especially the case when building the images on
the <https://gitlab.steamos.cloud> CI.
Because the `ARG` parameter in Dockerfile doesn't behave nicely with
docker caches it is avoided, and `Dockerfile.in` are used with variable
replacements done using `sed`.
The <https://gitlab.steamos.cloud> CI uses Kaniko instead of Docker,
with a bit of script conversion to generate commands usable there. More
details are available in
[Proton SDK](https://gitlab.steamos.cloud/proton/sniper/sdk).
The `build-base` images are there to create a common ground to build the
other elements of the toolchain. They are based on fairly recent (more
than what `steamrt` provides), but they are only used temporarily to
build a static version of the Binutils, MinGW and GCC binaries, which
are then copied over the `steamrt` base image.

View file

@ -1,32 +0,0 @@
FROM @PROTONSDK_URLBASE@/build-base-@ARCH@:latest AS build
RUN wget -q @BINUTILS_URLBASE@/@BINUTILS_SOURCE@ \
&& echo '@BINUTILS_SHA256@ @BINUTILS_SOURCE@' | sha256sum -c - \
&& tar xf @BINUTILS_SOURCE@ -C /tmp && rm @BINUTILS_SOURCE@ \
&& cd /tmp/binutils-@BINUTILS_VERSION@ \
&& ./configure --quiet \
--prefix=/usr \
--libdir=/usr/lib \
--host=@ARCH@-linux-gnu \
--build=@ARCH@-linux-gnu \
--target=@ARCH@-@TARGET@ \
--program-prefix=@ARCH@-@TARGET@- \
--enable-gold \
--enable-ld=default \
--enable-lto \
--enable-static \
--disable-multilib \
--disable-nls \
--disable-plugins \
--disable-shared \
--disable-werror \
--with-gmp \
--with-isl \
--with-mpc \
--with-mpfr \
--with-system-zlib \
MAKEINFO=true \
&& make --quiet -j@J@ MAKEINFO=true configure-host \
&& make --quiet -j@J@ MAKEINFO=true LDFLAGS="-static" \
&& make --quiet -j@J@ MAKEINFO=true install-strip DESTDIR=/opt \
&& rm -rf /opt/usr/share/doc /opt/usr/share/info /opt/usr/share/man \
&& rm -rf /tmp/binutils-@BINUTILS_VERSION@

View file

@ -1,17 +0,0 @@
FROM @BASE_IMAGE@ AS base
RUN apt-get update && apt-get install -y \
autoconf \
bzip2 \
g++ \
gcc \
libgmp-dev \
libisl-dev \
libmpc-dev \
libmpfr-dev \
libtool \
libz-dev \
make \
wget \
xz-utils \
&& rm -rf /opt/usr/share/doc /opt/usr/share/info /opt/usr/share/man \
&& rm -rf /var/lib/apt/lists/*

File diff suppressed because it is too large Load diff

View file

@ -1,48 +0,0 @@
FROM @PROTONSDK_URLBASE@/binutils-@ARCH@-@TARGET@:@BINUTILS_VERSION@ AS binutils
FROM @PROTONSDK_URLBASE@/mingw-headers-@ARCH@:@MINGW_VERSION@ AS mingw-headers
FROM @PROTONSDK_URLBASE@/mingw-crt-@ARCH@:@MINGW_VERSION@ AS mingw-crt
FROM @PROTONSDK_URLBASE@/mingw-pthreads-@ARCH@:@MINGW_VERSION@ AS mingw-pthreads
FROM @PROTONSDK_URLBASE@/build-base-@ARCH@:latest AS build
COPY --from=binutils /opt/usr /usr
COPY --from=mingw-headers /opt/usr /usr
COPY --from=mingw-crt /opt/usr /usr
COPY --from=mingw-pthreads /opt/usr /usr
RUN wget -q @GCC_URLBASE@/@GCC_SOURCE@ \
&& echo '@GCC_SHA256@ @GCC_SOURCE@' | sha256sum -c - \
&& tar xf @GCC_SOURCE@ -C /tmp && rm @GCC_SOURCE@ \
&& mkdir /tmp/gcc-@GCC_VERSION@/build && cd /tmp/gcc-@GCC_VERSION@/build \
&& ../configure --quiet \
--prefix=/usr \
--libdir=/usr/lib \
--libexecdir=/usr/lib \
--host=@ARCH@-linux-gnu \
--build=@ARCH@-linux-gnu \
--target=@ARCH@-@TARGET@ \
--program-prefix=@ARCH@-@TARGET@- \
--enable-languages=c,c++,lto \
--enable-libstdcxx-time=yes \
--enable-lto \
--enable-threads=posix \
--disable-bootstrap \
--disable-checking \
--disable-multilib \
--disable-nls \
--disable-plugin \
@TARGET_FLAGS@ \
--disable-sjlj-exceptions \
--disable-werror \
--with-arch=nocona \
--with-default-libstdcxx-abi=new \
--with-dwarf2 \
--with-system-gmp \
--with-system-isl \
--with-system-mpc \
--with-system-mpfr \
--with-system-zlib \
--with-tune=core-avx2 \
@ARCH_FLAGS@ \
MAKEINFO=true \
&& make --quiet -j@J@ MAKEINFO=true CFLAGS="-static --static" LDFLAGS="-s -static --static" \
&& make --quiet -j@J@ MAKEINFO=true CFLAGS="-static --static" LDFLAGS="-s -static --static" install-strip DESTDIR=/opt \
&& rm -rf /opt/usr/share/doc /opt/usr/share/info /opt/usr/share/man \
&& rm -rf /tmp/gcc-@GCC_VERSION@

View file

@ -1,21 +0,0 @@
FROM @PROTONSDK_URLBASE@/binutils-@ARCH@-w64-mingw32:@BINUTILS_VERSION@ AS binutils
FROM @PROTONSDK_URLBASE@/mingw-headers-@ARCH@:@MINGW_VERSION@ AS mingw-headers
FROM @PROTONSDK_URLBASE@/mingw-gcc-@ARCH@:@MINGW_VERSION@ AS mingw-gcc
FROM @PROTONSDK_URLBASE@/build-base-@ARCH@:latest AS build
COPY --from=binutils /opt/usr /usr
COPY --from=mingw-headers /opt/usr /usr
COPY --from=mingw-gcc /opt/usr /usr
RUN wget -q @MINGW_URLBASE@/@MINGW_SOURCE@ \
&& echo '@MINGW_SHA256@ @MINGW_SOURCE@' | sha256sum -c - \
&& tar xf @MINGW_SOURCE@ -C /tmp && rm @MINGW_SOURCE@ \
&& cd /tmp/mingw-w64-v@MINGW_VERSION@/mingw-w64-crt \
&& ./configure --quiet \
--prefix=/usr/@ARCH@-w64-mingw32/ \
--host=@ARCH@-w64-mingw32 \
--enable-wildcard \
@ARCH_FLAGS@ \
MAKEINFO=true \
&& make --quiet -j@J@ MAKEINFO=true \
&& make --quiet -j@J@ MAKEINFO=true install-strip DESTDIR=/opt \
&& rm -rf /opt/usr/share/doc /opt/usr/share/info /opt/usr/share/man \
&& rm -rf /tmp/mingw-w64-v@MINGW_VERSION@

View file

@ -1,35 +0,0 @@
FROM @PROTONSDK_URLBASE@/binutils-@ARCH@-w64-mingw32:@BINUTILS_VERSION@ AS binutils
FROM @PROTONSDK_URLBASE@/mingw-headers-@ARCH@:@MINGW_VERSION@ AS mingw-headers
FROM @PROTONSDK_URLBASE@/build-base-@ARCH@:latest AS build
COPY --from=binutils /opt/usr /usr
COPY --from=mingw-headers /opt/usr /usr
RUN wget -q @GCC_URLBASE@/@GCC_SOURCE@ \
&& echo '@GCC_SHA256@ @GCC_SOURCE@' | sha256sum -c - \
&& tar xf @GCC_SOURCE@ -C /tmp && rm @GCC_SOURCE@ \
&& mkdir /tmp/gcc-@GCC_VERSION@/build && cd /tmp/gcc-@GCC_VERSION@/build \
&& ../configure --quiet \
--prefix=/usr \
--libdir=/usr/lib \
--libexecdir=/usr/lib \
--host=@ARCH@-linux-gnu \
--build=@ARCH@-linux-gnu \
--target=@ARCH@-w64-mingw32 \
--program-prefix=@ARCH@-w64-mingw32- \
--enable-languages=c \
--disable-bootstrap \
--disable-checking \
--disable-multilib \
--disable-nls \
--disable-shared \
--disable-threads \
--disable-werror \
--with-system-gmp \
--with-system-isl \
--with-system-mpc \
--with-system-mpfr \
--with-system-zlib \
MAKEINFO=true \
&& make --quiet -j@J@ MAKEINFO=true CFLAGS="-static --static" LDFLAGS="-s -static --static" all-gcc \
&& make --quiet -j@J@ MAKEINFO=true CFLAGS="-static --static" LDFLAGS="-s -static --static" install-strip-gcc DESTDIR=/opt \
&& rm -rf /opt/usr/share/doc /opt/usr/share/info /opt/usr/share/man \
&& rm -rf /tmp/gcc-@GCC_VERSION@

View file

@ -1,16 +0,0 @@
FROM @PROTONSDK_URLBASE@/build-base-@ARCH@:latest AS build
RUN wget -q @MINGW_URLBASE@/@MINGW_SOURCE@ \
&& echo '@MINGW_SHA256@ @MINGW_SOURCE@' | sha256sum -c - \
&& tar xf @MINGW_SOURCE@ -C /tmp && rm @MINGW_SOURCE@ \
&& cd /tmp/mingw-w64-v@MINGW_VERSION@/mingw-w64-headers \
&& ./configure --quiet \
--prefix=/usr/@ARCH@-w64-mingw32/ \
--host=@ARCH@-w64-mingw32 \
--enable-sdk=all \
--enable-secure-api \
--enable-idl \
MAKEINFO=true \
&& make --quiet -j@J@ MAKEINFO=true \
&& make --quiet -j@J@ MAKEINFO=true install-strip DESTDIR=/opt \
&& rm -rf /opt/usr/share/doc /opt/usr/share/info /opt/usr/share/man \
&& rm -rf /tmp/mingw-w64-v@MINGW_VERSION@

View file

@ -1,23 +0,0 @@
FROM @PROTONSDK_URLBASE@/binutils-@ARCH@-w64-mingw32:@BINUTILS_VERSION@ AS binutils
FROM @PROTONSDK_URLBASE@/mingw-headers-@ARCH@:@MINGW_VERSION@ AS mingw-headers
FROM @PROTONSDK_URLBASE@/mingw-gcc-@ARCH@:@MINGW_VERSION@ AS mingw-gcc
FROM @PROTONSDK_URLBASE@/mingw-crt-@ARCH@:@MINGW_VERSION@ AS mingw-crt
FROM @PROTONSDK_URLBASE@/build-base-@ARCH@:latest AS build
COPY --from=binutils /opt/usr /usr
COPY --from=mingw-headers /opt/usr /usr
COPY --from=mingw-gcc /opt/usr /usr
COPY --from=mingw-crt /opt/usr /usr
RUN wget -q @MINGW_URLBASE@/@MINGW_SOURCE@ \
&& echo '@MINGW_SHA256@ @MINGW_SOURCE@' | sha256sum -c - \
&& tar xf @MINGW_SOURCE@ -C /tmp && rm @MINGW_SOURCE@ \
&& cd /tmp/mingw-w64-v@MINGW_VERSION@/mingw-w64-libraries/winpthreads \
&& ./configure --quiet \
--prefix=/usr/@ARCH@-w64-mingw32/ \
--host=@ARCH@-w64-mingw32 \
--disable-shared \
@ARCH_FLAGS@ \
MAKEINFO=true \
&& make --quiet -j@J@ MAKEINFO=true \
&& make --quiet -j@J@ MAKEINFO=true install-strip DESTDIR=/opt \
&& rm -rf /opt/usr/share/doc /opt/usr/share/info /opt/usr/share/man \
&& rm -rf /tmp/mingw-w64-v@MINGW_VERSION@

View file

@ -1,16 +0,0 @@
FROM @PROTONSDK_URLBASE@/build-base-@ARCH@:latest AS build
RUN wget -q @MINGW_URLBASE@/@MINGW_SOURCE@ \
&& echo '@MINGW_SHA256@ @MINGW_SOURCE@' | sha256sum -c - \
&& tar xf @MINGW_SOURCE@ -C /tmp && rm @MINGW_SOURCE@ \
&& cd /tmp/mingw-w64-v@MINGW_VERSION@/mingw-w64-tools/widl \
&& ./configure --quiet \
--prefix=/usr \
--host=@ARCH@-linux-gnu \
--build=@ARCH@-linux-gnu \
--target=@ARCH@-w64-mingw32 \
--program-prefix=@ARCH@-w64-mingw32- \
MAKEINFO=true \
&& make --quiet -j@J@ MAKEINFO=true LDFLAGS="-static" \
&& make --quiet -j@J@ MAKEINFO=true install-strip DESTDIR=/opt \
&& rm -rf /opt/usr/share/doc /opt/usr/share/info /opt/usr/share/man \
&& rm -rf /tmp/mingw-w64-v@MINGW_VERSION@

View file

@ -1,91 +0,0 @@
FROM @PROTONSDK_URLBASE@/binutils-i686-linux-gnu:@BINUTILS_VERSION@ AS binutils-linux-i686
FROM @PROTONSDK_URLBASE@/binutils-x86_64-linux-gnu:@BINUTILS_VERSION@ AS binutils-linux-x86_64
FROM @PROTONSDK_URLBASE@/binutils-i686-w64-mingw32:@BINUTILS_VERSION@ AS binutils-mingw-i686
FROM @PROTONSDK_URLBASE@/binutils-x86_64-w64-mingw32:@BINUTILS_VERSION@ AS binutils-mingw-x86_64
FROM @PROTONSDK_URLBASE@/mingw-headers-i686:@MINGW_VERSION@ AS mingw-headers-i686
FROM @PROTONSDK_URLBASE@/mingw-headers-x86_64:@MINGW_VERSION@ AS mingw-headers-x86_64
FROM @PROTONSDK_URLBASE@/mingw-crt-i686:@MINGW_VERSION@ AS mingw-crt-i686
FROM @PROTONSDK_URLBASE@/mingw-crt-x86_64:@MINGW_VERSION@ AS mingw-crt-x86_64
FROM @PROTONSDK_URLBASE@/mingw-pthreads-i686:@MINGW_VERSION@ AS mingw-pthreads-i686
FROM @PROTONSDK_URLBASE@/mingw-pthreads-x86_64:@MINGW_VERSION@ AS mingw-pthreads-x86_64
FROM @PROTONSDK_URLBASE@/mingw-widl-i686:@MINGW_VERSION@ AS mingw-widl-i686
FROM @PROTONSDK_URLBASE@/mingw-widl-x86_64:@MINGW_VERSION@ AS mingw-widl-x86_64
FROM @PROTONSDK_URLBASE@/gcc-i686-linux-gnu:@GCC_VERSION@ AS gcc-linux-i686
FROM @PROTONSDK_URLBASE@/gcc-x86_64-linux-gnu:@GCC_VERSION@ AS gcc-linux-x86_64
FROM @PROTONSDK_URLBASE@/gcc-i686-w64-mingw32:@GCC_VERSION@ AS gcc-mingw-i686
FROM @PROTONSDK_URLBASE@/gcc-x86_64-w64-mingw32:@GCC_VERSION@ AS gcc-mingw-x86_64
FROM @BASE_IMAGE@ AS base
COPY --from=binutils-linux-i686 /opt/usr /usr
COPY --from=binutils-linux-x86_64 /opt/usr /usr
COPY --from=binutils-mingw-i686 /opt/usr /usr
COPY --from=binutils-mingw-x86_64 /opt/usr /usr
COPY --from=mingw-headers-i686 /opt/usr /usr
COPY --from=mingw-headers-x86_64 /opt/usr /usr
COPY --from=mingw-crt-i686 /opt/usr /usr
COPY --from=mingw-crt-x86_64 /opt/usr /usr
COPY --from=mingw-pthreads-i686 /opt/usr /usr
COPY --from=mingw-pthreads-x86_64 /opt/usr /usr
COPY --from=mingw-widl-i686 /opt/usr /usr
COPY --from=mingw-widl-x86_64 /opt/usr /usr
COPY --from=gcc-linux-i686 /opt/usr /usr
COPY --from=gcc-linux-x86_64 /opt/usr /usr
COPY --from=gcc-mingw-i686 /opt/usr /usr
COPY --from=gcc-mingw-x86_64 /opt/usr /usr
RUN wget -q @RUST_URLBASE@/@RUST_SOURCE_x86_64@ \
&& echo '@RUST_SHA256_x86_64@ @RUST_SOURCE_x86_64@' | sha256sum -c - \
&& tar xf @RUST_SOURCE_x86_64@ -C /tmp && rm @RUST_SOURCE_x86_64@ \
&& /tmp/rust-@RUST_VERSION@-x86_64-unknown-linux-gnu/install.sh --prefix=/opt/rust \
&& rm -rf /tmp/rust-@RUST_VERSION@-x86_64-unknown-linux-gnu
RUN wget -q @RUST_URLBASE@/@RUST_SOURCE_i686@ \
&& echo '@RUST_SHA256_i686@ @RUST_SOURCE_i686@' | sha256sum -c - \
&& tar xf @RUST_SOURCE_i686@ -C /tmp && rm @RUST_SOURCE_i686@ \
&& /tmp/rust-@RUST_VERSION@-i686-unknown-linux-gnu/install.sh --prefix=/opt/rust \
--components=rust-std-i686-unknown-linux-gnu \
&& rm -rf /tmp/rust-@RUST_VERSION@-i686-unknown-linux-gnu
RUN bash -c 'ls /opt/rust/bin/* | xargs -n1 -I{} ln -sf {} /usr/bin/'
RUN bash -c 'mkdir -p /usr/lib/ccache && ls /usr/bin/{,*-}{cc,c++,gcc,g++}{,-[0-9]*} | sed -re s:/bin:/lib/ccache: | xargs -n1 ln -sf ../../bin/ccache'
ENV PATH=/usr/lib/ccache:$PATH
RUN apt-get install -y \
autoconf-archive \
fontforge \
fonttools \
libxpresent-dev \
libxpresent-dev:i386 \
libopenblas-dev \
libopenblas-dev:i386 \
python3-mako \
python3-pefile \
libcapstone-dev \
libcapstone-dev:i386 \
libutfcpp-dev \
yasm \
nasm \
&& rm -rf /opt/usr/share/doc /opt/usr/share/info /opt/usr/share/man \
&& rm -rf /var/lib/apt/lists/*
COPY ninja-jobserver-client.patch /tmp
RUN wget -q @NINJA_URLBASE@/@NINJA_SOURCE@ \
&& echo '@NINJA_SHA256@ @NINJA_SOURCE@' \
&& echo '@NINJA_SHA256@ @NINJA_SOURCE@' | sha256sum -c - \
&& tar xf @NINJA_SOURCE@ -C /tmp && rm @NINJA_SOURCE@ \
&& cd /tmp/ninja-@NINJA_VERSION@ \
&& patch -p1 < /tmp/ninja-jobserver-client.patch \
&& mkdir build \
&& cd build \
&& cmake .. \
&& make \
&& cp ninja $(which ninja) \
&& cd / \
&& rm -rf /tmp/ninja-@NINJA_VERSION@ \
&& rm -rf /tmp/ninja-jobserver-client.patch
ENTRYPOINT ["/usr/bin/tini-static", "-s", "-g", "--"]
CMD ["/bin/bash"]

View file

@ -1,115 +0,0 @@
---
How controllers work in Proton
---
There are five methods that Windows games can use to access controllers:
dinput, xinput, winmm, hid, and rawinput. Games can use any combination of all
of these APIs.
rawinput allows direct access to the gamepad hardware. The application must
know the HID protocol, and/or know the device-specific protocol for
non-standard devices like Xbox controllers.
hid is a layer above rawinput, where Windows will talk HID to the controller on
the game's behalf. This turns the raw HID protocol data into usable things like
buttons and joysticks.
dinput is a "legacy" API that allows applications to talk to any type of
joystick. On Windows, it is implemented on top of HID. Notably, dinput allows
easy access to controllers that no other API does, so it is still used by
modern games despite being "legacy."
xinput is the new API that supports only Xbox controllers. On Windows, it is
likely implemented on top of rawinput, as Xbox controllers do not behave like
standard HID devices.
winmm is the very legacy API, for when joysticks were hooked up through the
soundcard. On modern Windows, it is implemented on top of dinput.
Here is a diagram for how these APIs are mapped down to the system by Proton:
----------
| game.exe |
----------
/ | | | \
/ | | | \ application
*********/****|*|**|****\******************
| | | \ \ wine
| | | | \
------ | | ----- \
|xinput| | | |winmm| |
------ | | ----- |
| | \ | |
| | | | |
\ | ------ |
\ | |dinput| |
\ | ------ /
| | / /
| | | /
--- /
|hid| /
--- /
| /
| |
--------
|rawinput|
--------
|
-----------
|winebus.sys|
-----------
| | wine
************|******|***********************
| | linux
| ----
| |SDL2|
| ----
| | \
| | \
| | |
------ -----------
|hidraw| |input event|
------ -----------
| |
\ /
========
|hardware|
========
Some things to note:
SDL2 provides the controller mapping feature of the Steam client. If you don't
go through SDL2, then you don't get that mapping feature. Also notice that
winebus.sys must turn SDL2 events into usable winebus data (HID protocol). We
also allow direct access to hidraw devices so games which can speak HID (or
other) protocol can talk directly to those devices.
Xbox controllers do not speak real HID. Instead Windows provides a HID
compatibility layer so dinput, which is implemented on top of HID, will present
the Xbox controller to legacy games. Of course some games (Unity) have noticed
that, and talk directly to this internal HID interface, so we need to duplicate
it bit-for-bit in winebus.sys.
Some games support talking directly to certain controller types. For example,
many modern games support PlayStation 4 controllers directly and will provide
layouts and button images in-game specific to DualShock 4 controllers. For this
reason, we don't want to present every controller through xinput, which should
only present Xbox controllers.
However, we also want users to be able to use any controller, even if the game
only supports xinput. Steam provides a controller mapping feature, which is
presented as a virtual Steam Controller. We turn this virtual Steam Controller
into an xinput device. This means any controller which is mapped will appear to
the game as an xinput device, in addition to the other APIs. Controllers which
are not mapped will appear as the real controller, which the game may or may
not support.
One final snag is that many distros do not allow user access to hidraw devices.
Steam ships some udev rules to allow this for certain common controller types,
but not most. In other words, your user may not have access to the hidraw
device for your controller, especially if it is a less well-known controller.
In those cases, we access it through SDL2 via its linux js backend and try to
treat it as an Xbox controller, even if it is not mapped with the Steam client
mapping feature.

View file

@ -1,186 +0,0 @@
Proton Debugging Tips
=====================
For loading dev builds of games onto a Steam Deck see
<https://partner.steamgames.com/doc/steamdeck/loadgames>
Debug Proton Builds
-------------------
See [README.md#debugging](../README.md#debugging).
Attaching A Debugger
--------------------
Running GDB and attaching to a running .exe works out of the box:
```
$ ps | grep Game
2263566 ? tsl 0:09 Z:\home\ivyl\.local\share\Steam\steamapps\common\Game\Game.exe
$ gdb
GNU gdb (GDB) 14.1
...
(gdb) attach 2263566
Attaching to process 2263566
[New LWP 2263569]
...
0x000075dce0cd788d in ?? ()
```
With Proton Experimental (and >= 9.0-2), GDB should be able to load the symbols right
away. However, for the most seamless experience you will want to use a
custom version of GDB with a couple of patches to better integrate with
Wine.
You can find this fork at https://gitlab.winehq.org/rbernon/binutils-gdb,
which you can build with `configure && make all-gdb && make install-gdb`.
Make sure to have python development packages installed, as GDB python
support will be required.
With this custom GDB you can `source` [Wine's custom unwinder](https://github.com/ValveSoftware/wine/blob/experimental_9.0/tools/gdbunwind.py)
in your `~/.gdbinit`, and you will get backtraces across PE / unix boundaries.
With older Proton you can use `source` [wine's
gdbinit](https://github.com/ValveSoftware/wine/blob/proton_8.0/tools/gdbinit.py)
to make `load-symbol-files` command available that uses `/proc/$pid/maps` to
load the symbols:
```
(gdb) source ~/src/proton/wine/tools/gdbinit.py
(gdb) load-symbol-files
loading symbols for /home/ivyl/.local/share/Steam/steamapps/common/Proton - Experimental/files/lib64/wine/x86_64-windows/kernelbase.dll
...
(gdb) bt
#0 0x000075dce0cd788d in ?? ()
#1 0x000075dcdf26e842 in futex_wait (timeout=0x0, val=0, addr=0x75dcdd8383e0) at ../src-wine/dlls/ntdll/unix/sync.c:127
#2 NtWaitForAlertByThreadId (address=<optimized out>, timeout=0x0) at ../src-wine/dlls/ntdll/unix/sync.c:2658
#3 <signal handler called>
#4 0x000000017000ebb4 in NtWaitForAlertByThreadId ()
#5 0x00000001700367f9 in RtlWaitOnAddress (addr=addr@entry=0x4850970, cmp=0x3d12fa9c, cmp@entry=0x3d12fabc, size=size@entry=4, timeout=timeout@entry=0x0) at ../src-wine/dlls/ntdll/sync.c:941
#6 0x000000017003276a in RtlSleepConditionVariableSRW (variable=0x4850970, lock=0x4850908, timeout=0x0, flags=<optimized out>) at ../src-wine/dlls/ntdll/sync.c:837
#7 0x000000007b061e41 in SleepConditionVariableSRW (variable=<optimized out>, lock=<optimized out>, timeout=<optimized out>, flags=<optimized out>) at ../src-wine/dlls/kernelbase/sync.c:1064
#8 0x000000035915c892 in dxvk::condition_variable::wait (lock=..., this=0x4850970) at ../src-dxvk/src/dxvk/../util/log/../thread.h:251
#9 dxvk::condition_variable::wait<dxvk::DxvkPipelineWorkers::runWorker(dxvk::DxvkPipelinePriority)::<lambda()> > (pred=..., lock=..., this=0x4850970) at ../src-dxvk/src/dxvk/../util/log/../thread.h:257
#10 dxvk::DxvkPipelineWorkers::runWorker (this=0x48508f0, maxPriority=dxvk::DxvkPipelinePriority::Normal) at ../src-dxvk/src/dxvk/dxvk_pipemanager.cpp:140
#11 0x00000003591a7781 in std::function<void ()>::operator()() const (this=0x4852ee0) at /usr/x86_64-w64-mingw32/include/c++/10.3.0/bits/std_function.h:622
#12 dxvk::thread::threadProc (arg=0x4852ed0, arg@entry=<error reading variable: value has been optimized out>) at ../src-dxvk/src/util/thread.cpp:68
#13 0x000000007b6146ed in BaseThreadInitThunk (unknown=<optimized out>, entry=<optimized out>, arg=<optimized out>) at ../src-wine/dlls/kernel32/thread.c:61
#14 0x000000017000f1a7 in RtlUserThreadStart ()
#15 0x0000000000000000 in ?? ()
```
Attaching Before The Program Starts
-----------------------------------
Launch the software with `PROTON_WAIT_ATTACH=1 %command%` set as the launch
command in game's properties. Our `steam.exe` shim will then wait for debugger
and only then exec the proper executable.
Make sure that you follow child processes:
```
set follow-fork-mode child
```
Getting Shell Inside Of The Steam Runtime
------------------------------------------
Set your launch options to: `PROTON_LOG=1 STEAM_COMPAT_LAUNCHER_SERVICE=proton
%command%`
Then in `steam-$GAMEID.log` you should see the following:
```
Starting program with command-launcher service.
To run commands in the per-app container, use a command like:
/home/ivyl/.local/share/Steam/steamapps/common/SteamLinuxRuntime_sniper/pressure-vessel/bin/steam-runtime-launch-client \
--bus-name=:1.307 \
--directory='' \
-- \
bash
```
After invoking it you end up in a shell with the environment variables,
including `WINEPREFIX` are set and you can invoke `wine` directly, e.g.:
```
[ivyl@crabcraft x64]$ wine winedbg
Wine-dbg> info process
pid threads executable (all id:s are in hex)
0000028c 1 'start.exe'
0000029c 1 \_ 'winedbg.exe'
=000002a4 1 \_ 'winedbg.exe'
00000294 2 \_ 'conhost.exe'
00000030 10 'services.exe'
000000e4 6 \_ 'rpcss.exe'
000000b0 3 \_ 'svchost.exe'
00000094 6 \_ 'plugplay.exe'
00000064 9 \_ 'winedevice.exe'
0000003c 8 \_ 'winedevice.exe'
00000020 3 'steam.exe'
00000128 62 \_ 'Game.exe'
000000d0 3 \_ 'explorer.exe'
0000010c 3 \_ 'tabtip.exe'
```
**NOTE:** If you need a predictable bus name instead of the unique connection
name (the `:1.307` from example above) you can use `com.steampowered.App1234567`
where 1234567 is the Steam App ID for the title you are debugging.
You can always use a tool like `qdbus` to list available bus names.
Starting A Different Binary
---------------------------
If you want to start a different binary than the game's default you can use a
few methods. All of the examples below will use `winecfg`.
### Substitution
You can use the following launch option:
```
echo "%command%" | sed 's/proton waitforexitandrun .*/proton waitforexitandrun winecfg/' | sh
```
The full substitution of `proton waitforexitandrun .*` is necessary as the
original `%command%` is very long and may contain multiple mentions of `proton`
or the original binary.
### Pressure-Vessel Shell
[Pressure-vessel][pv] allows to spawn an xterm instead of launching Proton. This
can be accomplished by setting `PRESSURE_VESSEL_SHELL=instead`. The easiest way
is to set the launch option to:
[pv]: (https://gitlab.steamos.cloud/steamrt/steam-runtime-tools/-/tree/main/pressure-vessel)
`PRESSURE_VESSEL_SHELL=instead %command%`
The original coommand is then contained in `$@`, e.g.:
```
/home/ivyl/.local/share/Steam/steamapps/common/SteamLinuxRuntime_sniper/pressure-vessel/bin/steam-runtime-launcher-interface-0 container-runtime /home/ivyl/.local/share/Steam/steamapps/common/Proton - Experimental/proton waitforexitandrun /home/ivyl/.local/share/Steam/steamapps/common/Game/Game.exe
```
From this point you can invoke `proton` script as all the required environment
variables are set. If you are copying the path from `$@` make sure to escape or
quote parts that contain spaces.
To start `winecfg` something like this can be entered:
```
"/home/ivyl/.local/share/Steam/steamapps/common/Proton - Experimental/proton" waitforexitandrun winecfg
```

View file

@ -1,26 +0,0 @@
# ICMP ECHO requests (ping)
Some games rely on ICMP ECHO requests to detect network connectivity,
or to measure connection ping.
Proton supports sending ICMP ECHO requests using RAW sockets or DGRAM
ICMP sockets, but the former requires elevated privileges, and the
latter may also be disabled by default.
DGRAM ICMP sockets can be enabled for a given set of user groups by
running the following command, and will stay enabled until next reboot:
```
sudo sysctl -w net.ipv4.ping_group_range="<low> <high>"
```
Where <low> (resp <high>) is lower bound (resp higher) of the user
groups which will be allowed to create such sockets. It is possible to
enable them for any group by using "0 4294967295".
In order for the configuration to be persistent, it is possible to add
the following line to `/etc/sysctl.conf` (or a file in `/etc/sysctl.d`):
```
net.ipv4.ping_group_range="<low> <high>"
```

View file

@ -1,146 +0,0 @@
---
How to make Proton work with PRIME
---
# Setup
## Context
PRIME is a technology that allows one GPU to perform graphics rendering and
another GPU to display the result on the screen.
This document assumes that PRIME / GPU offloading is configured and working
for native software and will touch only on things specific to Proton.
If you need help with configuring PRIME in the first place you may find the
following resources useful:
* https://wiki.archlinux.org/index.php/PRIME
* https://wiki.debian.org/NVIDIA%20Optimus
## DirectX 9, 10, 11 and 12 (DXVK and VKD3D-Proton)
The implementations of those graphics APIs are built on top of Vulkan and
**most of the games should work out of the box.** Discrete GPUs are
prioritized (i.e. enumerated first) and games should default to them.
If you have multiple discrete GPUs or the wrong GPU is selected as the
default one and the game doesn't have the means of selecting an adapter you
can limit what gets enumerated.
In Steam, set your game's Properties -> GENERAL -> LAUNCH OPTIONS to:
DXVK_FILTER_DEVICE_NAME="GTX 1650" %command%
This should work for GeForce GTX 1650. A different name may be required for
your particular graphics card (e.g. "VEGA10" for Vega 56/64). You can use
`vulkaninfo` program (usually packaged as `vulkan-tools`) to check the names
of your GPUs.
## DirectX 8 and OpenGL
Those APIs are implemented on top of OpenGL and require a bit more
configuration.
The two most common PRIME scenarios are covered, but the content should be
enough to troubleshoot and make any other configuration work.
### AMD -> Integrated Intel (Mesa -> Mesa)
In Steam, set your game's Properties -> GENERAL -> LAUNCH OPTIONS to:
DRI_PRIME=1 %command%
### Nvidia -> Integrated Intel (Nvidia's Proprietary Driver -> Mesa)
In Steam set your game's Properties -> GENERAL -> LAUNCH OPTIONS to:
__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia %command%
## Vulkan
In case Vulkan games don't allow you to select a GPU or you experience
problems with graphics APIs implemented on top of Vulkan you can limit or
alter the GPU selection.
### AMD -> Integrated Intel (Mesa -> Mesa)
In Steam, set your game's Properties -> GENERAL -> LAUNCH OPTIONS to:
DRI_PRIME=1 %command%
This will cause the devices to change order, i.e. the first GPU will swap
places with another one.
You can also limit the selection using Mesa's DEVICE_SELECT Vulkan layer. To
list the GPUs:
$ MESA_VK_DEVICE_SELECT=list vulkaninfo
selectable devices:
GPU 0: 1002:67df "AMD RADV POLARIS10 (ACO)" discrete GPU 0000:01:00.0
GPU 1: 8086:412 "Intel(R) HD Graphics 4600 (HSW GT2)" integrated GPU 0000:00:02.0
Then set the launch options using one of the vendor and product ids, e.g.:
DRI_PRIME=1 MESA_VK_DEVICE_SELECT=1002:67df $command%
### Nvidia -> Integrated Intel (Nvidia's Proprietary Driver -> Mesa)
In Steam set your game's Properties -> GENERAL -> LAUNCH OPTIONS to:
__NV_PRIME_RENDER_OFFLOAD=1 __VK_LAYER_NV_optimus=NVIDIA_only %command%
This will load the Optimus Vulkan layer and use it to limit the GPU selection
to NVIDIA only. Using `non_NVIDIA_only` will do the opposite.
# Troubleshooting
## Performance
Having vsync enabled in-game is known to cause problems in PRIME
configurations. If you experience poor framerates / freezes try disabling
vsync.
## Device selection
To make sure that all libraries have selected the correct GPU you can check
the logs.
In the game's properties set the following 'LAUNCH OPTIONS':
PROTON_LOG=1 WINEDEBUG=+d3d VKD3D_DEBUG=trace
After running the game, you should find a file named `steam-$APPID.log` in your
Home directory.
For wined3d/DXGI, look for:
```
trace:d3d:wined3d_adapter_init_gl_caps GL_RENDERER: "Radeon RX 580 Series (POLARIS10, DRM 3.40.0, 5.10.9-zen1-1-zen, LLVM 11.0.1)".
```
For DXVK, look for:
```
info: DXVK: v1.7.3-36-g85c70ad5
...
info: AMD RADV POLARIS10 (ACO):
info: Driver: 20.3.3
info: Vulkan: 1.2.145
```
For VKD3D-Proton, look for:
```
trace:vkd3d_trace_physical_device_properties: Device name: AMD RADV POLARIS10 (ACO).
trace:vkd3d_trace_physical_device_properties: Vendor ID: 0x1002, Device ID: 0x67df.
```
Refer to the main README and each project's own documentation for more details
on logging. Extra logging can destroy game performance. Make sure that you
clear your 'LAUNCH OPTIONS' after troubleshooting.

View file

@ -1,57 +0,0 @@
---
Rebasing Proton onto new upstream releases
---
We maintain a lot of patches on top of upstream releases. When cherry-picking
stuff from upstream into Proton, *always* use the `-x` parameter so the
original commit ID is retained in the log message. Contrarily, *never* use `-x`
when picking things that are not upstreamed. This lets us use the cherry-picked
log message as an indicator of which commits can be dropped during a rebase
because they were already upstreamed.
Here's a command which will generate the list of commits that were applied on
top of wine-4.2, which were not backported from upstream Wine:
wine$ git log --pretty=oneline --reverse --grep='cherry pick' --invert-grep wine-4.2..proton_4.2
You can then pick that list (*without* `-x`!) onto a new Wine release tag,
resolving conflicts and such as you go.
Here's a somewhat clumsy script that I think is easier to work with than git's
built-in tools:
#!/bin/bash
# Cherry-picks commits from an input file in --pretty=oneline format.
# Lines that begin with '#' are ignored.
# Aborts when a cherry-pick fails.
# Outputs the same input file on stderr, but with '#' prefixed to lines that were successfully cherry-picked.
#Usage:
# $ pick_commits to_pick 2> ~/to_pick2
# On pick failure, fix conflicts and use "git cherry-pick --continue", or
# otherwise fix up the repo as desired.
# Edit ~/to_pick2 to comment-out the commit that you fixed.
# Continue using the new file:
# $ pick_commits to_pick2 2> ~/to_pick
# Repeat, alternating between to_pick and to_pick2.
broken=0
while read -r l; do
f=$(echo -n "$l" | cut '-d ' -f1 -)
if [ $broken == 0 -a ${f:0:1} != '#' ]; then
echo "Picking $l"
git cherry-pick $f 2>&1
if [ $? -ne 0 ]; then
echo $l 1>&2
broken=1
else
echo '#'$l 1>&2
fi
else
echo $l 1>&2
fi
done < "$1"
Once your Wine rebase is done, update the prefix version in the proton Python
script, resetting the minor version back to 1.

View file

@ -1,20 +0,0 @@
# Thread priorities
Proton supports fine-grained thread priority control using `setpriority(2)` to
set thread niceness values corresponding to the game threads' Windows base
priority levels. However, most default Linux configurations don't allow
individual threads to raise their priority, so some system configuration is
likely required.
It can be configured as a privileged user by editing the
`/etc/security/limits.conf` file, or using the `/etc/security/limits.d/` conf
directory, and adding the following line at the end:
```
* hard nice -15
```
Where -15 could be any value between [-20,0] that will correspond to the
minimum niceness (the highest priority) a thread can get to. The lower the
value, the more CPU time a high priority thread will get, at the expense of
others and other processes, possibly making the system less responsive.

2
dxvk

@ -1 +1 @@
Subproject commit d0ea5a4a87c9b4ee8a7d700c5f55baf26054bd6a
Subproject commit 873deed4a31c884f1d54420f0b42a2c0d3dc4be0

@ -1 +0,0 @@
Subproject commit bd542144518dce62b39f131b20093c295e21b7e1

BIN
dxvk.win32/d3d11.dll Executable file

Binary file not shown.

BIN
dxvk.win32/dxgi.dll Executable file

Binary file not shown.

BIN
dxvk.win64/d3d11.dll Executable file

Binary file not shown.

BIN
dxvk.win64/dxgi.dll Executable file

Binary file not shown.

1
ffmpeg

@ -1 +0,0 @@
Subproject commit a77521cd5d27e955b16e8097eecefc779ffdcb6d

View file

@ -1,3 +1,5 @@
#!/usr/bin/env python
# This is free and unencumbered software released into the public domain.
#
# Anyone is free to copy, modify, publish, use, compile, sell, or
@ -69,7 +71,7 @@ __all__ = [
"FileLock"
]
__version__ = "3.0.12"
__version__ = "3.0.4"
_logger = None
@ -103,29 +105,6 @@ class Timeout(TimeoutError):
# Classes
# ------------------------------------------------
# This is a helper class which is returned by :meth:`BaseFileLock.acquire`
# and wraps the lock to make sure __enter__ is not called twice when entering
# the with statement.
# If we would simply return *self*, the lock would be acquired again
# in the *__enter__* method of the BaseFileLock, but not released again
# automatically.
#
# :seealso: issue #37 (memory leak)
class _Acquire_ReturnProxy(object):
def __init__(self, lock):
self.lock = lock
return None
def __enter__(self):
return self.lock
def __exit__(self, exc_type, exc_value, traceback):
self.lock.release()
return None
class BaseFileLock(object):
"""
Implements the base class of a file lock.
@ -235,7 +214,7 @@ class BaseFileLock(object):
:arg float timeout:
The maximum time waited for the file lock.
If ``timeout < 0``, there is no timeout and this method will
If ``timeout <= 0``, there is no timeout and this method will
block until the lock could be acquired.
If ``timeout`` is None, the default :attr:`~timeout` is used.
@ -260,11 +239,12 @@ class BaseFileLock(object):
with self._thread_lock:
self._lock_counter += 1
lock_id = id(self)
lock_filename = self._lock_file
start_time = time.time()
try:
start_time = time.time()
while True:
lock_id = id(self)
lock_filename = self._lock_file
with self._thread_lock:
if not self.is_locked:
logger().debug('Attempting to acquire lock %s on %s', lock_id, lock_filename)
@ -288,7 +268,26 @@ class BaseFileLock(object):
self._lock_counter = max(0, self._lock_counter - 1)
raise
return _Acquire_ReturnProxy(lock = self)
# This class wraps the lock to make sure __enter__ is not called
# twiced when entering the with statement.
# If we would simply return *self*, the lock would be acquired again
# in the *__enter__* method of the BaseFileLock, but not released again
# automatically.
class ReturnProxy(object):
def __init__(self, lock):
self.lock = lock
return None
def __enter__(self):
return self.lock
def __exit__(self, exc_type, exc_value, traceback):
self.lock.release()
return None
return ReturnProxy(lock = self)
def release(self, force = False):
"""

@ -1 +0,0 @@
Subproject commit 4b0192046158094654e865245832c66d2104219e

View file

@ -1,94 +0,0 @@
Copyright 2018 The Noto Project Authors (github.com/googlei18n/noto-fonts)
This Font Software is licensed under the SIL Open Font License,
Version 1.1.
This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL
-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------
PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font
creation efforts of academic and linguistic communities, and to
provide a free and open framework in which fonts may be shared and
improved in partnership with others.
The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply to
any document created using the fonts or their derivatives.
DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.
"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).
"Original Version" refers to the collection of Font Software
components as distributed by the Copyright Holder(s).
"Modified Version" refers to any derivative made by adding to,
deleting, or substituting -- in part or in whole -- any of the
components of the Original Version, by changing formats or by porting
the Font Software to a new environment.
"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.
PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed,
modify, redistribute, and sell modified and unmodified copies of the
Font Software, subject to the following conditions:
1) Neither the Font Software nor any of its individual components, in
Original or Modified Versions, may be sold by itself.
2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.
3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the
corresponding Copyright Holder. This restriction only applies to the
primary font name as presented to the users.
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.
5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created using
the Font Software.
TERMINATION
This license becomes null and void if any of the above conditions are
not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -1,13 +0,0 @@
--- a/LiberationMono-Regular.sfd
+++ b/LiberationMono-Regular.sfd
@@ -3935,6 +3935,10 @@
3
1
EndShort
+TtfTable: VDMX 94
+!!!!"!!**$!<E0/!"B2J!!iQ/s8E!)!"&](!"&]4s8;p*!"8i*!"8i9s8;p,!"Ao*!"Ju<s82j-
+!"Ju+!"],?s82j/!"],,!"o8Bs8)d0!"f2-!#,DFs8)cr
+EndTtf
LangName: 1033 "" "" "Regular" "Ascender - Liberation Mono" "" "Version 2.1.5" "" "Liberation is a trademark of Red Hat, Inc. registered in U.S. Patent and Trademark Office and certain other jurisdictions." "Ascender Corporation" "Steve Matteson" "Based on Cousine, which was designed by Steve Matteson as an innovative, refreshing sans serif design that is metrically compatible with Courier New+ISIA. Cousine offers improved on-screen readability characteristics and the pan-European WGL character set and solves the needs of developers looking for width-compatible fonts to address document portability across platforms." "http://www.ascendercorp.com/" "http://www.ascendercorp.com/typedesigners.html" "Licensed under the SIL Open Font License, Version 1.1" "http://scripts.sil.org/OFL"
GaspTable: 3 8 2 17 1 65535 3 0
Encoding: UnicodeBmp

View file

@ -1,5 +0,0 @@
[SourceHanSansK-Regular]
f=3,1,0x412,\B9D1\C740 \ACE0\B515
s=3,1,0x412,Regular
f=Malgun Gothic
s=Regular

View file

@ -1,5 +0,0 @@
[SourceHanSansSC-Regular]
f=3,1,0x804,\65B0\5B8B\4F53
s=3,1,0x804,\5E38\89C4
f=NSimSun
s=Regular

View file

@ -1,5 +0,0 @@
[SourceHanSansSC-Regular]
f=3,1,0x804,\5B8B\4F53
s=3,1,0x804,\5E38\89C4
f=SimSun
s=Regular

View file

@ -1,86 +0,0 @@
--- a/UmeGothic-nametable.ttx 2021-11-14 02:41:52.823198735 +0900
+++ b/UmeGothic-nametable.ttx 2021-11-14 02:44:50.269352384 +0900
@@ -5,8 +5,12 @@
<namerecord nameID="0" platformID="1" platEncID="0" langID="0x411" unicode="True">
Author: HORAI Wataru. License: This font is a free software. Unlimited permission is granted to use, copy, and distribute it, with or without modification, either commercially and noncommercially. THIS FONT IS PROVIDED "AS IS" WITHOUT WARRANTY.
</namerecord>
+ <!--
+ NameID=1 (Family)
+ https://adobe-type-tools.github.io/font-tech-notes/pdfs/5149.OTFname_Tutorial.pdf
+ -->
<namerecord nameID="1" platformID="1" platEncID="0" langID="0x411" unicode="True">
- Ume Gothic
+ MS Gothic
</namerecord>
<namerecord nameID="2" platformID="1" platEncID="0" langID="0x411" unicode="True">
Regular
@@ -14,8 +18,12 @@
<namerecord nameID="3" platformID="1" platEncID="0" langID="0x411" unicode="True">
Ume Gothic
</namerecord>
+ <!--
+ NameID=4 (Full)
+ https://adobe-type-tools.github.io/font-tech-notes/pdfs/5149.OTFname_Tutorial.pdf
+ -->
<namerecord nameID="4" platformID="1" platEncID="0" langID="0x411" unicode="True">
- Ume Gothic
+ MS Gothic
</namerecord>
<namerecord nameID="5" platformID="1" platEncID="0" langID="0x411" unicode="True">
Look update time of this file.
@@ -29,8 +37,12 @@
<namerecord nameID="0" platformID="3" platEncID="1" langID="0x409">
Author: HORAI Wataru. License: This font is a free software. Unlimited permission is granted to use, copy, and distribute it, with or without modification, either commercially and noncommercially. THIS FONT IS PROVIDED "AS IS" WITHOUT WARRANTY.
</namerecord>
+ <!--
+ NameID=1 (Family)
+ https://adobe-type-tools.github.io/font-tech-notes/pdfs/5149.OTFname_Tutorial.pdf
+ -->
<namerecord nameID="1" platformID="3" platEncID="1" langID="0x409">
- Ume Gothic
+ MS Gothic
</namerecord>
<namerecord nameID="2" platformID="3" platEncID="1" langID="0x409">
Regular
@@ -38,8 +50,12 @@
<namerecord nameID="3" platformID="3" platEncID="1" langID="0x409">
Ume Gothic
</namerecord>
+ <!--
+ NameID=4 (Full)
+ https://adobe-type-tools.github.io/font-tech-notes/pdfs/5149.OTFname_Tutorial.pdf
+ -->
<namerecord nameID="4" platformID="3" platEncID="1" langID="0x409">
- Ume Gothic
+ MS Gothic
</namerecord>
<namerecord nameID="5" platformID="3" platEncID="1" langID="0x409">
Look update time of this file.
@@ -53,8 +69,12 @@
<namerecord nameID="0" platformID="3" platEncID="1" langID="0x411">
作者: 蓬莱和多流. ライセンス: このフォントはフリー(自由な)ソフトウエアです。あらゆる改変の有無に関わらず、また商業的な利用であっても、自由に利用、複製、再配布することができますが、全て無保証とさせていただきます。
</namerecord>
+ <!--
+ NameID=1 (Family)
+ https://adobe-type-tools.github.io/font-tech-notes/pdfs/5149.OTFname_Tutorial.pdf
+ -->
<namerecord nameID="1" platformID="3" platEncID="1" langID="0x411">
- 梅ゴシック
+ ゴシック
</namerecord>
<namerecord nameID="2" platformID="3" platEncID="1" langID="0x411">
Regular
@@ -62,8 +82,12 @@
<namerecord nameID="3" platformID="3" platEncID="1" langID="0x411">
梅ゴシック
</namerecord>
+ <!--
+ NameID=4 (Full)
+ https://adobe-type-tools.github.io/font-tech-notes/pdfs/5149.OTFname_Tutorial.pdf
+ -->
<namerecord nameID="4" platformID="3" platEncID="1" langID="0x411">
- 梅ゴシック
+ ゴシック
</namerecord>
<namerecord nameID="5" platformID="3" platEncID="1" langID="0x411">
Look update time of this file.

View file

@ -1,86 +0,0 @@
--- a/UmePGothic-nametable.ttx 2021-11-14 02:41:46.983127001 +0900
+++ b/UmePGothic-nametable.ttx 2021-11-14 02:44:42.413257975 +0900
@@ -5,8 +5,12 @@
<namerecord nameID="0" platformID="1" platEncID="0" langID="0x411" unicode="True">
Author: HORAI Wataru. License: This font is a free software. Unlimited permission is granted to use, copy, and distribute it, with or without modification, either commercially and noncommercially. THIS FONT IS PROVIDED "AS IS" WITHOUT WARRANTY.
</namerecord>
+ <!--
+ NameID=1 (Family)
+ https://adobe-type-tools.github.io/font-tech-notes/pdfs/5149.OTFname_Tutorial.pdf
+ -->
<namerecord nameID="1" platformID="1" platEncID="0" langID="0x411" unicode="True">
- Ume P Gothic
+ MS PGothic
</namerecord>
<namerecord nameID="2" platformID="1" platEncID="0" langID="0x411" unicode="True">
Regular
@@ -14,8 +18,12 @@
<namerecord nameID="3" platformID="1" platEncID="0" langID="0x411" unicode="True">
Ume P Gothic
</namerecord>
+ <!--
+ NameID=4 (Full)
+ https://adobe-type-tools.github.io/font-tech-notes/pdfs/5149.OTFname_Tutorial.pdf
+ -->
<namerecord nameID="4" platformID="1" platEncID="0" langID="0x411" unicode="True">
- Ume P Gothic
+ MS PGothic
</namerecord>
<namerecord nameID="5" platformID="1" platEncID="0" langID="0x411" unicode="True">
Look update time of this file.
@@ -29,8 +37,12 @@
<namerecord nameID="0" platformID="3" platEncID="1" langID="0x409">
Author: HORAI Wataru. License: This font is a free software. Unlimited permission is granted to use, copy, and distribute it, with or without modification, either commercially and noncommercially. THIS FONT IS PROVIDED "AS IS" WITHOUT WARRANTY.
</namerecord>
+ <!--
+ NameID=1 (Family)
+ https://adobe-type-tools.github.io/font-tech-notes/pdfs/5149.OTFname_Tutorial.pdf
+ -->
<namerecord nameID="1" platformID="3" platEncID="1" langID="0x409">
- Ume P Gothic
+ MS PGothic
</namerecord>
<namerecord nameID="2" platformID="3" platEncID="1" langID="0x409">
Regular
@@ -38,8 +50,12 @@
<namerecord nameID="3" platformID="3" platEncID="1" langID="0x409">
Ume P Gothic
</namerecord>
+ <!--
+ NameID=4 (Full)
+ https://adobe-type-tools.github.io/font-tech-notes/pdfs/5149.OTFname_Tutorial.pdf
+ -->
<namerecord nameID="4" platformID="3" platEncID="1" langID="0x409">
- Ume P Gothic
+ MS PGothic
</namerecord>
<namerecord nameID="5" platformID="3" platEncID="1" langID="0x409">
Look update time of this file.
@@ -53,8 +69,12 @@
<namerecord nameID="0" platformID="3" platEncID="1" langID="0x411">
作者: 蓬莱和多流. ライセンス: このフォントはフリー(自由な)ソフトウエアです。あらゆる改変の有無に関わらず、また商業的な利用であっても、自由に利用、複製、再配布することができますが、全て無保証とさせていただきます。
</namerecord>
+ <!--
+ NameID=1 (Family)
+ https://adobe-type-tools.github.io/font-tech-notes/pdfs/5149.OTFname_Tutorial.pdf
+ -->
<namerecord nameID="1" platformID="3" platEncID="1" langID="0x411">
- 梅Pゴシック
+ Pゴシック
</namerecord>
<namerecord nameID="2" platformID="3" platEncID="1" langID="0x411">
Regular
@@ -62,8 +82,12 @@
<namerecord nameID="3" platformID="3" platEncID="1" langID="0x411">
梅Pゴシック
</namerecord>
+ <!--
+ NameID=4 (Full)
+ https://adobe-type-tools.github.io/font-tech-notes/pdfs/5149.OTFname_Tutorial.pdf
+ -->
<namerecord nameID="4" platformID="3" platEncID="1" langID="0x411">
- 梅Pゴシック
+ Pゴシック
</namerecord>
<namerecord nameID="5" platformID="3" platEncID="1" langID="0x411">
Look update time of this file.

View file

@ -1,86 +0,0 @@
--- a/UmeUIGothic-nametable.ttx 2021-11-14 02:41:57.955261726 +0900
+++ b/UmeUIGothic-nametable.ttx 2021-11-14 02:44:57.653441054 +0900
@@ -5,8 +5,12 @@
<namerecord nameID="0" platformID="1" platEncID="0" langID="0x411" unicode="True">
Author: HORAI Wataru. License: This font is a free software. Unlimited permission is granted to use, copy, and distribute it, with or without modification, either commercially and noncommercially. THIS FONT IS PROVIDED "AS IS" WITHOUT WARRANTY.
</namerecord>
+ <!--
+ NameID=1 (Family)
+ https://adobe-type-tools.github.io/font-tech-notes/pdfs/5149.OTFname_Tutorial.pdf
+ -->
<namerecord nameID="1" platformID="1" platEncID="0" langID="0x411" unicode="True">
- Ume UI Gothic
+ MS UI Gothic
</namerecord>
<namerecord nameID="2" platformID="1" platEncID="0" langID="0x411" unicode="True">
Regular
@@ -14,8 +18,12 @@
<namerecord nameID="3" platformID="1" platEncID="0" langID="0x411" unicode="True">
Ume UI Gothic
</namerecord>
++ <!--
++ NameID=4 (Full)
++ https://adobe-type-tools.github.io/font-tech-notes/pdfs/5149.OTFname_Tutorial.pdf
++ -->
<namerecord nameID="4" platformID="1" platEncID="0" langID="0x411" unicode="True">
- Ume UI Gothic
+ MS UI Gothic
</namerecord>
<namerecord nameID="5" platformID="1" platEncID="0" langID="0x411" unicode="True">
Look update time of this file.
@@ -29,8 +37,12 @@
<namerecord nameID="0" platformID="3" platEncID="1" langID="0x409">
Author: HORAI Wataru. License: This font is a free software. Unlimited permission is granted to use, copy, and distribute it, with or without modification, either commercially and noncommercially. THIS FONT IS PROVIDED "AS IS" WITHOUT WARRANTY.
</namerecord>
+ <!--
+ NameID=1 (Family)
+ https://adobe-type-tools.github.io/font-tech-notes/pdfs/5149.OTFname_Tutorial.pdf
+ -->
<namerecord nameID="1" platformID="3" platEncID="1" langID="0x409">
- Ume UI Gothic
+ MS UI Gothic
</namerecord>
<namerecord nameID="2" platformID="3" platEncID="1" langID="0x409">
Regular
@@ -38,8 +50,12 @@
<namerecord nameID="3" platformID="3" platEncID="1" langID="0x409">
Ume UI Gothic
</namerecord>
+ <!--
+ NameID=4 (Full)
+ https://adobe-type-tools.github.io/font-tech-notes/pdfs/5149.OTFname_Tutorial.pdf
+ -->
<namerecord nameID="4" platformID="3" platEncID="1" langID="0x409">
- Ume UI Gothic
+ MS UI Gothic
</namerecord>
<namerecord nameID="5" platformID="3" platEncID="1" langID="0x409">
Look update time of this file.
@@ -53,8 +69,12 @@
<namerecord nameID="0" platformID="3" platEncID="1" langID="0x411">
作者: 蓬莱和多流. ライセンス: このフォントはフリー(自由な)ソフトウエアです。あらゆる改変の有無に関わらず、また商業的な利用であっても、自由に利用、複製、再配布することができますが、全て無保証とさせていただきます。
</namerecord>
+ <!--
+ NameID=1 (Family)
+ https://adobe-type-tools.github.io/font-tech-notes/pdfs/5149.OTFname_Tutorial.pdf
+ -->
<namerecord nameID="1" platformID="3" platEncID="1" langID="0x411">
- 梅UIゴシック
+ MS UI Gothic
</namerecord>
<namerecord nameID="2" platformID="3" platEncID="1" langID="0x411">
Regular
@@ -62,8 +82,12 @@
<namerecord nameID="3" platformID="3" platEncID="1" langID="0x411">
梅UIゴシック
</namerecord>
+ <!--
+ NameID=4 (Full)
+ https://adobe-type-tools.github.io/font-tech-notes/pdfs/5149.OTFname_Tutorial.pdf
+ -->
<namerecord nameID="4" platformID="3" platEncID="1" langID="0x411">
- 梅UIゴシック
+ MS UI Gothic
</namerecord>
<namerecord nameID="5" platformID="3" platEncID="1" langID="0x411">
Look update time of this file.

View file

@ -1,5 +0,0 @@
[SourceHanSansSC-Regular]
f=3,1,0x804,\5FAE\8F6F\96C5\9ED1
s=3,1,0x804,Regular
f=Microsoft YaHei
s=Regular

View file

@ -1,140 +0,0 @@
0020-007E
00A0-0377
037A-037F
0384-038A
038C
038E-03A1
03A3-052F
0531-0556
0559-055F
0561-0587
0589-058A
058D-058F
0591-05C7
05D0-05EA
05F0-05F4
0600-061C
061E-06FF
0750-077F
08A0-08B4
08B6-08BD
08D4-08FF
1D00-1DCA
1DFE-1F15
1F18-1F1D
1F20-1F45
1F48-1F4D
1F50-1F57
1F59
1F5B
1F5D
1F5F-1F7D
1F80-1FB4
1FB6-1FC4
1FC6-1FD3
1FD6-1FDB
1FDD-1FEF
1FF2-1FF4
1FF6-1FFE
2000-200F
2012-2022
2026
202A-2030
2032-2034
2039-203A
203C-203E
2044
205E
206A-2070
2074-2079
207F
2090-2094
20A0-20BF
20F0
2105
2113
2116-2117
2122
2126
212E
214D-214E
2153-2154
215B-215E
2184
2190-2195
21A8
2202
2206
220F
2211-2212
2215
2219-221A
221E-221F
2229
222B
2248
2260-2261
2264-2265
2302
2310
2320-2321
2500
2502
250C
2510
2514
2518
251C
2524
252C
2534
253C
2550-256C
2580
2584
2588
258C
2590-2593
25A0-25A1
25AA-25AC
25B2
25BA
25BC
25C4
25CA-25CC
25CF
25D8-25D9
25E6
263A-263C
2640
2642
2660
2663
2665-2666
266A-266B
266F
2C60-2C7F
2E17
A717-A7AE
A7B0-A7B7
A7F7-A7FF
AB30-AB65
FB00-FB06
FB13-FB17
FB1D-FB36
FB38-FB3C
FB3E
FB40-FB41
FB43-FB44
FB46-FBC1
FBD3-FBFF
FC5E-FC63
FCF2-FCF4
FD3C-FD3F
FDF2
FDF4
FDFA-FDFD
FE20-FE23
FE70-FE74
FE76-FEFC
FFFC

View file

@ -1,123 +0,0 @@
0020-007E
00A0-0377
037A-037F
0384-038A
038C
038E-03A1
03A3-052F
0531-0556
0559-055F
0561-0587
0589-058A
058D-058F
0591-05C7
05D0-05EA
05F0-05F4
0600-061C
061E-06FF
0750-077F
0783
08A0-08B4
08B6-08BD
08D4-08FF
09F2-09F3
0AF1
0BF9
0E01-0E3A
0E3F-0E5B
10A0-10C5
10C7
10CD
10D0-10FF
17DB
1D00-1DCA
1DFE-1F15
1F18-1F1D
1F20-1F45
1F48-1F4D
1F50-1F57
1F59
1F5B
1F5D
1F5F-1F7D
1F80-1FB4
1FB6-1FC4
1FC6-1FD3
1FD6-1FDB
1FDD-1FEF
1FF2-1FF4
1FF6-1FFE
2000-2064
2066-2071
2074-208E
2090-209C
20A0-20BF
20E3
20F0
2105
2113
2116-2117
2122
2126
212E
2133
214D-214E
2150-218B
2190-2195
21A8
2202
2206
220F
2211-2212
2215
2219-221A
221E-221F
2229
222B
2248
2260-2261
2264-2265
2302
2310
2320-2321
2500
2502
250C
25A1
25AA-25AB
25CA
25CC
25CF
25E6
266F
2C60-2C7F
2D00-2D25
2D27
2D2D
2DE0-2DFF
2E17
A640-A69F
A717-A7AD
A7B0-A7B7
A7F7-A7FF
AB30-AB65
FB00-FB06
FB13-FB17
FB1D-FB36
FB38-FB3C
FB3E
FB40-FB41
FB43-FB44
FB46-FBC1
FBD3-FBFF
FC5E-FC63
FCF2-FCF4
FD3C-FD3F
FDF2
FDF4
FDFA-FDFD
FE20-FE23
FE70-FE74
FE76-FEFC
FEFF
FFFC-FFFD

View file

@ -1,166 +0,0 @@
000D
0020-007E
00A0-00FF
0131
0152-0153
0160-0161
0178
017D-017E
0192
02BC
02C6-02C7
02D8
02DA
02DC
03BC
0900-0983
0985-098C
098F-0990
0993-09A8
09AA-09B0
09B2
09B6-09B9
09BC-09C4
09C7-09C8
09CB-09CE
09D7
09DC-09DD
09DF-09E3
09E6-09FE
0A01-0A03
0A05-0A0A
0A0F-0A10
0A13-0A28
0A2A-0A30
0A32-0A33
0A35-0A36
0A38-0A39
0A3C
0A3E-0A42
0A47-0A48
0A4B-0A4D
0A51
0A59-0A5C
0A5E
0A66-0A76
0A81-0A83
0A85-0A8D
0A8F-0A91
0A93-0AA8
0AAA-0AB0
0AB2-0AB3
0AB5-0AB9
0ABC-0AC5
0AC7-0AC9
0ACB-0ACD
0AD0
0AE0-0AE3
0AE6-0AF1
0AF9-0AFF
0B01-0B03
0B05-0B0C
0B0F-0B10
0B13-0B28
0B2A-0B30
0B32-0B33
0B35-0B39
0B3C-0B44
0B47-0B48
0B4B-0B4D
0B56-0B57
0B5C-0B5D
0B5F-0B63
0B66-0B77
0B82-0B83
0B85-0B8A
0B8E-0B90
0B92-0B95
0B99-0B9A
0B9C
0B9E-0B9F
0BA3-0BA4
0BA8-0BAA
0BAE-0BB9
0BBE-0BC2
0BC6-0BC8
0BCA-0BCD
0BD0
0BD7
0BE6-0BFA
0C00-0C0C
0C0E-0C10
0C12-0C28
0C2A-0C39
0C3D-0C44
0C46-0C48
0C4A-0C4D
0C55-0C56
0C58-0C5A
0C60-0C63
0C66-0C6F
0C78-0C8C
0C8E-0C90
0C92-0CA8
0CAA-0CB3
0CB5-0CB9
0CBC-0CC4
0CC6-0CC8
0CCA-0CCD
0CD5-0CD6
0CDE
0CE0-0CE3
0CE6-0CEF
0CF1-0CF2
0D00-0D03
0D05-0D0C
0D0E-0D10
0D12-0D44
0D46-0D48
0D4A-0D4F
0D54-0D63
0D66-0D7F
0D82-0D83
0D85-0D96
0D9A-0DB1
0DB3-0DBB
0DBD
0DC0-0DC6
0DCA
0DCF-0DD4
0DD6
0DD8-0DDF
0DE6-0DEF
0DF2-0DF4
0FD5-0FD8
1C50-1C7F
1CD0-1CF9
200B-200D
2010
2013-2014
2018-201A
201C-201E
2020-2022
2026
2030
2039-203A
2044
20A8
20AC
20B9
2122
2212
2215
2219
2236
25CC
25CF
262C
A830-A839
A8E0-A8FF
ABC0-ABED
ABF0-ABF9
110D0-110E8
110F0-110F9
11100-11134
11136-11146
111E1-111F4

View file

@ -1,7 +0,0 @@
if ($argc != 6)
Error ("Expected arguments - FileName, PSName, FamilyName, FaceName, OutFileName")
endif
Open($1)
SetFontNames($argv[2], $argv[3], $argv[4])
Generate($5)

View file

@ -1,290 +0,0 @@
#!/usr/bin/env python3
# This script was created by Giovanni Mascellani for CodeWeavers
# Based on merge_noto.py and merge_fonts.py from the nototools
# (https://github.com/googlefonts/nototools), with the following
# copyright notice:
# Copyright 2014-2017 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# The font name changing logic is taken from
# https://github.com/chrissimpkins/fontname.py/blob/master/fontname.py,
# with the following copyright notice:
# Copyright 2019 Christopher Simpkins
# MIT License
# The font subsetting logic is taken from
# https://github.com/fonttools/fonttools/blob/main/Lib/fontTools/subset/__init__.py
# with the following copyright notice:
# Copyright 2013 Google, Inc. All Rights Reserved.
# Google Author(s): Behdad Esfahbod
# The whole fonttools repository is distributed under the MIT license.
"""Merges a number of Noto fonts and then sets a given name to the
result.
"""
import sys
import tempfile
import os
from fontTools import merge
from fontTools import ttLib
from fontTools import subset
from fontTools.ttLib.tables import otTables
def read_line_metrics(font):
metrics = {
"ascent": font["hhea"].ascent,
"descent": font["hhea"].descent,
"usWinAscent": font["OS/2"].usWinAscent,
"usWinDescent": font["OS/2"].usWinDescent,
"sTypoAscender": font["OS/2"].sTypoAscender,
"sTypoDescender": font["OS/2"].sTypoDescender,
"sxHeight": font["OS/2"].sxHeight,
"sCapHeight": font["OS/2"].sCapHeight,
"sTypoLineGap": font["OS/2"].sTypoLineGap,
}
return metrics
def set_line_metrics(font, metrics):
font["hhea"].ascent = metrics["ascent"]
font["hhea"].descent = metrics["descent"]
font["OS/2"].usWinAscent = metrics["usWinAscent"]
font["OS/2"].usWinDescent = metrics["usWinDescent"]
font["OS/2"].sTypoAscender = metrics["sTypoAscender"]
font["OS/2"].sTypoDescender = metrics["sTypoDescender"]
font["OS/2"].sxHeight = metrics["sxHeight"]
font["OS/2"].sCapHeight = metrics["sCapHeight"]
font["OS/2"].sTypoLineGap = metrics["sTypoLineGap"]
def has_gsub_table(fontfile):
font = ttLib.TTFont(fontfile)
return "GSUB" in font
SCRIPT_TO_OPENTYPE_SCRIPT_TAG = {
# Retrieved from Opentype 1.9 delta specs. Prerelease scripttags used out of necessity. https://docs.microsoft.com/en-us/typography/opentype/spec/scripttags
"Carian": "cari",
"CypriotSyllabary": "cprt",
"CyproMinoan": "cpmn",
"Deseret": "dsrt",
"Glagolitic": "glag",
"EgyptianHieroglyphs": "egyp",
"ImperialAramaic": "armi",
"LinearA": "lina",
"LinearB": "linb",
"Lisu": "lisu",
"Lycian": "lyci",
"Lydian": "lydi",
"Ogham": "ogam",
"OldItalic": "ital",
"OldPersian": "xpeo",
"OldSouthArabian": "sarb",
"OldTurkic": "orkh",
"OldSogdian": "sogo",
"OldNorthArabian": "narb",
"OldHungarian": "hung",
"Osmanya": "osma",
"Phoenician": "phnx",
"SumeroAkkadianCuneiform": "xsux",
"Ugaritic": "ugar",
"OlChiki": "olck",
"TaiLe": "tale",
"Cuneiform": "xsux",
"Cypriot": "cprt",
"Runic": "runr",
"Shavian": "shaw",
"Vai": "vai ",
"Yi": "yi ",
"AnatolianHieroglyphs": "hluw",
"Bamum": "bamu",
"ByzantineMusic": "byzm",
"Gothic": "goth",
"ImperialAramaic": "armi",
"InscriptionalPahlavi": "phli",
"InscriptionalParthian": "prti",
"Khojki": "khoj",
"MathematicalAlphanumericSymbols": "math",
"MeroiticCursive": "merc",
"MeroiticHieroglyphs": "mero",
"MusicalSymbols": "musc",
"Palmyrene": "palm",
"Rejang": "rjng",
"Samaritan": "samr",
"Carian": "cari",
"Ahom": "ahom",
"Adlam": "adlm",
"Dogra": "dogr",
"Lisu": "lisu",
"Mandaean": "mand",
"Manichaean": "mani",
"Tifinagh": "tfng",
"Wancho": "wcho",
"Yezidi": "yezi",
"Cherokee": "cher",
"Chorasmian": "chrs",
"PahawhHmong": "hmng",
"Phagspa": "phag",
"Sundanese": "sund",
"WarangCiti": "wara",
"SylotiNagri": "sylo",
"PsalterPahlavi": "phlp",
"CaucasianAlbanian": "aghb",
"Medefaidrin": "medf",
"MeiteiMayek": "mtei",
"MendeKikakui": "mend",
"Mro": "mroo",
"Multani": "mult",
"Nabataean": "nbat",
"Nandinagari": "nand",
"Newa": "newa",
"NewTaiLue": "talu",
"Nushu": "nshu",
"NyiakengPuachueHmong": "hmnp",
"OldPermic": "perm",
"SoraSompeng": "sora",
"Soyombo": "soyo",
"SylotiNagri": "sylo",
"Tagbanwa": "tagb",
"Tagalog": "tglg",
"Takri": "takr",
"TaiTham": "lana",
"TaiViet": "tavt",
"Tangut": "tang",
"Thaana": "thaa",
"UgariticCuneiform": "ugar",
"ZanabazarSquare": "zanb",
"SignWriting": "sgnw",
"OldUyghur": "ougr",
"Tangsa": "tnsa",
"Toto": "toto",
"Vithkuqi": "vith",
"Duployan": "dupl",
"Hatran": "hatr",
# These last two would only merge using the long script name including the 'NotoSerif' part
"NotoSerifYezidi": "yezi",
"NotoSerifNyiakengPuachueHmong": "hmnp",
}
def get_opentype_script_tag(fontfile):
fontfile = os.path.basename(fontfile)
if fontfile.startswith("NotoSans"):
fontfile = fontfile[8:]
fontfile = fontfile[: fontfile.index("-")]
return SCRIPT_TO_OPENTYPE_SCRIPT_TAG[fontfile]
def add_gsub_to_font(fontfile):
"""Adds an empty GSUB table to a font."""
font = ttLib.TTFont(fontfile)
gsub_table = ttLib.getTableClass("GSUB")("GSUB")
gsub_table.table = otTables.GSUB()
gsub_table.table.Version = 1.0
gsub_table.table.ScriptList = otTables.ScriptList()
gsub_table.table.ScriptCount = 1
gsub_table.table.LookupList = otTables.LookupList()
gsub_table.table.LookupList.LookupCount = 0
gsub_table.table.LookupList.Lookup = []
gsub_table.table.FeatureList = otTables.FeatureList()
gsub_table.table.FeatureList.FeatureCount = 0
gsub_table.table.LookupList.FeatureRecord = []
script_record = otTables.ScriptRecord()
script_record.ScriptTag = get_opentype_script_tag(fontfile)
script_record.Script = otTables.Script()
script_record.Script.LangSysCount = 0
script_record.Script.LangSysRecord = []
default_lang_sys = otTables.DefaultLangSys()
default_lang_sys.FeatureIndex = []
default_lang_sys.FeatureCount = 0
default_lang_sys.LookupOrder = None
default_lang_sys.ReqFeatureIndex = 65535
script_record.Script.DefaultLangSys = default_lang_sys
gsub_table.table.ScriptList.ScriptRecord = [script_record]
font["GSUB"] = gsub_table
target_file = tempfile.gettempdir() + "/" + os.path.basename(fontfile)
font.save(target_file)
return target_file
def parse_unicodes(s):
import re
s = re.sub(r"0[xX]", " ", s)
s = re.sub(r"[<+>,;&#\\xXuU\n ]", " ", s)
l = []
for item in s.split():
fields = item.split("-")
if len(fields) == 1:
l.append(int(item, 16))
else:
start, end = fields
l.extend(range(int(start, 16), int(end, 16) + 1))
return l
def main():
output_filename = sys.argv[-1]
ranges_filename = sys.argv[-2]
weight = sys.argv[-3]
font_name = sys.argv[-4]
ps_name = sys.argv[-5]
input_filenames = sys.argv[1:-5]
# Add a GSUB table to the fonts that do not have one, otherwise
# the merger will complain
for index, filename in enumerate(input_filenames):
if not has_gsub_table(filename):
input_filenames[index] = add_gsub_to_font(filename)
merger = merge.Merger()
font = merger.merge(input_filenames)
# Use the line metrics defined by the first font, which is
# supposed to be the basic NotoSans
metrics = read_line_metrics(ttLib.TTFont(input_filenames[0]))
set_line_metrics(font, metrics)
# Select the subset we care about
options = subset.Options(ignore_missing_unicodes=False)
subsetter = subset.Subsetter(options)
unicodes = []
with open(ranges_filename) as ranges:
for line in ranges:
unicodes.extend(parse_unicodes(line.split("#")[0]))
if len(unicodes) != 0:
subsetter.populate(unicodes=unicodes)
subsetter.subset(font)
# Rename the result
for record in font['name'].names:
if record.nameID == 1:
record.string = font_name
elif record.nameID == 4:
record.string = "{} {}".format(font_name, weight)
elif record.nameID == 6:
record.string = "{}-{}".format(ps_name, weight.replace(' ', ''))
font.save(output_filename)
if __name__ == '__main__':
main()

View file

@ -1,96 +0,0 @@
Copyright 2014-2019 Adobe (http://www.adobe.com/), with Reserved Font
Name 'Source'. Source is a trademark of Adobe in the United States
and/or other countries.
This Font Software is licensed under the SIL Open Font License,
Version 1.1.
This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL
-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------
PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font
creation efforts of academic and linguistic communities, and to
provide a free and open framework in which fonts may be shared and
improved in partnership with others.
The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply to
any document created using the fonts or their derivatives.
DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.
"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).
"Original Version" refers to the collection of Font Software
components as distributed by the Copyright Holder(s).
"Modified Version" refers to any derivative made by adding to,
deleting, or substituting -- in part or in whole -- any of the
components of the Original Version, by changing formats or by porting
the Font Software to a new environment.
"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.
PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed,
modify, redistribute, and sell modified and unmodified copies of the
Font Software, subject to the following conditions:
1) Neither the Font Software nor any of its individual components, in
Original or Modified Versions, may be sold by itself.
2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.
3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the
corresponding Copyright Holder. This restriction only applies to the
primary font name as presented to the users.
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.
5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created using
the Font Software.
TERMINATION
This license becomes null and void if any of the above conditions are
not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.

Some files were not shown because too many files have changed in this diff Show more