mirror of
https://github.com/shadps4-emu/ext-boost.git
synced 2026-01-31 00:55:23 +01:00
Build instructions for linux, unify boost lib list
This commit is contained in:
63
README.md
Normal file
63
README.md
Normal file
@@ -0,0 +1,63 @@
|
||||
Boost libraries - trimmed down for shadPS4
|
||||
========================================
|
||||
|
||||
This is a subset of Boost v1.82.0 generated using the bcp tool. To get a list of boost modules guaranteed to exist, check the `boost_libs.txt` file. This is intended to be used with the shadPS4 emulator.
|
||||
|
||||
Updating this repo
|
||||
==================
|
||||
|
||||
To update the Boost version (or to add a new library) follow these steps:
|
||||
|
||||
1. Download Boost and extract the package, then `cd` to the `boost_1_xx_0` directory. If you are on Windows, use PowerShell.
|
||||
```
|
||||
git clone https://github.com/boostorg/boost
|
||||
```
|
||||
1. Checkout to a specific boost version and init submodules. For example, for boost 1.82:
|
||||
```
|
||||
git checkout boost-1.82.0
|
||||
git submodule update --init --recursive
|
||||
```
|
||||
1. Build the `bcp` tool:
|
||||
* Windows
|
||||
```
|
||||
.\bootstrap.bat
|
||||
.\b2 tools\bcp
|
||||
```
|
||||
* Linux
|
||||
```
|
||||
./bootstrap.sh
|
||||
./b2 tools/bcp
|
||||
```
|
||||
1. Store the boost directory in a variable for later use:
|
||||
* Windows
|
||||
```
|
||||
$boost_dir = $pwd
|
||||
```
|
||||
* Linux
|
||||
```
|
||||
export boost_dir=$(pwd)
|
||||
```
|
||||
1. Add bcp to your path: (The correct output path should be printed by b2 during the build, this is an example. Don't include the `bcp` executable name at the end, just the path to the directory containing it.)
|
||||
* Windows
|
||||
```
|
||||
$env:Path += ";$boost_dir\bin.v2\tools\bcp\msvc-14.3\release\link-static\threading-multi"
|
||||
```
|
||||
* Linux (don't forget the `:PATH` at the end)
|
||||
```
|
||||
export PATH="$boost_dir/bin.v2/tools/bcp/gcc-15/release/link-static:$PATH"
|
||||
```
|
||||
1. `cd` to this repo's directory (shadPS4's `ext-boost`, it is important you stay in the same terminal session to not lose your env vars.)
|
||||
1. Remove the existing boost by removing the `boost` and `libs` dirs. (This is only necessary if doing a Boost version upgrade, in case they removed any files in the new version.)
|
||||
1. If doing a boost version update, also remember to update the boost version on this README to keep it consistent,
|
||||
1. Now you can modify `boost_libs.txt` to add/remove libraries.
|
||||
1. Build a new trimmed down distro.
|
||||
* Windows
|
||||
```
|
||||
.\build.cmd $boost_dir
|
||||
```
|
||||
* Linux
|
||||
```
|
||||
./build.sh $boost_dir
|
||||
```
|
||||
1. You may need to modify `CMakeLists.txt` to adjust include dirs.
|
||||
1. Add/remove all files in git and commit.
|
||||
23
Readme.md
23
Readme.md
@@ -1,23 +0,0 @@
|
||||
Boost libraries - trimmed down for shadPS4
|
||||
========================================
|
||||
|
||||
This is a subset of Boost v1.82.0 generated using the bcp tool. To get a list of boost modules guaranteed to exist, check the build script.
|
||||
|
||||
Updating this repo (on Windows)
|
||||
===============================
|
||||
|
||||
To update the Boost version (or to add a new library) follow these steps:
|
||||
|
||||
- Download Boost and extract the package, then launch Powershell and `cd` to the `boost_1_xx_0` directory.
|
||||
- Build the `bcp` tool:
|
||||
```
|
||||
.\bootstrap.bat
|
||||
.\b2 tools\bcp
|
||||
```
|
||||
|
||||
- Store the boost directory in a variable for later use: `$boost_dir = $pwd`.
|
||||
- Add bcp to your path: `$env:Path += ";$boost_dir\bin.v2\tools\bcp\msvc-14.3\release\link-static\threading-multi"` (The correct output path should be printed by b2 during the build.)
|
||||
- `cd` to this repo's directory (`...\externals\boost\`)
|
||||
- Remove the existing boost from the repo: `rm -r boost` (This is only necessary if doing a Boost version upgrade, in case they removed any files in the new version.)
|
||||
- Run `.\build.cmd $boost_dir` to build a new trimmed down distro.
|
||||
- Add/remove all files in git and commit.
|
||||
17
boost_libs.txt
Normal file
17
boost_libs.txt
Normal file
@@ -0,0 +1,17 @@
|
||||
boost/asio/asio.hpp
|
||||
boost/container/flat_map.hpp
|
||||
boost/container/flat_set.hpp
|
||||
boost/container/list.hpp
|
||||
boost/container/small_vector.hpp
|
||||
boost/container/static_vector.hpp
|
||||
boost/icl/interval_map.hpp
|
||||
boost/icl/split_interval_map.hpp
|
||||
boost/icl/separate_interval_set.hpp
|
||||
boost/intrusive/list.hpp
|
||||
boost/intrusive/set.hpp
|
||||
align
|
||||
range
|
||||
optional
|
||||
utility
|
||||
tuple
|
||||
iterator
|
||||
35
build.cmd
35
build.cmd
@@ -1,19 +1,16 @@
|
||||
bcp ^
|
||||
boost/asio/asio.hpp ^
|
||||
boost/container/flat_map.hpp ^
|
||||
boost/container/flat_set.hpp ^
|
||||
boost/container/list.hpp ^
|
||||
boost/container/small_vector.hpp ^
|
||||
boost/container/static_vector.hpp ^
|
||||
boost/icl/interval_map.hpp ^
|
||||
boost/icl/split_interval_map.hpp ^
|
||||
boost/icl/separate_interval_set.hpp ^
|
||||
boost/intrusive/list.hpp ^
|
||||
boost/intrusive/set.hpp ^
|
||||
align ^
|
||||
range ^
|
||||
optional ^
|
||||
utility ^
|
||||
tuple ^
|
||||
iterator ^
|
||||
--boost="%1" .
|
||||
@echo off
|
||||
setlocal enabledelayedexpansion
|
||||
|
||||
if "%~1"=="" (
|
||||
echo Usage: %0 path\to\boost
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
set BOOST_SRC=%1
|
||||
|
||||
set LIBS=
|
||||
for /f "usebackq delims=" %%a in ("boost_libs.txt") do (
|
||||
set LIBS=!LIBS! %%a
|
||||
)
|
||||
|
||||
bcp %LIBS% --boost="%BOOST_SRC%" .
|
||||
|
||||
30
build.sh
30
build.sh
@@ -1,23 +1,13 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
bcp \
|
||||
boost/asio/asio.hpp \
|
||||
boost/container/flat_map.hpp \
|
||||
boost/container/flat_set.hpp \
|
||||
boost/container/list.hpp \
|
||||
boost/container/small_vector.hpp \
|
||||
boost/container/static_vector.hpp \
|
||||
boost/icl/interval_map.hpp \
|
||||
boost/icl/split_interval_map.hpp \
|
||||
boost/icl/separate_interval_set.hpp \
|
||||
boost/intrusive/list.hpp \
|
||||
boost/intrusive/set.hpp \
|
||||
align \
|
||||
range \
|
||||
optional \
|
||||
utility \
|
||||
tuple \
|
||||
iterator \
|
||||
--boost="$1" .
|
||||
BOOST_SRC="$1"
|
||||
if [ -z "$BOOST_SRC" ]; then
|
||||
echo "Usage: $0 /path/to/boost"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
find . -type f -print0 | xargs -0 dos2unix
|
||||
# Read all non-empty, non-comment lines into an array
|
||||
LIBS=$(grep -vE '^\s*#|^\s*$' boost_libs.txt | xargs)
|
||||
|
||||
bcp $LIBS --boost="$BOOST_SRC" .
|
||||
|
||||
Reference in New Issue
Block a user