Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e9ad8a9219 |
@@ -35,7 +35,7 @@ cmake .. \
|
||||
-DUSE_SYSTEM_CURL=ON \
|
||||
-DUSE_SDL=ON \
|
||||
-DUSE_SYSTEM_SDL=ON \
|
||||
-DUSE_SYSTEM_FFMPEG=ON \
|
||||
-DUSE_SYSTEM_FFMPEG=OFF \
|
||||
-DUSE_SYSTEM_OPENCV=ON \
|
||||
-DUSE_DISCORD_RPC=ON \
|
||||
-DOpenGL_GL_PREFERENCE=LEGACY \
|
||||
|
||||
@@ -46,7 +46,7 @@ cmake .. \
|
||||
-DUSE_SYSTEM_CURL=ON \
|
||||
-DUSE_SDL=ON \
|
||||
-DUSE_SYSTEM_SDL=ON \
|
||||
-DUSE_SYSTEM_FFMPEG=ON \
|
||||
-DUSE_SYSTEM_FFMPEG=OFF \
|
||||
-DUSE_SYSTEM_OPENCV=ON \
|
||||
-DUSE_DISCORD_RPC=ON \
|
||||
-DOpenGL_GL_PREFERENCE=LEGACY \
|
||||
|
||||
@@ -9,12 +9,36 @@ AVVER="${COMM_TAG}-${COMM_COUNT}"
|
||||
export LVER="${COMM_TAG}-${COMM_COUNT}-${COMM_HASH}"
|
||||
echo "AVVER=$AVVER" >> .ci/ci-vars.env
|
||||
|
||||
# Clang depends on LLVM_COMPILER_VER so it needs to be installed here.
|
||||
sudo port install "clang-$LLVM_COMPILER_VER"
|
||||
export HOMEBREW_NO_AUTO_UPDATE=1
|
||||
export HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1
|
||||
export HOMEBREW_NO_ENV_HINTS=1
|
||||
export HOMEBREW_NO_INSTALL_CLEANUP=1
|
||||
brew update
|
||||
brew install -f --overwrite --quiet ccache "llvm@$LLVM_COMPILER_VER"
|
||||
brew link -f --overwrite --quiet "llvm@$LLVM_COMPILER_VER"
|
||||
if [ "$AARCH64" -eq 1 ]; then
|
||||
brew install -f --overwrite --quiet googletest opencv@4 sdl3 vulkan-headers vulkan-loader molten-vk
|
||||
brew unlink --quiet ffmpeg fmt qtbase qtsvg qtdeclarative protobuf || true
|
||||
else
|
||||
arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
||||
arch -x86_64 /usr/local/bin/brew install -f --overwrite --quiet [email protected] opencv@4 "llvm@$LLVM_COMPILER_VER" sdl3 vulkan-headers vulkan-loader molten-vk
|
||||
arch -x86_64 /usr/local/bin/brew unlink --quiet ffmpeg qtbase qtsvg qtdeclarative protobuf || true
|
||||
fi
|
||||
|
||||
export CXX=clang++
|
||||
export CC=clang
|
||||
|
||||
export BREW_PATH;
|
||||
if [ "$AARCH64" -eq 1 ]; then
|
||||
BREW_PATH="$(brew --prefix)"
|
||||
export BREW_BIN="/opt/homebrew/bin"
|
||||
export BREW_SBIN="/opt/homebrew/sbin"
|
||||
else
|
||||
BREW_PATH="$("/usr/local/bin/brew" --prefix)"
|
||||
export BREW_BIN="/usr/local/bin"
|
||||
export BREW_SBIN="/usr/local/sbin"
|
||||
fi
|
||||
|
||||
export WORKDIR;
|
||||
WORKDIR="$(pwd)"
|
||||
|
||||
@@ -42,25 +66,28 @@ cd "$WORKDIR"
|
||||
ditto "/tmp/Qt/$QT_VER" "qt-downloader/$QT_VER"
|
||||
|
||||
export Qt6_DIR="$WORKDIR/qt-downloader/$QT_VER/clang_64/lib/cmake/Qt$QT_VER_MAIN"
|
||||
export SDL3_DIR="/opt/local/lib/cmake/SDL3"
|
||||
export OpenCV_DIR="/opt/local/libexec/opencv4"
|
||||
export PATH="/opt/local/libexec/llvm-$LLVM_COMPILER_VER/bin:/$WORKDIR/qt-downloader/$QT_VER/clang_64/bin:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Library/Apple/usr/bin:$PATH"
|
||||
export LDFLAGS="-L/opt/local/lib -Wl,-rpath,/opt/local/lib"
|
||||
export VULKAN_SDK="/opt/local"
|
||||
export LLVM_DIR="/opt/local/libexec/llvm-$LLVM_COMPILER_VER"
|
||||
export SDL3_DIR="$BREW_PATH/opt/sdl3/lib/cmake/SDL3"
|
||||
|
||||
export PATH="/opt/homebrew/opt/llvm@$LLVM_COMPILER_VER/bin:$PATH"
|
||||
export LDFLAGS="-L$BREW_PATH/opt/llvm@$LLVM_COMPILER_VER/lib/c++ -L$BREW_PATH/opt/llvm@$LLVM_COMPILER_VER/lib/unwind -lunwind"
|
||||
|
||||
export VULKAN_SDK
|
||||
VULKAN_SDK="$BREW_PATH/opt/molten-vk"
|
||||
ln -s "$BREW_PATH/opt/vulkan-loader/lib/libvulkan.dylib" "$VULKAN_SDK/lib/libvulkan.dylib"
|
||||
|
||||
export LLVM_DIR
|
||||
LLVM_DIR="$BREW_PATH/opt/llvm@$LLVM_COMPILER_VER"
|
||||
# Pull all the submodules except some
|
||||
# shellcheck disable=SC2046
|
||||
git submodule -q update --init --depth=1 --jobs=8 $(awk '/path/ && !/llvm/ && !/opencv/ && !/libsdl-org/ && !/feralinteractive/ && !/curl/ && !/zlib/ { print $3 }' .gitmodules)
|
||||
git submodule -q update --init --depth=1 --jobs=8 $(awk '/path/ && !/llvm/ && !/opencv/ && !/SDL/ && !/feralinteractive/ { print $3 }' .gitmodules)
|
||||
|
||||
mkdir build && cd build || exit 1
|
||||
# The below should be uncommented once bugs with Qt 6 QListWidgets when using the OS 26 visual style are resolved.
|
||||
# sudo xcode-select -switch /Applications/Xcode_26.3.app/Contents/Developer
|
||||
|
||||
if [ "$AARCH64" -eq 1 ]; then
|
||||
cmake .. \
|
||||
-DBUILD_RPCS3_TESTS="${RUN_UNIT_TESTS}" \
|
||||
-DRUN_RPCS3_TESTS="${RUN_UNIT_TESTS}" \
|
||||
-DCMAKE_OSX_DEPLOYMENT_TARGET=15.0 \
|
||||
-DCMAKE_OSX_DEPLOYMENT_TARGET=14.4 \
|
||||
-DCMAKE_OSX_SYSROOT="$(xcrun --sdk macosx --show-sdk-path)" \
|
||||
-DMACOSX_BUNDLE_SHORT_VERSION_STRING="${COMM_TAG}" \
|
||||
-DMACOSX_BUNDLE_BUNDLE_VERSION="${COMM_COUNT}" \
|
||||
@@ -75,6 +102,29 @@ cmake .. \
|
||||
-DUSE_SYSTEM_SDL=ON \
|
||||
-DUSE_SYSTEM_OPENCV=ON \
|
||||
-G Ninja
|
||||
else
|
||||
cmake .. \
|
||||
-DBUILD_RPCS3_TESTS=OFF \
|
||||
-DRUN_RPCS3_TESTS=OFF \
|
||||
-DCMAKE_OSX_ARCHITECTURES=x86_64 \
|
||||
-DCMAKE_SYSTEM_PROCESSOR=x86_64 \
|
||||
-DCMAKE_TOOLCHAIN_FILE=buildfiles/cmake/TCDarwinX86_64.cmake \
|
||||
-DCMAKE_OSX_DEPLOYMENT_TARGET=14.4 \
|
||||
-DCMAKE_OSX_SYSROOT="$(xcrun --sdk macosx --show-sdk-path)" \
|
||||
-DMACOSX_BUNDLE_SHORT_VERSION_STRING="${COMM_TAG}" \
|
||||
-DMACOSX_BUNDLE_BUNDLE_VERSION="${COMM_COUNT}"\
|
||||
-DSTATIC_LINK_LLVM=ON \
|
||||
-DUSE_SDL=ON \
|
||||
-DUSE_DISCORD_RPC=ON \
|
||||
-DUSE_AUDIOUNIT=ON \
|
||||
-DUSE_SYSTEM_FFMPEG=OFF \
|
||||
-DUSE_NATIVE_INSTRUCTIONS=OFF \
|
||||
-DUSE_PRECOMPILED_HEADERS=OFF \
|
||||
-DUSE_SYSTEM_MVK=ON \
|
||||
-DUSE_SYSTEM_SDL=ON \
|
||||
-DUSE_SYSTEM_OPENCV=ON \
|
||||
-G Ninja
|
||||
fi
|
||||
|
||||
ninja; build_status=$?;
|
||||
|
||||
|
||||
@@ -19,9 +19,6 @@ if [ "$DEPLOY_APPIMAGE" = "true" ]; then
|
||||
|
||||
APPIMAGE_EXTRACT_AND_RUN=1 linuxdeploy --appdir AppDir --plugin qt --plugin checkrt
|
||||
|
||||
# Restore App Icon
|
||||
ln -sr ./AppDir/rpcs3.svg ./AppDir/.DirIcon
|
||||
|
||||
# Remove libwayland-client because it has platform-dependent exports and breaks other OSes
|
||||
rm -f ./AppDir/usr/lib/libwayland-client.so*
|
||||
|
||||
@@ -37,7 +34,7 @@ if [ "$DEPLOY_APPIMAGE" = "true" ]; then
|
||||
|
||||
# Download translations
|
||||
mkdir -p "./AppDir/usr/translations"
|
||||
ZIP_URL=$(curl -fsSL --retry 3 --retry-delay 60 "https://api.github.com/repos/RPCS3/rpcs3_translations/releases/latest" \
|
||||
ZIP_URL=$(curl -fsSL "https://api.github.com/repos/RPCS3/rpcs3_translations/releases/latest" \
|
||||
| grep "browser_download_url" \
|
||||
| grep "RPCS3-languages.zip" \
|
||||
| cut -d '"' -f 4)
|
||||
@@ -45,7 +42,7 @@ if [ "$DEPLOY_APPIMAGE" = "true" ]; then
|
||||
echo "Failed to find RPCS3-languages.zip in the latest release. Continuing without translations."
|
||||
else
|
||||
echo "Downloading translations from: $ZIP_URL"
|
||||
curl -fsSL --retry 3 --retry-delay 60 -o translations.zip "$ZIP_URL" || {
|
||||
curl -L -o translations.zip "$ZIP_URL" || {
|
||||
echo "Failed to download translations.zip. Continuing without translations."
|
||||
exit 0
|
||||
}
|
||||
|
||||
@@ -5,12 +5,15 @@ cd build || exit 1
|
||||
|
||||
cd bin
|
||||
mkdir -p "rpcs3.app/Contents/Resources/vulkan/icd.d" || true
|
||||
wget https://github.com/KhronosGroup/MoltenVK/releases/download/v1.4.2/MoltenVK-macos-privateapi.tar
|
||||
wget https://github.com/KhronosGroup/MoltenVK/releases/download/v1.4.1/MoltenVK-macos-privateapi.tar
|
||||
tar -xvf MoltenVK-macos-privateapi.tar
|
||||
cp "MoltenVK/MoltenVK/dynamic/dylib/macOS/libMoltenVK.dylib" "rpcs3.app/Contents/Frameworks/libMoltenVK.dylib"
|
||||
cp "MoltenVK/MoltenVK/dynamic/dylib/macOS/MoltenVK_icd.json" "rpcs3.app/Contents/Resources/vulkan/icd.d/MoltenVK_icd.json"
|
||||
sed -i '' "s/.\//..\/..\/..\/Frameworks\//g" "rpcs3.app/Contents/Resources/vulkan/icd.d/MoltenVK_icd.json"
|
||||
|
||||
cp "$(realpath $BREW_PATH/opt/llvm@$LLVM_COMPILER_VER/lib/c++/libc++abi.1.0.dylib)" "rpcs3.app/Contents/Frameworks/libc++abi.1.dylib"
|
||||
cp "$(realpath $BREW_PATH/opt/gcc/lib/gcc/current/libgcc_s.1.1.dylib)" "rpcs3.app/Contents/Frameworks/libgcc_s.1.1.dylib"
|
||||
|
||||
rm -rf "rpcs3.app/Contents/Frameworks/QtPdf.framework" \
|
||||
"rpcs3.app/Contents/Frameworks/QtQml.framework" \
|
||||
"rpcs3.app/Contents/Frameworks/QtQmlModels.framework" \
|
||||
@@ -23,32 +26,39 @@ rm -rf "rpcs3.app/Contents/Frameworks/QtPdf.framework" \
|
||||
../../.ci/optimize-mac.sh rpcs3.app
|
||||
|
||||
# Download translations
|
||||
mkdir -p "rpcs3.app/Contents/Resources/translations"
|
||||
ZIP_URL="https://github.com/RPCS3/rpcs3_translations/releases/latest/download/RPCS3-languages.zip"
|
||||
echo "Downloading translations from: $ZIP_URL"
|
||||
if curl -fsSL --retry 3 --retry-delay 60 "$ZIP_URL" -o "translations.zip"; then
|
||||
echo "Successfully downloaded translations."
|
||||
if unzip -o translations.zip -d "rpcs3.app/Contents/Resources/translations" >/dev/null 2>&1; then
|
||||
rm -f translations.zip
|
||||
else
|
||||
echo "Failed to extract translations.zip. Continuing without translations."
|
||||
rm -f translations.zip
|
||||
fi
|
||||
mkdir -p "rpcs3.app/Contents/translations"
|
||||
ZIP_URL=$(curl -fsSL "https://api.github.com/repos/RPCS3/rpcs3_translations/releases/latest" \
|
||||
| grep "browser_download_url" \
|
||||
| grep "RPCS3-languages.zip" \
|
||||
| cut -d '"' -f 4)
|
||||
if [ -z "$ZIP_URL" ]; then
|
||||
echo "Failed to find RPCS3-languages.zip in the latest release. Continuing without translations."
|
||||
else
|
||||
echo "Warning: Failed to download translations. Skipping..."
|
||||
echo "Downloading translations from: $ZIP_URL"
|
||||
curl -L -o translations.zip "$ZIP_URL" || {
|
||||
echo "Failed to download translations.zip. Continuing without translations."
|
||||
exit 0
|
||||
}
|
||||
unzip -o translations.zip -d "rpcs3.app/Contents/translations" >/dev/null 2>&1 || \
|
||||
echo "Failed to extract translations.zip. Continuing without translations."
|
||||
rm -f translations.zip
|
||||
fi
|
||||
|
||||
# Copy Qt translations manually
|
||||
QT_TRANS="$WORKDIR/qt-downloader/$QT_VER/clang_64/translations"
|
||||
cp $QT_TRANS/qt_*.qm rpcs3.app/Contents/Resources/translations
|
||||
cp $QT_TRANS/qtbase_*.qm rpcs3.app/Contents/Resources/translations
|
||||
cp $QT_TRANS/qtmultimedia_*.qm rpcs3.app/Contents/Resources/translations
|
||||
rm -f rpcs3.app/Contents/Resources/translations/qt_help_*.qm || true
|
||||
cp $QT_TRANS/qt_*.qm rpcs3.app/Contents/translations
|
||||
cp $QT_TRANS/qtbase_*.qm rpcs3.app/Contents/translations
|
||||
cp $QT_TRANS/qtmultimedia_*.qm rpcs3.app/Contents/translations
|
||||
rm -f rpcs3.app/Contents/translations/qt_help_*.qm || true
|
||||
|
||||
# Need to do this rename hack due to case insensitive filesystem
|
||||
mv rpcs3.app RPCS3_.app
|
||||
mv RPCS3_.app RPCS3.app
|
||||
|
||||
# Hack
|
||||
install_name_tool -delete_rpath /opt/homebrew/lib RPCS3.app/Contents/MacOS/rpcs3 || true
|
||||
install_name_tool -delete_rpath /usr/local/lib RPCS3.app/Contents/MacOS/rpcs3 || true
|
||||
|
||||
# NOTE: "--deep" is deprecated
|
||||
codesign --deep -fs - RPCS3.app
|
||||
|
||||
@@ -56,7 +66,7 @@ echo "[InternetShortcut]" > Quickstart.url
|
||||
echo "URL=https://rpcs3.net/quickstart" >> Quickstart.url
|
||||
echo "IconIndex=0" >> Quickstart.url
|
||||
|
||||
if [ "$(arch)" = "arm64" ]; then
|
||||
if [ "$AARCH64" -eq 1 ]; then
|
||||
ARCHIVE_FILEPATH="$BUILD_ARTIFACTSTAGINGDIRECTORY/rpcs3-v${LVER}_macos_aarch64.7z"
|
||||
else
|
||||
ARCHIVE_FILEPATH="$BUILD_ARTIFACTSTAGINGDIRECTORY/rpcs3-v${LVER}_macos.7z"
|
||||
|
||||
@@ -24,11 +24,10 @@ mkdir ./bin/config
|
||||
mkdir ./bin/config/input_configs
|
||||
curl -fsSL 'https://raw.githubusercontent.com/gabomdq/SDL_GameControllerDB/master/gamecontrollerdb.txt' 1> ./bin/config/input_configs/gamecontrollerdb.txt
|
||||
curl -fsSL 'https://rpcs3.net/compatibility?api=v1&export' | iconv -f ISO-8859-1 -t UTF-8 1> ./bin/GuiConfigs/compat_database.dat
|
||||
curl -fsSL 'https://api.rpcs3.net/config/?api=v1' | iconv -f ISO-8859-1 -t UTF-8 1> ./bin/GuiConfigs/config_database.dat
|
||||
|
||||
# Download translations
|
||||
mkdir -p ./bin/share/qt6/translations
|
||||
ZIP_URL=$(curl -fsSL --retry 3 --retry-delay 60 "https://api.github.com/repos/RPCS3/rpcs3_translations/releases/latest" \
|
||||
ZIP_URL=$(curl -fsSL "https://api.github.com/repos/RPCS3/rpcs3_translations/releases/latest" \
|
||||
| grep "browser_download_url" \
|
||||
| grep "RPCS3-languages.zip" \
|
||||
| cut -d '"' -f 4)
|
||||
@@ -36,7 +35,7 @@ if [ -z "$ZIP_URL" ]; then
|
||||
echo "Failed to find RPCS3-languages.zip in the latest release. Continuing without translations."
|
||||
else
|
||||
echo "Downloading translations from: $ZIP_URL"
|
||||
curl -fsSL --retry 3 --retry-delay 60 -o translations.zip "$ZIP_URL" || {
|
||||
curl -L -o translations.zip "$ZIP_URL" || {
|
||||
echo "Failed to download translations.zip. Continuing without translations."
|
||||
exit 0
|
||||
}
|
||||
|
||||
@@ -14,11 +14,10 @@ mkdir ./bin/config
|
||||
mkdir ./bin/config/input_configs
|
||||
curl -fsSL 'https://raw.githubusercontent.com/gabomdq/SDL_GameControllerDB/master/gamecontrollerdb.txt' 1> ./bin/config/input_configs/gamecontrollerdb.txt
|
||||
curl -fsSL 'https://rpcs3.net/compatibility?api=v1&export' | iconv -t UTF-8 1> ./bin/GuiConfigs/compat_database.dat
|
||||
curl -fsSL 'https://api.rpcs3.net/config/?api=v1' | iconv -t UTF-8 1> ./bin/GuiConfigs/config_database.dat
|
||||
|
||||
# Download translations
|
||||
mkdir -p ./bin/qt6/translations
|
||||
ZIP_URL=$(curl -fsSL --retry 3 --retry-delay 60 "https://api.github.com/repos/RPCS3/rpcs3_translations/releases/latest" \
|
||||
ZIP_URL=$(curl -fsSL "https://api.github.com/repos/RPCS3/rpcs3_translations/releases/latest" \
|
||||
| grep "browser_download_url" \
|
||||
| grep "RPCS3-languages.zip" \
|
||||
| cut -d '"' -f 4)
|
||||
@@ -26,7 +25,7 @@ if [ -z "$ZIP_URL" ]; then
|
||||
echo "Failed to find RPCS3-languages.zip in the latest release. Continuing without translations."
|
||||
else
|
||||
echo "Downloading translations from: $ZIP_URL"
|
||||
curl -fsSL --retry 3 --retry-delay 60 -o translations.zip "$ZIP_URL" || {
|
||||
curl -L -o translations.zip "$ZIP_URL" || {
|
||||
echo "Failed to download translations.zip. Continuing without translations."
|
||||
exit 0
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ sed -i '' 's/quarterly/latest/' /etc/pkg/FreeBSD.conf
|
||||
export ASSUME_ALWAYS_YES=true
|
||||
pkg info # debug
|
||||
|
||||
# WITH_LLVM and Clang compiler
|
||||
# WITH_LLVM
|
||||
pkg install "llvm$LLVM_COMPILER_VER"
|
||||
|
||||
# Mandatory dependencies (qtX-base is pulled via qtX-multimedia)
|
||||
|
||||
@@ -16,7 +16,7 @@ QT_MM_URL="${QT_HOST}${QT_PREFIX}addons.qtmultimedia.${QT_PREFIX_2}qtmultimedia$
|
||||
QT_SVG_URL="${QT_HOST}${QT_PREFIX}${QT_PREFIX_2}qtsvg${QT_SUFFIX}"
|
||||
QT_TRANSLATIONS_URL="${QT_HOST}${QT_PREFIX}${QT_PREFIX_2}qttranslations${QT_SUFFIX}"
|
||||
LLVMLIBS_URL="https://github.com/RPCS3/llvm-mirror/releases/download/custom-build-win-${LLVM_VER}/llvmlibs_mt.7z"
|
||||
VULKAN_SDK_URL="https://www.dropbox.com/scl/fi/olpvqk4346ig7i8btadk5/vulkansdk-windows-X64-${VULKAN_VER}.exe?rlkey=huvssch6sy904qkg8ti9p65br&st=pztptdin&dl=1"
|
||||
VULKAN_SDK_URL="https://www.dropbox.com/scl/fi/sjjh0fc4ld281pjbl2xzu/VulkanSDK-${VULKAN_VER}-Installer.exe?rlkey=f6wzc0lvms5vwkt2z3qabfv9d&dl=1"
|
||||
CCACHE_URL="https://github.com/ccache/ccache/releases/download/v4.12.3/ccache-4.12.3-windows-x86_64.zip"
|
||||
|
||||
DEP_URLS=" \
|
||||
@@ -88,7 +88,7 @@ for url in $DEP_URLS; do
|
||||
*qt*) checksum=$(curl -fL "${url}.sha1"); algo="sha1"; outDir="$QTDIR/" ;;
|
||||
*llvm*) checksum=$(curl -fL "${url}.sha256"); algo="sha256"; outDir="./build/lib_ext/Release-x64" ;;
|
||||
*ccache*) checksum=$CCACHE_SHA; algo="sha256"; outDir="$CCACHE_BIN_DIR" ;;
|
||||
*vulkansdk*)
|
||||
*Vulkan*)
|
||||
# Vulkan setup needs to be run in batch environment
|
||||
# Need to subshell this or else it doesn't wait
|
||||
download_and_verify "$url" "$VULKAN_SDK_SHA" "sha256" "$fileName"
|
||||
|
||||
@@ -7,7 +7,14 @@ body:
|
||||
attributes:
|
||||
value: |
|
||||
# Summary
|
||||
Please do not ask for help here, use the [RPCS3 Discord server](https://discord.gg/rpcs3) or the [RPCS3 Forum](https://forums.rpcs3.net/) instead.
|
||||
Please do not ask for help or report compatibility regressions here, use [RPCS3 Discord server](https://discord.gg/rpcs3) or [forums](https://forums.rpcs3.net/) instead.
|
||||
- type: textarea
|
||||
id: quick-summary
|
||||
attributes:
|
||||
label: Quick summary
|
||||
description: Please briefly describe what has stopped working correctly.
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: details
|
||||
attributes:
|
||||
@@ -19,29 +26,21 @@ body:
|
||||
attributes:
|
||||
value: |
|
||||
# Identify the regressed build
|
||||
Please provide the _exact_ build information that **introduced** the regression you're reporting (i.e. the first version where it happens).
|
||||
Please provide the _exact_ build (or commit) information that introduced the regression you're reporting.
|
||||
* Please see [How to find the build that caused a regression](https://wiki.rpcs3.net/index.php?title=Help:Using_different_versions_of_RPCS3#How_to_find_the_build_that_caused_a_regression.3F) in our wiki.
|
||||
* You can find the [History of RPCS3 builds](https://rpcs3.net/builds) here.
|
||||
* You can find [History of RPCS3 builds](https://rpcs3.net/compatibility?b) here.
|
||||
|
||||
Make sure you're running with settings as close to default as possible
|
||||
* **Do NOT enable any emulator game patches when reporting issues**
|
||||
* **Only change settings that are required for the game to work**
|
||||
* Only change settings that are required for the game to work
|
||||
- type: input
|
||||
id: last-good-build
|
||||
id: regressed-build
|
||||
attributes:
|
||||
label: Last working build
|
||||
description: Provide the _exact_ last working build. This needs to be the build right before the first broken build.
|
||||
label: Build with regression
|
||||
description: Provide _exact_ build (or commit) information that introduced the regression you're reporting.
|
||||
placeholder: v0.0.23-13948-31df99f7
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
id: first-bad-build
|
||||
attributes:
|
||||
label: First broken build
|
||||
description: Provide the _exact_ first broken build. This needs to be the build right after the last working build.
|
||||
placeholder: v0.0.23-13949-d1a46b49
|
||||
validations:
|
||||
required: true
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
@@ -57,25 +56,12 @@ body:
|
||||
- type: textarea
|
||||
id: logs
|
||||
attributes:
|
||||
label: Attach 3 log files
|
||||
label: Attach two log files
|
||||
description: |
|
||||
* A RPCS3 log file for the last working build
|
||||
* A RPCS3 log file for the first broken build
|
||||
* A RPCS3 log file for the latest master build (not required if latest master build is the first broken build)
|
||||
|
||||
Attach one file for the build with regression and another for a build that works.
|
||||
Drag & drop the files into this input field, or upload them to another service (f.ex. Dropbox, Mega) and provide a link.
|
||||
validations:
|
||||
required: true
|
||||
- type: dropdown
|
||||
id: require-log-files
|
||||
attributes:
|
||||
label: I have attached all 3 required log files
|
||||
options:
|
||||
- "Yes"
|
||||
- "No"
|
||||
default: 1
|
||||
validations:
|
||||
required: true
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
@@ -87,8 +73,8 @@ body:
|
||||
- type: textarea
|
||||
id: captures
|
||||
attributes:
|
||||
label: Attach the RSX (.rrc) or RenderDoc (.rdc) capture files for visual issues
|
||||
description: Compress your capture with .7z, .gz, etc. and attach it here, or upload it to another service (f.ex. Dropbox, Mega) and provide a link.
|
||||
label: Attach capture files for visual issues
|
||||
description: Compress your capture with 7z, Rar etc. and attach it here, or upload it to the cloud (Dropbox, Mega etc) and add a link to it.
|
||||
validations:
|
||||
required: false
|
||||
- type: textarea
|
||||
@@ -98,3 +84,10 @@ body:
|
||||
description: Provide information about your system, such as operating system, CPU and GPU model, GPU driver version and other information that describes your system configuration.
|
||||
validations:
|
||||
required: false
|
||||
- type: textarea
|
||||
id: other-details
|
||||
attributes:
|
||||
label: Other details
|
||||
description: Include anything else you deem to be important.
|
||||
validations:
|
||||
required: false
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
ports:
|
||||
- name: abseil
|
||||
- name: ccache
|
||||
- name: gtest
|
||||
- name: opencv4
|
||||
- name: sdl3
|
||||
- name: vulkan-headers
|
||||
- name: vulkan-loader
|
||||
- name: MoltenVK
|
||||
@@ -17,7 +17,7 @@ jobs:
|
||||
Windows_Build:
|
||||
if: github.event_name == 'workflow_dispatch'
|
||||
name: LLVM Windows (MSVC)
|
||||
runs-on: windows-2025-vs2026
|
||||
runs-on: windows-2025
|
||||
env:
|
||||
COMPILER: msvc
|
||||
CCACHE_SHA: '859141059ac950e1e8cd042c66f842f26b9e3a62a1669a69fe6ba180cb58bbdf'
|
||||
|
||||
@@ -1,51 +0,0 @@
|
||||
name: Label PRs
|
||||
|
||||
on:
|
||||
pull_request_target:
|
||||
types:
|
||||
- opened
|
||||
- edited
|
||||
|
||||
jobs:
|
||||
Label_PRs:
|
||||
name: Label from title and linked issues
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository == 'RPCS3/rpcs3'
|
||||
permissions:
|
||||
issues: read
|
||||
pull-requests: write
|
||||
steps:
|
||||
- name: Add labels from title and linked issues
|
||||
uses: actions/github-script@v9
|
||||
with:
|
||||
retries: 3
|
||||
script: |
|
||||
const AREAS = [
|
||||
'Build and CI', 'CLI', 'Filesystem', 'GUI', 'Input', 'ISO', 'Localization', 'Overlay', 'Render: Vulkan', 'RSX', 'Savestates',
|
||||
];
|
||||
|
||||
const {repository: {pullRequest: pull}} = await github.graphql(`
|
||||
query($owner: String!, $repo: String!, $number: Int!) {
|
||||
repository(owner: $owner, name: $repo) {
|
||||
pullRequest(number: $number) {
|
||||
labels(first: 100) { nodes { name } }
|
||||
closingIssuesReferences(first: 50) { nodes { labels(first: 100) { nodes { name } } } }
|
||||
timelineItems(itemTypes: [UNLABELED_EVENT], last: 100) { nodes { ... on UnlabeledEvent { label { name } } } }
|
||||
}
|
||||
}
|
||||
}`, {...context.repo, number: context.issue.number});
|
||||
|
||||
if (pull.labels.nodes.some(x => AREAS.includes(x.name)))
|
||||
return;
|
||||
|
||||
// Skip labels a maintainer removed
|
||||
const removed = pull.timelineItems.nodes.map(x => x.label.name);
|
||||
const fromTitle = /^rsx\b/i.test(context.payload.pull_request.title) ? ['RSX'] : [];
|
||||
const fromIssues = pull.closingIssuesReferences.nodes.flatMap(i => i.labels.nodes.map(x => x.name));
|
||||
const labels = [...new Set([...fromTitle, ...fromIssues])]
|
||||
.filter(name => AREAS.includes(name) && !removed.includes(name));
|
||||
|
||||
if (labels.length > 0) {
|
||||
console.log(`Adding labels: ${labels.join(', ')}`);
|
||||
await github.rest.issues.addLabels({...context.repo, issue_number: context.issue.number, labels});
|
||||
}
|
||||
@@ -22,95 +22,31 @@ env:
|
||||
BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ github.workspace }}/artifacts/
|
||||
|
||||
jobs:
|
||||
Clean_Code_Caches:
|
||||
name: Clean caches
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
actions: write
|
||||
contents: read
|
||||
pull-requests: read
|
||||
outputs:
|
||||
skip_ccache: ${{ steps.pr_labels.outputs.skip_ccache }}
|
||||
steps:
|
||||
- name: "Look for the 'CI: Disable Build Caches' label on the PR"
|
||||
id: pr_labels
|
||||
if: github.event_name == 'pull_request'
|
||||
continue-on-error: true
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: |
|
||||
# Query the live labels so adding the label and re-running all jobs works without a new push
|
||||
labels=$(gh api "repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}" --jq '.labels[].name' 2>/dev/null) \
|
||||
|| labels=$(jq -r '.pull_request.labels[]?.name' "$GITHUB_EVENT_PATH")
|
||||
echo "Labels: ${labels:-<none>}"
|
||||
skip=false
|
||||
if grep -qix 'ci: disable build caches' <<< "$labels"; then
|
||||
skip=true
|
||||
echo "Builds will not restore ccache because of the 'CI: Disable Build Caches' label." >> "$GITHUB_STEP_SUMMARY"
|
||||
fi
|
||||
echo "skip_ccache=$skip" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: "Look for the 'Shaders' or 'CI: Disable Build Caches' label on the merged PR"
|
||||
id: labels
|
||||
if: github.event_name == 'push' && github.repository == 'RPCS3/rpcs3' && github.ref_name == 'master'
|
||||
continue-on-error: true
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: |
|
||||
found=false
|
||||
for sha in $(jq -r '[.after, (.commits[]?.id)] | map(select(. != null)) | unique[]' "$GITHUB_EVENT_PATH"); do
|
||||
labels=$(gh api "repos/${{ github.repository }}/commits/$sha/pulls" --jq '.[].labels[].name' 2>/dev/null || true)
|
||||
echo "$sha: ${labels:-<no associated PR>}"
|
||||
if grep -qixE 'shaders|ci: disable build caches' <<< "$labels"; then
|
||||
found=true
|
||||
fi
|
||||
done
|
||||
echo "clean=$found" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Remove all code caches
|
||||
if: steps.labels.outputs.clean == 'true'
|
||||
continue-on-error: true
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: |
|
||||
gh api --paginate "repos/${{ github.repository }}/actions/caches?per_page=100" \
|
||||
--jq '.actions_caches[] | select(.key | contains("-ccache-")) | "\(.id)\t\(.key)"' > code_caches.tsv
|
||||
if [ ! -s code_caches.tsv ]; then
|
||||
echo "No code caches to remove."
|
||||
exit 0
|
||||
fi
|
||||
while IFS=$'\t' read -r id key; do
|
||||
echo "Removing $key (id $id)"
|
||||
gh api -X DELETE "repos/${{ github.repository }}/actions/caches/$id" --silent
|
||||
done < code_caches.tsv
|
||||
echo "Removed $(wc -l < code_caches.tsv) code cache(s) after merging a 'Shaders' or 'CI: Disable Build Caches' PR." >> "$GITHUB_STEP_SUMMARY"
|
||||
|
||||
Linux_Build:
|
||||
# Only run push event on master branch of main repo, but run all PRs
|
||||
needs: Clean_Code_Caches
|
||||
if: github.event_name != 'push' || (github.repository == 'RPCS3/rpcs3' && github.ref_name == 'master')
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- os: ubuntu-24.04
|
||||
docker_img: "rpcs3/rpcs3-ci-jammy:2.1"
|
||||
docker_img: "rpcs3/rpcs3-ci-jammy:1.10"
|
||||
build_sh: "/rpcs3/.ci/build-linux.sh"
|
||||
compiler: clang
|
||||
UPLOAD_COMMIT_HASH: d812f1254a1157c80fd402f94446310560f54e5f
|
||||
UPLOAD_REPO_FULL_NAME: "rpcs3/rpcs3-binaries-linux"
|
||||
- os: ubuntu-24.04
|
||||
docker_img: "rpcs3/rpcs3-ci-jammy:2.1"
|
||||
docker_img: "rpcs3/rpcs3-ci-jammy:1.10"
|
||||
build_sh: "/rpcs3/.ci/build-linux.sh"
|
||||
compiler: gcc
|
||||
- os: ubuntu-24.04-arm
|
||||
docker_img: "rpcs3/rpcs3-ci-jammy-aarch64:2.1"
|
||||
docker_img: "rpcs3/rpcs3-ci-jammy-aarch64:1.10"
|
||||
build_sh: "/rpcs3/.ci/build-linux-aarch64.sh"
|
||||
compiler: clang
|
||||
UPLOAD_COMMIT_HASH: a1d35836e8d45bfc6f63c26f0a3e5d46ef622fe1
|
||||
UPLOAD_REPO_FULL_NAME: "rpcs3/rpcs3-binaries-linux-arm64"
|
||||
- os: ubuntu-24.04-arm
|
||||
docker_img: "rpcs3/rpcs3-ci-jammy-aarch64:2.1"
|
||||
docker_img: "rpcs3/rpcs3-ci-jammy-aarch64:1.10"
|
||||
build_sh: "/rpcs3/.ci/build-linux-aarch64.sh"
|
||||
compiler: gcc
|
||||
name: RPCS3 Linux ${{ matrix.os }} ${{ matrix.compiler }}
|
||||
@@ -132,7 +68,6 @@ jobs:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Restore build Ccache
|
||||
if: needs.Clean_Code_Caches.outputs.skip_ccache != 'true'
|
||||
uses: actions/cache/restore@main
|
||||
id: restore-build-ccache
|
||||
with:
|
||||
@@ -182,44 +117,38 @@ jobs:
|
||||
|
||||
Mac_Build:
|
||||
# Only run push event on master branch of main repo, but run all PRs
|
||||
needs: Clean_Code_Caches
|
||||
if: github.event_name != 'push' || (github.repository == 'RPCS3/rpcs3' && github.ref_name == 'master')
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- name: Intel
|
||||
runs-on: macos-15-intel
|
||||
AARCH64: 0
|
||||
UPLOAD_COMMIT_HASH: 51ae32f468089a8169aaf1567de355ff4a3e0842
|
||||
UPLOAD_REPO_FULL_NAME: rpcs3/rpcs3-binaries-mac
|
||||
- name: Apple Silicon
|
||||
runs-on: macos-15
|
||||
AARCH64: 1
|
||||
UPLOAD_COMMIT_HASH: 8e21bdbc40711a3fccd18fbf17b742348b0f4281
|
||||
UPLOAD_REPO_FULL_NAME: rpcs3/rpcs3-binaries-mac-arm64
|
||||
name: RPCS3 Mac ${{ matrix.name }}
|
||||
runs-on: ${{ matrix.runs-on }}
|
||||
runs-on: macos-14
|
||||
env:
|
||||
CCACHE_DIR: /tmp/ccache_dir
|
||||
QT_VER: '6.12.0'
|
||||
QT_VER: '6.11.0'
|
||||
QT_VER_MAIN: '6'
|
||||
LLVM_COMPILER_VER: '22'
|
||||
LLVM_COMPILER_VER: '21'
|
||||
RELEASE_MESSAGE: ../GitHubReleaseMessage.txt
|
||||
UPLOAD_COMMIT_HASH: ${{ matrix.UPLOAD_COMMIT_HASH }}
|
||||
UPLOAD_REPO_FULL_NAME: ${{ matrix.UPLOAD_REPO_FULL_NAME }}
|
||||
AARCH64: ${{ matrix.AARCH64 }}
|
||||
RUN_UNIT_TESTS: github.event_name == 'pull_request' && 'ON' || 'OFF'
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@main
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup MacPorts
|
||||
uses: melusina-org/setup-macports@v1
|
||||
with:
|
||||
cache: 'disable'
|
||||
|
||||
- name: Restore Build Ccache
|
||||
if: needs.Clean_Code_Caches.outputs.skip_ccache != 'true'
|
||||
uses: actions/cache/restore@main
|
||||
id: restore-build-ccache
|
||||
with:
|
||||
@@ -278,30 +207,26 @@ jobs:
|
||||
|
||||
Windows_Build:
|
||||
# Only run push event on master branch of main repo, but run all PRs
|
||||
needs: Clean_Code_Caches
|
||||
if: github.event_name != 'push' || (github.repository == 'RPCS3/rpcs3' && github.ref_name == 'master')
|
||||
name: RPCS3 Windows
|
||||
runs-on: windows-2025-vs2026
|
||||
runs-on: windows-2025
|
||||
env:
|
||||
COMPILER: msvc
|
||||
QT_VER_MAIN: '6'
|
||||
QT_VER: '6.12.0'
|
||||
QT_VER: '6.11.0'
|
||||
QT_VER_MSVC: 'msvc2022'
|
||||
QT_DATE: '202609280346'
|
||||
LLVM_VER: '22.1.8'
|
||||
VULKAN_VER: '1.4.341.1'
|
||||
VULKAN_SDK_SHA: 'bcf2d75aa9556889ab974858666e20b3655b6055a0db704ccb47279ff33b5bfe'
|
||||
QT_DATE: '202603180535'
|
||||
LLVM_VER: '19.1.7'
|
||||
VULKAN_VER: '1.3.268.0'
|
||||
VULKAN_SDK_SHA: '8459ef49bd06b697115ddd3d97c9aec729e849cd775f5be70897718a9b3b9db5'
|
||||
CCACHE_SHA: '859141059ac950e1e8cd042c66f842f26b9e3a62a1669a69fe6ba180cb58bbdf'
|
||||
CCACHE_BIN_DIR: 'C:\ccache_bin'
|
||||
CCACHE_DIR: 'C:\ccache'
|
||||
CCACHE_INODECACHE: 'true'
|
||||
CCACHE_SLOPPINESS: 'time_macros'
|
||||
CCACHE_MAXSIZE: '7G'
|
||||
CCACHE_LAUNCH_ARGS: '-DCMAKE_C_COMPILER_LAUNCHER=C:\ccache_bin\ccache.exe -DCMAKE_CXX_COMPILER_LAUNCHER=C:\ccache_bin\ccache.exe'
|
||||
DEPS_CACHE_DIR: ./dependency_cache
|
||||
UPLOAD_COMMIT_HASH: 7d09e3be30805911226241afbb14f8cdc2eb054e
|
||||
UPLOAD_REPO_FULL_NAME: "RPCS3/rpcs3-binaries-win"
|
||||
SKIP_RPCS3_TEST: 'true'
|
||||
steps:
|
||||
|
||||
- name: Checkout repository
|
||||
@@ -310,7 +235,7 @@ jobs:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup NuGet
|
||||
uses: nuget/setup-nuget@v4
|
||||
uses: nuget/setup-nuget@v2
|
||||
|
||||
- name: Restore NuGet packages
|
||||
run: nuget restore rpcs3.sln
|
||||
@@ -325,132 +250,6 @@ jobs:
|
||||
run: .ci/get_keys-windows.sh
|
||||
|
||||
- name: Restore Build Ccache
|
||||
if: needs.Clean_Code_Caches.outputs.skip_ccache != 'true'
|
||||
uses: actions/cache/restore@main
|
||||
id: restore-build-ccache
|
||||
with:
|
||||
path: ${{ env.CCACHE_DIR }}
|
||||
key: "${{ runner.os }}-ccache-${{ env.COMPILER }}-${{github.run_id}}"
|
||||
restore-keys: ${{ runner.os }}-ccache-${{ env.COMPILER }}-
|
||||
|
||||
- name: Restore Dependencies Cache
|
||||
uses: actions/cache/restore@main
|
||||
id: restore-dependencies-cache
|
||||
with:
|
||||
path: ${{ env.DEPS_CACHE_DIR }}
|
||||
key: "${{ runner.os }}-${{ env.COMPILER }}-${{ env.QT_VER }}-${{ env.VULKAN_SDK_SHA }}-${{ env.CCACHE_SHA }}-${{ hashFiles('llvm.lock') }}"
|
||||
restore-keys: ${{ runner.os }}-${{ env.COMPILER }}-
|
||||
|
||||
- name: Download and unpack dependencies
|
||||
run: |
|
||||
.ci/setup-windows.sh
|
||||
.ci/setup-windows-ci-vars.sh win64 msvc
|
||||
|
||||
- name: Export Variables
|
||||
run: |
|
||||
while IFS='=' read -r key val; do
|
||||
# Skip lines that are empty or start with '#'
|
||||
[[ -z "$key" || "$key" =~ ^# ]] && continue
|
||||
echo "$key=$val" >> "${{ github.env }}"
|
||||
done < .ci/ci-vars.env
|
||||
|
||||
- name: Add msbuild to PATH
|
||||
uses: microsoft/setup-msbuild@main
|
||||
|
||||
- name: Compile RPCS3
|
||||
shell: pwsh
|
||||
run: msbuild rpcs3.sln /p:Configuration=Release /v:minimal /p:Platform=x64 /p:PreferredToolArchitecture=x64 /p:CLToolPath=${{ env.CCACHE_BIN_DIR }} /p:UseMultiToolTask=true /p:CustomAfterMicrosoftCommonTargets="${{ github.workspace }}\buildfiles\msvc\ci_only.targets"
|
||||
|
||||
- name: Pack up build artifacts
|
||||
run: |
|
||||
mkdir -p "${{ env.BUILD_ARTIFACTSTAGINGDIRECTORY }}"
|
||||
.ci/deploy-windows.sh
|
||||
|
||||
- name: Upload artifacts (7z)
|
||||
uses: actions/upload-artifact@main
|
||||
with:
|
||||
name: RPCS3 for Windows (MSVC)
|
||||
path: ${{ env.BUILD_ARTIFACTSTAGINGDIRECTORY }}
|
||||
compression-level: 0
|
||||
if-no-files-found: error
|
||||
|
||||
- name: Deploy master build to GitHub Releases
|
||||
if: |
|
||||
github.event_name != 'pull_request' &&
|
||||
github.repository == 'RPCS3/rpcs3' &&
|
||||
github.ref == 'refs/heads/master'
|
||||
env:
|
||||
RPCS3_TOKEN: ${{ secrets.RPCS3_TOKEN }}
|
||||
run: .ci/github-upload.sh
|
||||
|
||||
- name: Show ccache stats
|
||||
if: github.ref == 'refs/heads/master'
|
||||
run: ccache --show-stats --verbose
|
||||
|
||||
- name: Save Build Ccache
|
||||
if: github.ref == 'refs/heads/master'
|
||||
uses: actions/cache/save@main
|
||||
with:
|
||||
path: ${{ env.CCACHE_DIR }}
|
||||
key: ${{ steps.restore-build-ccache.outputs.cache-primary-key }}
|
||||
|
||||
- name: Save Dependencies Cache
|
||||
if: github.ref == 'refs/heads/master'
|
||||
uses: actions/cache/save@main
|
||||
with:
|
||||
path: ${{ env.DEPS_CACHE_DIR }}
|
||||
key: ${{ steps.restore-dependencies-cache.outputs.cache-primary-key }}
|
||||
|
||||
Windows_Build_Test:
|
||||
# Only run push event on master branch of main repo, but run all PRs
|
||||
needs: Clean_Code_Caches
|
||||
if: github.event_name != 'push' || (github.repository == 'RPCS3/rpcs3' && github.ref_name == 'master')
|
||||
name: RPCS3 Windows Unit Test
|
||||
runs-on: windows-2025-vs2026
|
||||
env:
|
||||
COMPILER: msvc
|
||||
QT_VER_MAIN: '6'
|
||||
QT_VER: '6.12.0'
|
||||
QT_VER_MSVC: 'msvc2022'
|
||||
QT_DATE: '202609280346'
|
||||
LLVM_VER: '22.1.8'
|
||||
VULKAN_VER: '1.4.341.1'
|
||||
VULKAN_SDK_SHA: 'bcf2d75aa9556889ab974858666e20b3655b6055a0db704ccb47279ff33b5bfe'
|
||||
CCACHE_SHA: '859141059ac950e1e8cd042c66f842f26b9e3a62a1669a69fe6ba180cb58bbdf'
|
||||
CCACHE_BIN_DIR: 'C:\ccache_bin'
|
||||
CCACHE_DIR: 'C:\ccache'
|
||||
CCACHE_INODECACHE: 'true'
|
||||
CCACHE_SLOPPINESS: 'time_macros'
|
||||
CCACHE_MAXSIZE: '7G'
|
||||
CCACHE_LAUNCH_ARGS: '-DCMAKE_C_COMPILER_LAUNCHER=C:\ccache_bin\ccache.exe -DCMAKE_CXX_COMPILER_LAUNCHER=C:\ccache_bin\ccache.exe'
|
||||
DEPS_CACHE_DIR: ./dependency_cache
|
||||
UPLOAD_COMMIT_HASH: 7d09e3be30805911226241afbb14f8cdc2eb054e
|
||||
UPLOAD_REPO_FULL_NAME: "RPCS3/rpcs3-binaries-win"
|
||||
SKIP_RPCS3_EXE: 'true'
|
||||
steps:
|
||||
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@main
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup NuGet
|
||||
uses: nuget/setup-nuget@v4
|
||||
|
||||
- name: Restore NuGet packages
|
||||
run: nuget restore rpcs3.sln
|
||||
|
||||
- name: Setup env
|
||||
shell: pwsh
|
||||
run: |
|
||||
echo "QTDIR=C:\Qt\${{ env.QT_VER }}\${{ env.QT_VER_MSVC }}_64" >> ${{ github.env }}
|
||||
echo "VULKAN_SDK=C:\VulkanSDK\${{ env.VULKAN_VER }}" >> ${{ github.env }}
|
||||
|
||||
- name: Get Cache Keys
|
||||
run: .ci/get_keys-windows.sh
|
||||
|
||||
- name: Restore Build Ccache
|
||||
if: needs.Clean_Code_Caches.outputs.skip_ccache != 'true'
|
||||
uses: actions/cache/restore@main
|
||||
id: restore-build-ccache
|
||||
with:
|
||||
@@ -491,9 +290,44 @@ jobs:
|
||||
shell: pwsh
|
||||
run: build\lib\Release-x64\rpcs3_test.exe
|
||||
|
||||
- name: Pack up build artifacts
|
||||
run: |
|
||||
mkdir -p "${{ env.BUILD_ARTIFACTSTAGINGDIRECTORY }}"
|
||||
.ci/deploy-windows.sh
|
||||
|
||||
- name: Upload artifacts (7z)
|
||||
uses: actions/upload-artifact@main
|
||||
with:
|
||||
name: RPCS3 for Windows (MSVC)
|
||||
path: ${{ env.BUILD_ARTIFACTSTAGINGDIRECTORY }}
|
||||
compression-level: 0
|
||||
if-no-files-found: error
|
||||
|
||||
- name: Deploy master build to GitHub Releases
|
||||
if: |
|
||||
github.event_name != 'pull_request' &&
|
||||
github.repository == 'RPCS3/rpcs3' &&
|
||||
github.ref == 'refs/heads/master'
|
||||
env:
|
||||
RPCS3_TOKEN: ${{ secrets.RPCS3_TOKEN }}
|
||||
run: .ci/github-upload.sh
|
||||
|
||||
- name: Save Build Ccache
|
||||
if: github.ref == 'refs/heads/master'
|
||||
uses: actions/cache/save@main
|
||||
with:
|
||||
path: ${{ env.CCACHE_DIR }}
|
||||
key: ${{ steps.restore-build-ccache.outputs.cache-primary-key }}
|
||||
|
||||
- name: Save Dependencies Cache
|
||||
if: github.ref == 'refs/heads/master'
|
||||
uses: actions/cache/save@main
|
||||
with:
|
||||
path: ${{ env.DEPS_CACHE_DIR }}
|
||||
key: ${{ steps.restore-dependencies-cache.outputs.cache-primary-key }}
|
||||
|
||||
Windows_Build_Clang:
|
||||
# Only run push event on master branch of main repo, but run all PRs
|
||||
needs: Clean_Code_Caches
|
||||
if: github.event_name != 'push' || (github.repository == 'RPCS3/rpcs3' && github.ref_name == 'master')
|
||||
strategy:
|
||||
fail-fast: false
|
||||
@@ -553,7 +387,6 @@ jobs:
|
||||
p7zip
|
||||
|
||||
- name: Restore build Ccache
|
||||
if: needs.Clean_Code_Caches.outputs.skip_ccache != 'true'
|
||||
uses: actions/cache/restore@main
|
||||
id: restore-build-ccache
|
||||
with:
|
||||
@@ -604,7 +437,6 @@ jobs:
|
||||
|
||||
FreeBSD_Build:
|
||||
# Only run push event on master branch of main repo, but run all PRs
|
||||
needs: Clean_Code_Caches
|
||||
if: github.event_name != 'push' || (github.repository == 'RPCS3/rpcs3' && github.ref_name == 'master')
|
||||
name: RPCS3 FreeBSD
|
||||
runs-on: ubuntu-latest
|
||||
@@ -612,10 +444,10 @@ jobs:
|
||||
env:
|
||||
CCACHE_DIR: ${{ github.workspace }}/ccache
|
||||
QT_VER_MAIN: '6'
|
||||
LLVM_COMPILER_VER: '22'
|
||||
LLVM_CONFIG: 'llvm-config22'
|
||||
CC: 'clang22'
|
||||
CXX: 'clang++22'
|
||||
LLVM_COMPILER_VER: '-devel'
|
||||
CC: 'clang-devel'
|
||||
CXX: 'clang++-devel'
|
||||
LLVM_CONFIG: 'llvm-config-devel'
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
@@ -624,7 +456,6 @@ jobs:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Restore Build Ccache
|
||||
if: needs.Clean_Code_Caches.outputs.skip_ccache != 'true'
|
||||
uses: actions/cache/restore@main
|
||||
id: restore-build-ccache
|
||||
with:
|
||||
@@ -639,7 +470,7 @@ jobs:
|
||||
envs: 'QT_VER_MAIN LLVM_COMPILER_VER CCACHE_DIR CC CXX LLVM_CONFIG'
|
||||
usesh: true
|
||||
copyback: false
|
||||
release: "14.5"
|
||||
release: "14.3"
|
||||
run: .ci/install-freebsd.sh && .ci/build-freebsd.sh
|
||||
|
||||
- name: Save Build Ccache
|
||||
|
||||
@@ -126,6 +126,3 @@ CMakeUserPresets.json
|
||||
|
||||
.cache/
|
||||
.lldbinit
|
||||
|
||||
# claude
|
||||
CLAUDE.md
|
||||
|
||||
@@ -49,57 +49,16 @@
|
||||
<PropertyGroup Label="UserMacros">
|
||||
<CmakeReleaseCLI>call vsdevcmd.bat -arch=amd64
|
||||
cd "$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)"
|
||||
if not defined CCACHE_LAUNCH_ARGS set CCACHE_LAUNCH_ARGS=
|
||||
cmake -G Ninja ^
|
||||
-DCMAKE_CXX_COMPILER="cl.exe" ^
|
||||
-DCMAKE_C_COMPILER="cl.exe" ^
|
||||
%25CCACHE_LAUNCH_ARGS%25 ^
|
||||
-DCMAKE_BUILD_TYPE="Release" ^
|
||||
-DCMAKE_INSTALL_PREFIX="./Release" ^
|
||||
-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded ^
|
||||
-DCMAKE_SYSTEM_VERSION=10.0 ^
|
||||
-DLIBTYPE=STATIC ^
|
||||
-DFORCE_STATIC_VCRT=true ^
|
||||
-DALSOFT_UTILS=false ^
|
||||
-DALSOFT_EXAMPLES=false ^
|
||||
-DALSOFT_INSTALL=false ^
|
||||
-DALSOFT_INSTALL_CONFIG=false ^
|
||||
-DALSOFT_INSTALL_HRTF_DATA=false ^
|
||||
-DALSOFT_INSTALL_AMBDEC_PRESETS=false ^
|
||||
-DALSOFT_INSTALL_EXAMPLES=false ^
|
||||
-DALSOFT_INSTALL_UTILS=false ^
|
||||
"$(SolutionDir)3rdparty\OpenAL\openal-soft"
|
||||
cmake -G Ninja -DCMAKE_CXX_COMPILER="cl.exe" -DCMAKE_C_COMPILER="cl.exe" -DCMAKE_BUILD_TYPE="Release" -DCMAKE_INSTALL_PREFIX="./Release" -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded -DCMAKE_SYSTEM_VERSION=10.0 -DLIBTYPE=STATIC -DFORCE_STATIC_VCRT=true -DALSOFT_UTILS=false -DALSOFT_EXAMPLES=false -DALSOFT_INSTALL=false -DALSOFT_INSTALL_CONFIG=false -DALSOFT_INSTALL_HRTF_DATA=false -DALSOFT_INSTALL_AMBDEC_PRESETS=false -DALSOFT_INSTALL_EXAMPLES=false -DALSOFT_INSTALL_UTILS=false "$(SolutionDir)3rdparty\OpenAL\openal-soft"
|
||||
</CmakeReleaseCLI>
|
||||
<CmakeDebugCLI>call vsdevcmd.bat -arch=amd64
|
||||
cd "$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)"
|
||||
if not defined CCACHE_LAUNCH_ARGS set CCACHE_LAUNCH_ARGS=
|
||||
cmake -G Ninja ^
|
||||
-DCMAKE_CXX_COMPILER="cl.exe" ^
|
||||
-DCMAKE_C_COMPILER="cl.exe" ^
|
||||
%25CCACHE_LAUNCH_ARGS%25 ^
|
||||
-DCMAKE_BUILD_TYPE="Debug" ^
|
||||
-DCMAKE_INSTALL_PREFIX="./Debug" ^
|
||||
-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDebug ^
|
||||
-DCMAKE_SYSTEM_VERSION=10.0 ^
|
||||
-DALSOFT_UTILS=false ^
|
||||
-DALSOFT_EXAMPLES=false ^
|
||||
-DALSOFT_INSTALL=false ^
|
||||
-DALSOFT_INSTALL_CONFIG=false ^
|
||||
-DALSOFT_INSTALL_HRTF_DATA=false ^
|
||||
-DALSOFT_INSTALL_AMBDEC_PRESETS=false ^
|
||||
-DALSOFT_INSTALL_EXAMPLES=false ^
|
||||
-DALSOFT_INSTALL_UTILS=false ^
|
||||
"$(SolutionDir)3rdparty\OpenAL\openal-soft"
|
||||
cmake -G Ninja -DCMAKE_CXX_COMPILER="cl.exe" -DCMAKE_C_COMPILER="cl.exe" -DCMAKE_BUILD_TYPE="Debug" -DCMAKE_INSTALL_PREFIX="./Debug" -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDebug -DCMAKE_SYSTEM_VERSION=10.0 -DLIBTYPE=STATIC -DALSOFT_UTILS=false -DALSOFT_EXAMPLES=false -DALSOFT_INSTALL=false -DALSOFT_INSTALL_CONFIG=false -DALSOFT_INSTALL_HRTF_DATA=false -DALSOFT_INSTALL_AMBDEC_PRESETS=false -DALSOFT_INSTALL_EXAMPLES=false -DALSOFT_INSTALL_UTILS=false "$(SolutionDir)3rdparty\OpenAL\openal-soft"
|
||||
</CmakeDebugCLI>
|
||||
<CmakeCopyCLI>
|
||||
echo Copying..
|
||||
copy "$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)\OpenAL32.lib" "$(SolutionDir)build\lib\$(Configuration)-$(Platform)"
|
||||
</CmakeCopyCLI>
|
||||
<CmakeCopyDebugCLI>
|
||||
echo Copying..
|
||||
copy "$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)\OpenAL32.lib" "$(SolutionDir)build\lib\$(Configuration)-$(Platform)"
|
||||
copy "$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)\OpenAL32.dll" "$(SolutionDir)bin"
|
||||
</CmakeCopyDebugCLI>
|
||||
<CmakeCleanCLI>
|
||||
echo Cleaning..
|
||||
del "$(SolutionDir)build\lib\$(Configuration)-$(Platform)\OpenAL32.lib"
|
||||
@@ -112,13 +71,13 @@
|
||||
<NMakeBuildCommandLine>
|
||||
$(CmakeDebugCLI)
|
||||
ninja
|
||||
$(CmakeCopyDebugCLI)
|
||||
$(CmakeCopyCLI)
|
||||
</NMakeBuildCommandLine>
|
||||
<NMakeReBuildCommandLine>
|
||||
$(CmakeCleanCLI)
|
||||
$(CmakeDebugCLI)
|
||||
ninja
|
||||
$(CmakeCopyDebugCLI)
|
||||
$(CmakeCopyCLI)
|
||||
</NMakeReBuildCommandLine>
|
||||
<NMakeCleanCommandLine>
|
||||
$(CmakeCleanCLI)
|
||||
|
||||
@@ -7,24 +7,24 @@ if(USE_SYSTEM_CURL)
|
||||
target_link_libraries(3rdparty_libcurl INTERFACE CURL::libcurl)
|
||||
else()
|
||||
message(STATUS "RPCS3: building libcurl + wolfssl submodules")
|
||||
set(BUILD_CURL_EXE OFF CACHE INTERNAL "")
|
||||
set(BUILD_STATIC_CURL OFF CACHE INTERNAL "")
|
||||
set(BUILD_STATIC_LIBS ON CACHE INTERNAL "")
|
||||
set(BUILD_SHARED_LIBS OFF CACHE INTERNAL "")
|
||||
set(BUILD_CURL_EXE OFF CACHE BOOL "Set to ON to build curl executable.")
|
||||
set(BUILD_STATIC_CURL OFF CACHE BOOL "Set to ON to build curl executable with static libcurl.")
|
||||
set(BUILD_STATIC_LIBS ON CACHE BOOL "Set to ON to build static libcurl.")
|
||||
set(BUILD_SHARED_LIBS OFF CACHE BOOL "Set to ON to build shared libcurl.")
|
||||
find_package(WolfSSL REQUIRED)
|
||||
set(CURL_USE_WOLFSSL ON CACHE INTERNAL "")
|
||||
set(CURL_USE_OPENSSL OFF CACHE INTERNAL "")
|
||||
set(HTTP_ONLY ON CACHE INTERNAL "")
|
||||
set(USE_LIBIDN2 OFF CACHE INTERNAL "") # Disabled because MacOS CI doesn't work otherwise
|
||||
set(CURL_CA_PATH "none" CACHE INTERNAL "")
|
||||
set(CURL_DISABLE_INSTALL ON CACHE INTERNAL "")
|
||||
set(CURL_USE_WOLFSSL ON CACHE BOOL "enable wolfSSL for SSL/TLS")
|
||||
set(CURL_USE_OPENSSL OFF CACHE BOOL "Use OpenSSL code. Experimental")
|
||||
set(HTTP_ONLY ON CACHE BOOL "disables all protocols except HTTP (This overrides all CURL_DISABLE_* options)")
|
||||
set(USE_LIBIDN2 OFF CACHE BOOL "Use libidn2 for IDN support") # Disabled because MacOS CI doesn't work otherwise
|
||||
set(CURL_CA_PATH "none" CACHE STRING "Location of default CA path. Set 'none' to disable or 'auto' for auto-detection. Defaults to 'auto'.")
|
||||
option(CURL_DISABLE_INSTALL "Disable installation targets" ON)
|
||||
if(WIN32)
|
||||
set(ENABLE_UNICODE ON CACHE INTERNAL "")
|
||||
set(ENABLE_UNICODE ON CACHE BOOL "enable Unicode")
|
||||
endif()
|
||||
set(CURL_USE_LIBSSH2 OFF CACHE INTERNAL "")
|
||||
set(CURL_USE_LIBPSL OFF CACHE INTERNAL "")
|
||||
set(BUILD_TESTING OFF CACHE INTERNAL "")
|
||||
set(BUILD_EXAMPLES OFF CACHE INTERNAL "")
|
||||
set(CURL_USE_LIBSSH2 OFF CACHE BOOL "Use libSSH2")
|
||||
set(CURL_USE_LIBPSL OFF CACHE BOOL "Use libPSL")
|
||||
option(BUILD_TESTING "Build tests" OFF)
|
||||
option(BUILD_EXAMPLES "Build libcurl examples" OFF)
|
||||
|
||||
add_subdirectory(curl EXCLUDE_FROM_ALL)
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
@@ -11,20 +11,16 @@
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<Keyword>MakeFileProj</Keyword>
|
||||
<ProjectGuid>{DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}</ProjectGuid>
|
||||
<RootNamespace>libcurl</RootNamespace>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(SolutionDir)\buildfiles\msvc\common_default.props" />
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<Import Project="$(SolutionDir)\buildfiles\msvc\common_default_macros.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Makefile</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Makefile</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PropertyGroup Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<PropertyGroup>
|
||||
@@ -35,119 +31,408 @@
|
||||
<ImportGroup Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros">
|
||||
<CmakeReleaseCLI>call vsdevcmd.bat -arch=amd64
|
||||
cd "$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)"
|
||||
if not defined CCACHE_LAUNCH_ARGS set CCACHE_LAUNCH_ARGS=
|
||||
cmake -G Ninja ^
|
||||
-DCMAKE_CXX_COMPILER="cl.exe" ^
|
||||
-DCMAKE_C_COMPILER="cl.exe" ^
|
||||
%25CCACHE_LAUNCH_ARGS%25 ^
|
||||
-DCMAKE_BUILD_TYPE="Release" ^
|
||||
-DCMAKE_INSTALL_PREFIX="./Release" ^
|
||||
-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded ^
|
||||
-DCMAKE_SYSTEM_VERSION=10.0 ^
|
||||
-DBUILD_SHARED_LIBS=OFF ^
|
||||
-DBUILD_CURL_EXE=OFF ^
|
||||
-DBUILD_TESTING=OFF ^
|
||||
-DCURL_USE_WOLFSSL=ON ^
|
||||
-DCURL_USE_IPV6=ON ^
|
||||
-DCURL_USE_SCHANNEL=OFF ^
|
||||
-DCURL_USE_OPENSSL=OFF ^
|
||||
-DCURL_USE_LIBPSL=OFF ^
|
||||
-DCURL_ZLIB=OFF ^
|
||||
-DCURL_ZSTD=OFF ^
|
||||
-DCURL_USE_LIBSSH2=OFF ^
|
||||
-DCMAKE_C_FLAGS="/DWOLFSSL_ALT_CERT_CHAINS /DHAVE_SNI /DNO_MD4 /DWOLFSSL_USER_SETTINGS /DUSE_IPV6 /I\"$(SolutionDir)3rdparty\curl\extra\" /I\"$(SolutionDir)3rdparty\wolfssl\wolfssl\" /I\"$(SolutionDir)3rdparty\wolfssl\wolfssl\wolfssl\" /I\"$(SolutionDir)3rdparty\wolfssl\extra\win32\"" ^
|
||||
-DCMAKE_C_FLAGS_RELEASE="/O2 /Ob1 /GF /Gy" ^
|
||||
-DWOLFSSL_INCLUDE_DIR="$(SolutionDir)3rdparty\wolfssl\wolfssl" ^
|
||||
-DWOLFSSL_LIBRARY="$(SolutionDir)build\lib\$(Configuration)-$(Platform)\wolfssl.lib" ^
|
||||
"$(SolutionDir)3rdparty\curl\curl"
|
||||
</CmakeReleaseCLI>
|
||||
<CmakeDebugCLI>call vsdevcmd.bat -arch=amd64
|
||||
cd "$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)"
|
||||
if not defined CCACHE_LAUNCH_ARGS set CCACHE_LAUNCH_ARGS=
|
||||
cmake -G Ninja ^
|
||||
-DCMAKE_CXX_COMPILER="cl.exe" ^
|
||||
-DCMAKE_C_COMPILER="cl.exe" ^
|
||||
%25CCACHE_LAUNCH_ARGS%25 ^
|
||||
-DCMAKE_BUILD_TYPE="Debug" ^
|
||||
-DCMAKE_INSTALL_PREFIX="./Debug" ^
|
||||
-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDebug ^
|
||||
-DCMAKE_SYSTEM_VERSION=10.0 ^
|
||||
-DBUILD_SHARED_LIBS=OFF ^
|
||||
-DBUILD_CURL_EXE=OFF ^
|
||||
-DBUILD_TESTING=OFF ^
|
||||
-DCURL_USE_WOLFSSL=ON ^
|
||||
-DCURL_USE_IPV6=ON ^
|
||||
-DCURL_USE_SCHANNEL=OFF ^
|
||||
-DCURL_USE_OPENSSL=OFF ^
|
||||
-DCURL_USE_LIBPSL=OFF ^
|
||||
-DCURL_ZLIB=OFF ^
|
||||
-DCURL_USE_LIBSSH2=OFF ^
|
||||
-DCMAKE_C_FLAGS="/DWOLFSSL_ALT_CERT_CHAINS /DHAVE_SNI /DNO_MD4 /DWOLFSSL_USER_SETTINGS /DUSE_IPV6 /I\"$(SolutionDir)3rdparty\curl\extra\" /I\"$(SolutionDir)3rdparty\wolfssl\wolfssl\" /I\"$(SolutionDir)3rdparty\wolfssl\wolfssl\wolfssl\" /I\"$(SolutionDir)3rdparty\wolfssl\extra\win32\"" ^
|
||||
-DCMAKE_C_FLAGS_DEBUG="/Od /Ob0 /GF /Gy" ^
|
||||
-DWOLFSSL_INCLUDE_DIR="$(SolutionDir)3rdparty\wolfssl\wolfssl" ^
|
||||
-DWOLFSSL_LIBRARY="$(SolutionDir)build\lib\$(Configuration)-$(Platform)\wolfssl.lib" ^
|
||||
"$(SolutionDir)3rdparty\curl\curl"
|
||||
</CmakeDebugCLI>
|
||||
<CmakeCopyCLI>
|
||||
echo Copying..
|
||||
copy "$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)\lib\libcurl.lib" "$(SolutionDir)build\lib\$(Configuration)-$(Platform)"
|
||||
</CmakeCopyCLI>
|
||||
<CmakeCopyDebugCLI>
|
||||
echo Copying..
|
||||
copy "$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)\lib\libcurl-d.lib" "$(SolutionDir)build\lib\$(Configuration)-$(Platform)"
|
||||
</CmakeCopyDebugCLI>
|
||||
<CmakeCleanCLI>
|
||||
echo Cleaning..
|
||||
del "$(SolutionDir)build\lib\$(Configuration)-$(Platform)\libcurl.lib"
|
||||
rmdir /s /q "$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)"
|
||||
</CmakeCleanCLI>
|
||||
<CmakeCleanDebugCLI>
|
||||
echo Cleaning..
|
||||
del "$(SolutionDir)build\lib\$(Configuration)-$(Platform)\libcurl-d.lib"
|
||||
rmdir /s /q "$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)"
|
||||
</CmakeCleanDebugCLI>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||
<OutDir>$(SolutionDir)build\lib\$(Configuration)-$(Platform)\</OutDir>
|
||||
<IntDir>$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)\</IntDir>
|
||||
<NMakeBuildCommandLine>
|
||||
$(CmakeDebugCLI)
|
||||
ninja
|
||||
$(CmakeCopyDebugCLI)
|
||||
</NMakeBuildCommandLine>
|
||||
<NMakeReBuildCommandLine>
|
||||
$(CmakeCleanDebugCLI)
|
||||
$(CmakeDebugCLI)
|
||||
ninja
|
||||
$(CmakeCopyDebugCLI)
|
||||
</NMakeReBuildCommandLine>
|
||||
<NMakeCleanCommandLine>
|
||||
$(CmakeCleanDebugCLI)
|
||||
</NMakeCleanCommandLine>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<OutDir>$(SolutionDir)build\lib\$(Configuration)-$(Platform)\</OutDir>
|
||||
<IntDir>$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)\</IntDir>
|
||||
<NMakeBuildCommandLine>
|
||||
$(CmakeReleaseCLI)
|
||||
ninja
|
||||
$(CmakeCopyCLI)
|
||||
</NMakeBuildCommandLine>
|
||||
<NMakeReBuildCommandLine>
|
||||
$(CmakeCleanCLI)
|
||||
$(CmakeReleaseCLI)
|
||||
ninja
|
||||
$(CmakeCopyCLI)
|
||||
</NMakeReBuildCommandLine>
|
||||
<NMakeCleanCommandLine>
|
||||
$(CmakeCleanCLI)
|
||||
</NMakeCleanCommandLine>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup>
|
||||
<Midl>
|
||||
<TargetEnvironment>X64</TargetEnvironment>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>curl\include;curl\lib;extra;$(SolutionDir)3rdparty\wolfssl\wolfssl\wolfssl;$(SolutionDir)3rdparty\wolfssl\wolfssl;$(SolutionDir)3rdparty\wolfssl\extra\win32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WOLFSSL_ALT_CERT_CHAINS;HAVE_SNI;NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WOLFSSL;NO_MD4;WOLFSSL_USER_SETTINGS;USE_IPV6;SIZEOF_LONG=4;SIZEOF_LONG_LONG=8;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<WarningLevel>TurnOffAllWarnings</WarningLevel>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Culture>0x0409</Culture>
|
||||
</ResourceCompile>
|
||||
<Lib>
|
||||
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="curl\lib\altsvc.c" />
|
||||
<ClCompile Include="curl\lib\amigaos.c" />
|
||||
<ClCompile Include="curl\lib\asyn-ares.c" />
|
||||
<ClCompile Include="curl\lib\asyn-base.c" />
|
||||
<ClCompile Include="curl\lib\asyn-thrdd.c" />
|
||||
<ClCompile Include="curl\lib\bufq.c" />
|
||||
<ClCompile Include="curl\lib\bufref.c" />
|
||||
<ClCompile Include="curl\lib\cf-h1-proxy.c" />
|
||||
<ClCompile Include="curl\lib\cf-h2-proxy.c" />
|
||||
<ClCompile Include="curl\lib\cf-haproxy.c" />
|
||||
<ClCompile Include="curl\lib\cf-https-connect.c" />
|
||||
<ClCompile Include="curl\lib\cf-ip-happy.c" />
|
||||
<ClCompile Include="curl\lib\cf-socket.c" />
|
||||
<ClCompile Include="curl\lib\cfilters.c" />
|
||||
<ClCompile Include="curl\lib\conncache.c" />
|
||||
<ClCompile Include="curl\lib\connect.c" />
|
||||
<ClCompile Include="curl\lib\content_encoding.c" />
|
||||
<ClCompile Include="curl\lib\cookie.c" />
|
||||
<ClCompile Include="curl\lib\cshutdn.c" />
|
||||
<ClCompile Include="curl\lib\curlx\base64.c" />
|
||||
<ClCompile Include="curl\lib\curlx\basename.c" />
|
||||
<ClCompile Include="curl\lib\curlx\dynbuf.c" />
|
||||
<ClCompile Include="curl\lib\curlx\fopen.c" />
|
||||
<ClCompile Include="curl\lib\curlx\inet_ntop.c" />
|
||||
<ClCompile Include="curl\lib\curlx\inet_pton.c" />
|
||||
<ClCompile Include="curl\lib\curlx\multibyte.c" />
|
||||
<ClCompile Include="curl\lib\curlx\nonblock.c" />
|
||||
<ClCompile Include="curl\lib\curlx\snprintf.c" />
|
||||
<ClCompile Include="curl\lib\curlx\strcopy.c" />
|
||||
<ClCompile Include="curl\lib\curlx\strdup.c" />
|
||||
<ClCompile Include="curl\lib\curlx\strerr.c" />
|
||||
<ClCompile Include="curl\lib\curlx\strparse.c" />
|
||||
<ClCompile Include="curl\lib\curlx\timediff.c" />
|
||||
<ClCompile Include="curl\lib\curlx\timeval.c" />
|
||||
<ClCompile Include="curl\lib\curlx\version_win32.c" />
|
||||
<ClCompile Include="curl\lib\curlx\wait.c" />
|
||||
<ClCompile Include="curl\lib\curlx\warnless.c" />
|
||||
<ClCompile Include="curl\lib\curlx\winapi.c" />
|
||||
<ClCompile Include="curl\lib\curl_addrinfo.c" />
|
||||
<ClCompile Include="curl\lib\curl_endian.c" />
|
||||
<ClCompile Include="curl\lib\curl_fnmatch.c" />
|
||||
<ClCompile Include="curl\lib\curl_fopen.c" />
|
||||
<ClCompile Include="curl\lib\curl_gethostname.c" />
|
||||
<ClCompile Include="curl\lib\curl_get_line.c" />
|
||||
<ClCompile Include="curl\lib\curl_gssapi.c" />
|
||||
<ClCompile Include="curl\lib\curl_memrchr.c" />
|
||||
<ClCompile Include="curl\lib\curl_ntlm_core.c" />
|
||||
<ClCompile Include="curl\lib\curl_range.c" />
|
||||
<ClCompile Include="curl\lib\curl_rtmp.c" />
|
||||
<ClCompile Include="curl\lib\curl_sasl.c" />
|
||||
<ClCompile Include="curl\lib\curl_sha512_256.c" />
|
||||
<ClCompile Include="curl\lib\curl_share.c" />
|
||||
<ClCompile Include="curl\lib\curl_sspi.c" />
|
||||
<ClCompile Include="curl\lib\curl_threads.c" />
|
||||
<ClCompile Include="curl\lib\curl_trc.c" />
|
||||
<ClCompile Include="curl\lib\cw-out.c" />
|
||||
<ClCompile Include="curl\lib\cw-pause.c" />
|
||||
<ClCompile Include="curl\lib\dict.c" />
|
||||
<ClCompile Include="curl\lib\dllmain.c" />
|
||||
<ClCompile Include="curl\lib\doh.c" />
|
||||
<ClCompile Include="curl\lib\dynhds.c" />
|
||||
<ClCompile Include="curl\lib\easy.c" />
|
||||
<ClCompile Include="curl\lib\easygetopt.c" />
|
||||
<ClCompile Include="curl\lib\easyoptions.c" />
|
||||
<ClCompile Include="curl\lib\escape.c" />
|
||||
<ClCompile Include="curl\lib\fake_addrinfo.c" />
|
||||
<ClCompile Include="curl\lib\file.c" />
|
||||
<ClCompile Include="curl\lib\fileinfo.c" />
|
||||
<ClCompile Include="curl\lib\formdata.c" />
|
||||
<ClCompile Include="curl\lib\ftp.c" />
|
||||
<ClCompile Include="curl\lib\ftplistparser.c" />
|
||||
<ClCompile Include="curl\lib\getenv.c" />
|
||||
<ClCompile Include="curl\lib\getinfo.c" />
|
||||
<ClCompile Include="curl\lib\gopher.c" />
|
||||
<ClCompile Include="curl\lib\hash.c" />
|
||||
<ClCompile Include="curl\lib\headers.c" />
|
||||
<ClCompile Include="curl\lib\hmac.c" />
|
||||
<ClCompile Include="curl\lib\hostip.c" />
|
||||
<ClCompile Include="curl\lib\hostip4.c" />
|
||||
<ClCompile Include="curl\lib\hostip6.c" />
|
||||
<ClCompile Include="curl\lib\hsts.c" />
|
||||
<ClCompile Include="curl\lib\http.c" />
|
||||
<ClCompile Include="curl\lib\http1.c" />
|
||||
<ClCompile Include="curl\lib\http2.c" />
|
||||
<ClCompile Include="curl\lib\httpsrr.c" />
|
||||
<ClCompile Include="curl\lib\http_aws_sigv4.c" />
|
||||
<ClCompile Include="curl\lib\http_chunks.c" />
|
||||
<ClCompile Include="curl\lib\http_digest.c" />
|
||||
<ClCompile Include="curl\lib\http_negotiate.c" />
|
||||
<ClCompile Include="curl\lib\http_ntlm.c" />
|
||||
<ClCompile Include="curl\lib\http_proxy.c" />
|
||||
<ClCompile Include="curl\lib\idn.c" />
|
||||
<ClCompile Include="curl\lib\if2ip.c" />
|
||||
<ClCompile Include="curl\lib\imap.c" />
|
||||
<ClCompile Include="curl\lib\ldap.c" />
|
||||
<ClCompile Include="curl\lib\llist.c" />
|
||||
<ClCompile Include="curl\lib\macos.c" />
|
||||
<ClCompile Include="curl\lib\md4.c" />
|
||||
<ClCompile Include="curl\lib\md5.c" />
|
||||
<ClCompile Include="curl\lib\memdebug.c" />
|
||||
<ClCompile Include="curl\lib\mime.c" />
|
||||
<ClCompile Include="curl\lib\mprintf.c" />
|
||||
<ClCompile Include="curl\lib\mqtt.c" />
|
||||
<ClCompile Include="curl\lib\multi.c" />
|
||||
<ClCompile Include="curl\lib\multi_ev.c" />
|
||||
<ClCompile Include="curl\lib\multi_ntfy.c" />
|
||||
<ClCompile Include="curl\lib\netrc.c" />
|
||||
<ClCompile Include="curl\lib\noproxy.c" />
|
||||
<ClCompile Include="curl\lib\openldap.c" />
|
||||
<ClCompile Include="curl\lib\parsedate.c" />
|
||||
<ClCompile Include="curl\lib\pingpong.c" />
|
||||
<ClCompile Include="curl\lib\pop3.c" />
|
||||
<ClCompile Include="curl\lib\progress.c" />
|
||||
<ClCompile Include="curl\lib\psl.c" />
|
||||
<ClCompile Include="curl\lib\rand.c" />
|
||||
<ClCompile Include="curl\lib\ratelimit.c" />
|
||||
<ClCompile Include="curl\lib\request.c" />
|
||||
<ClCompile Include="curl\lib\rtsp.c" />
|
||||
<ClCompile Include="curl\lib\select.c" />
|
||||
<ClCompile Include="curl\lib\sendf.c" />
|
||||
<ClCompile Include="curl\lib\setopt.c" />
|
||||
<ClCompile Include="curl\lib\sha256.c" />
|
||||
<ClCompile Include="curl\lib\slist.c" />
|
||||
<ClCompile Include="curl\lib\smb.c" />
|
||||
<ClCompile Include="curl\lib\smtp.c" />
|
||||
<ClCompile Include="curl\lib\socketpair.c" />
|
||||
<ClCompile Include="curl\lib\socks.c" />
|
||||
<ClCompile Include="curl\lib\socks_gssapi.c" />
|
||||
<ClCompile Include="curl\lib\socks_sspi.c" />
|
||||
<ClCompile Include="curl\lib\splay.c" />
|
||||
<ClCompile Include="curl\lib\strcase.c" />
|
||||
<ClCompile Include="curl\lib\strequal.c" />
|
||||
<ClCompile Include="curl\lib\strerror.c" />
|
||||
<ClCompile Include="curl\lib\system_win32.c" />
|
||||
<ClCompile Include="curl\lib\telnet.c" />
|
||||
<ClCompile Include="curl\lib\tftp.c" />
|
||||
<ClCompile Include="curl\lib\transfer.c" />
|
||||
<ClCompile Include="curl\lib\uint-bset.c" />
|
||||
<ClCompile Include="curl\lib\uint-hash.c" />
|
||||
<ClCompile Include="curl\lib\uint-spbset.c" />
|
||||
<ClCompile Include="curl\lib\uint-table.c" />
|
||||
<ClCompile Include="curl\lib\url.c" />
|
||||
<ClCompile Include="curl\lib\urlapi.c" />
|
||||
<ClCompile Include="curl\lib\vauth\gsasl.c" />
|
||||
<ClCompile Include="curl\lib\version.c" />
|
||||
<ClCompile Include="curl\lib\vquic\curl_ngtcp2.c" />
|
||||
<ClCompile Include="curl\lib\vquic\curl_quiche.c" />
|
||||
<ClCompile Include="curl\lib\vssh\vssh.c" />
|
||||
<ClCompile Include="curl\lib\vtls\apple.c" />
|
||||
<ClCompile Include="curl\lib\vtls\cipher_suite.c" />
|
||||
<ClCompile Include="curl\lib\vtls\hostcheck.c" />
|
||||
<ClCompile Include="curl\lib\vtls\rustls.c" />
|
||||
<ClCompile Include="curl\lib\vtls\vtls_scache.c" />
|
||||
<ClCompile Include="curl\lib\vtls\vtls_spack.c" />
|
||||
<ClCompile Include="curl\lib\vtls\x509asn1.c" />
|
||||
<ClCompile Include="curl\lib\vauth\cleartext.c" />
|
||||
<ClCompile Include="curl\lib\vauth\cram.c" />
|
||||
<ClCompile Include="curl\lib\vauth\digest.c" />
|
||||
<ClCompile Include="curl\lib\vauth\digest_sspi.c" />
|
||||
<ClCompile Include="curl\lib\vauth\krb5_gssapi.c" />
|
||||
<ClCompile Include="curl\lib\vauth\krb5_sspi.c" />
|
||||
<ClCompile Include="curl\lib\vauth\ntlm.c" />
|
||||
<ClCompile Include="curl\lib\vauth\ntlm_sspi.c" />
|
||||
<ClCompile Include="curl\lib\vauth\oauth2.c" />
|
||||
<ClCompile Include="curl\lib\vauth\spnego_gssapi.c" />
|
||||
<ClCompile Include="curl\lib\vauth\spnego_sspi.c" />
|
||||
<ClCompile Include="curl\lib\vauth\vauth.c" />
|
||||
<ClCompile Include="curl\lib\vquic\vquic.c" />
|
||||
<ClCompile Include="curl\lib\vssh\libssh.c" />
|
||||
<ClCompile Include="curl\lib\vssh\libssh2.c" />
|
||||
<ClCompile Include="curl\lib\vtls\gtls.c" />
|
||||
<ClCompile Include="curl\lib\vtls\keylog.c" />
|
||||
<ClCompile Include="curl\lib\vtls\mbedtls.c" />
|
||||
<ClCompile Include="curl\lib\vtls\openssl.c" />
|
||||
<ClCompile Include="curl\lib\vtls\schannel.c" />
|
||||
<ClCompile Include="curl\lib\vtls\schannel_verify.c" />
|
||||
<ClCompile Include="curl\lib\vtls\vtls.c" />
|
||||
<ClCompile Include="curl\lib\vtls\wolfssl.c" />
|
||||
<ClCompile Include="curl\lib\ws.c" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="curl\include\curl\curl.h" />
|
||||
<ClInclude Include="curl\include\curl\curlver.h" />
|
||||
<ClInclude Include="curl\include\curl\easy.h" />
|
||||
<ClInclude Include="curl\include\curl\mprintf.h" />
|
||||
<ClInclude Include="curl\include\curl\multi.h" />
|
||||
<ClInclude Include="curl\include\curl\stdcheaders.h" />
|
||||
<ClInclude Include="curl\include\curl\system.h" />
|
||||
<ClInclude Include="curl\include\curl\typecheck-gcc.h" />
|
||||
<ClInclude Include="curl\include\curl\urlapi.h" />
|
||||
<ClInclude Include="curl\lib\altsvc.h" />
|
||||
<ClInclude Include="curl\lib\amigaos.h" />
|
||||
<ClInclude Include="curl\lib\arpa_telnet.h" />
|
||||
<ClInclude Include="curl\lib\asyn.h" />
|
||||
<ClInclude Include="curl\lib\bufq.h" />
|
||||
<ClInclude Include="curl\lib\bufref.h" />
|
||||
<ClInclude Include="curl\lib\cf-h1-proxy.h" />
|
||||
<ClInclude Include="curl\lib\cf-h2-proxy.h" />
|
||||
<ClInclude Include="curl\lib\cf-haproxy.h" />
|
||||
<ClInclude Include="curl\lib\cf-https-connect.h" />
|
||||
<ClInclude Include="curl\lib\cf-ip-happy.h" />
|
||||
<ClInclude Include="curl\lib\cf-socket.h" />
|
||||
<ClInclude Include="curl\lib\cfilters.h" />
|
||||
<ClInclude Include="curl\lib\config-mac.h" />
|
||||
<ClInclude Include="curl\lib\config-os400.h" />
|
||||
<ClInclude Include="curl\lib\config-plan9.h" />
|
||||
<ClInclude Include="curl\lib\config-riscos.h" />
|
||||
<ClInclude Include="curl\lib\config-win32.h" />
|
||||
<ClInclude Include="curl\lib\conncache.h" />
|
||||
<ClInclude Include="curl\lib\connect.h" />
|
||||
<ClInclude Include="curl\lib\content_encoding.h" />
|
||||
<ClInclude Include="curl\lib\cookie.h" />
|
||||
<ClInclude Include="curl\lib\cshutdn.h" />
|
||||
<ClInclude Include="curl\lib\curlx\base64.h" />
|
||||
<ClInclude Include="curl\lib\curlx\basename.h" />
|
||||
<ClInclude Include="curl\lib\curlx\binmode.h" />
|
||||
<ClInclude Include="curl\lib\curlx\curlx.h" />
|
||||
<ClInclude Include="curl\lib\curlx\dynbuf.h" />
|
||||
<ClInclude Include="curl\lib\curlx\fopen.h" />
|
||||
<ClInclude Include="curl\lib\curlx\inet_ntop.h" />
|
||||
<ClInclude Include="curl\lib\curlx\inet_pton.h" />
|
||||
<ClInclude Include="curl\lib\curlx\multibyte.h" />
|
||||
<ClInclude Include="curl\lib\curlx\nonblock.h" />
|
||||
<ClInclude Include="curl\lib\curlx\snprintf.h" />
|
||||
<ClInclude Include="curl\lib\curlx\strcopy.h" />
|
||||
<ClInclude Include="curl\lib\curlx\strdup.h" />
|
||||
<ClInclude Include="curl\lib\curlx\strerr.h" />
|
||||
<ClInclude Include="curl\lib\curlx\strparse.h" />
|
||||
<ClInclude Include="curl\lib\curlx\timediff.h" />
|
||||
<ClInclude Include="curl\lib\curlx\timeval.h" />
|
||||
<ClInclude Include="curl\lib\curlx\version_win32.h" />
|
||||
<ClInclude Include="curl\lib\curlx\wait.h" />
|
||||
<ClInclude Include="curl\lib\curlx\warnless.h" />
|
||||
<ClInclude Include="curl\lib\curlx\winapi.h" />
|
||||
<ClInclude Include="curl\lib\curl_addrinfo.h" />
|
||||
<ClInclude Include="curl\lib\curl_ctype.h" />
|
||||
<ClInclude Include="curl\lib\curl_endian.h" />
|
||||
<ClInclude Include="curl\lib\curl_fnmatch.h" />
|
||||
<ClInclude Include="curl\lib\curl_fopen.h" />
|
||||
<ClInclude Include="curl\lib\curl_gethostname.h" />
|
||||
<ClInclude Include="curl\lib\curl_get_line.h" />
|
||||
<ClInclude Include="curl\lib\curl_gssapi.h" />
|
||||
<ClInclude Include="curl\lib\curl_hmac.h" />
|
||||
<ClInclude Include="curl\lib\curl_ldap.h" />
|
||||
<ClInclude Include="curl\lib\curl_md4.h" />
|
||||
<ClInclude Include="curl\lib\curl_md5.h" />
|
||||
<ClInclude Include="curl\lib\curl_memrchr.h" />
|
||||
<ClInclude Include="curl\lib\curl_ntlm_core.h" />
|
||||
<ClInclude Include="curl\lib\curl_printf.h" />
|
||||
<ClInclude Include="curl\lib\curl_range.h" />
|
||||
<ClInclude Include="curl\lib\curl_rtmp.h" />
|
||||
<ClInclude Include="curl\lib\curl_sasl.h" />
|
||||
<ClInclude Include="curl\lib\curl_setup.h" />
|
||||
<ClInclude Include="curl\lib\curl_setup_once.h" />
|
||||
<ClInclude Include="curl\lib\curl_sha256.h" />
|
||||
<ClInclude Include="curl\lib\curl_sha512_256.h" />
|
||||
<ClInclude Include="curl\lib\curl_share.h" />
|
||||
<ClInclude Include="curl\lib\curl_sspi.h" />
|
||||
<ClInclude Include="curl\lib\curl_threads.h" />
|
||||
<ClInclude Include="curl\lib\curl_trc.h" />
|
||||
<ClInclude Include="curl\lib\cw-out.h" />
|
||||
<ClInclude Include="curl\lib\cw-pause.h" />
|
||||
<ClInclude Include="curl\lib\dict.h" />
|
||||
<ClInclude Include="curl\lib\doh.h" />
|
||||
<ClInclude Include="curl\lib\dynhds.h" />
|
||||
<ClInclude Include="curl\lib\easyif.h" />
|
||||
<ClInclude Include="curl\lib\easyoptions.h" />
|
||||
<ClInclude Include="curl\lib\easy_lock.h" />
|
||||
<ClInclude Include="curl\lib\escape.h" />
|
||||
<ClInclude Include="curl\lib\fake_addrinfo.h" />
|
||||
<ClInclude Include="curl\lib\file.h" />
|
||||
<ClInclude Include="curl\lib\fileinfo.h" />
|
||||
<ClInclude Include="curl\lib\formdata.h" />
|
||||
<ClInclude Include="curl\lib\ftp.h" />
|
||||
<ClInclude Include="curl\lib\ftplistparser.h" />
|
||||
<ClInclude Include="curl\lib\functypes.h" />
|
||||
<ClInclude Include="curl\lib\getinfo.h" />
|
||||
<ClInclude Include="curl\lib\gopher.h" />
|
||||
<ClInclude Include="curl\lib\hash.h" />
|
||||
<ClInclude Include="curl\lib\headers.h" />
|
||||
<ClInclude Include="curl\lib\hostip.h" />
|
||||
<ClInclude Include="curl\lib\hsts.h" />
|
||||
<ClInclude Include="curl\lib\http.h" />
|
||||
<ClInclude Include="curl\lib\http1.h" />
|
||||
<ClInclude Include="curl\lib\http2.h" />
|
||||
<ClInclude Include="curl\lib\httpsrr.h" />
|
||||
<ClInclude Include="curl\lib\http_aws_sigv4.h" />
|
||||
<ClInclude Include="curl\lib\http_chunks.h" />
|
||||
<ClInclude Include="curl\lib\http_digest.h" />
|
||||
<ClInclude Include="curl\lib\http_negotiate.h" />
|
||||
<ClInclude Include="curl\lib\http_ntlm.h" />
|
||||
<ClInclude Include="curl\lib\http_proxy.h" />
|
||||
<ClInclude Include="curl\lib\idn.h" />
|
||||
<ClInclude Include="curl\lib\if2ip.h" />
|
||||
<ClInclude Include="curl\lib\imap.h" />
|
||||
<ClInclude Include="curl\lib\llist.h" />
|
||||
<ClInclude Include="curl\lib\macos.h" />
|
||||
<ClInclude Include="curl\lib\mime.h" />
|
||||
<ClInclude Include="curl\lib\mqtt.h" />
|
||||
<ClInclude Include="curl\lib\multihandle.h" />
|
||||
<ClInclude Include="curl\lib\multiif.h" />
|
||||
<ClInclude Include="curl\lib\multi_ev.h" />
|
||||
<ClInclude Include="curl\lib\multi_ntfy.h" />
|
||||
<ClInclude Include="curl\lib\netrc.h" />
|
||||
<ClInclude Include="curl\lib\noproxy.h" />
|
||||
<ClInclude Include="curl\lib\parsedate.h" />
|
||||
<ClInclude Include="curl\lib\pingpong.h" />
|
||||
<ClInclude Include="curl\lib\pop3.h" />
|
||||
<ClInclude Include="curl\lib\progress.h" />
|
||||
<ClInclude Include="curl\lib\psl.h" />
|
||||
<ClInclude Include="curl\lib\rand.h" />
|
||||
<ClInclude Include="curl\lib\ratelimit.h" />
|
||||
<ClInclude Include="curl\lib\request.h" />
|
||||
<ClInclude Include="curl\lib\rtsp.h" />
|
||||
<ClInclude Include="curl\lib\select.h" />
|
||||
<ClInclude Include="curl\lib\sendf.h" />
|
||||
<ClInclude Include="curl\lib\setopt.h" />
|
||||
<ClInclude Include="curl\lib\setup-os400.h" />
|
||||
<ClInclude Include="curl\lib\setup-vms.h" />
|
||||
<ClInclude Include="curl\lib\setup-win32.h" />
|
||||
<ClInclude Include="curl\lib\sigpipe.h" />
|
||||
<ClInclude Include="curl\lib\slist.h" />
|
||||
<ClInclude Include="curl\lib\smb.h" />
|
||||
<ClInclude Include="curl\lib\smtp.h" />
|
||||
<ClInclude Include="curl\lib\sockaddr.h" />
|
||||
<ClInclude Include="curl\lib\socketpair.h" />
|
||||
<ClInclude Include="curl\lib\socks.h" />
|
||||
<ClInclude Include="curl\lib\splay.h" />
|
||||
<ClInclude Include="curl\lib\strcase.h" />
|
||||
<ClInclude Include="curl\lib\strdup.h" />
|
||||
<ClInclude Include="curl\lib\strerror.h" />
|
||||
<ClInclude Include="curl\lib\strtok.h" />
|
||||
<ClInclude Include="curl\lib\strtoofft.h" />
|
||||
<ClInclude Include="curl\lib\system_win32.h" />
|
||||
<ClInclude Include="curl\lib\telnet.h" />
|
||||
<ClInclude Include="curl\lib\tftp.h" />
|
||||
<ClInclude Include="curl\lib\transfer.h" />
|
||||
<ClInclude Include="curl\lib\uint-bset.h" />
|
||||
<ClInclude Include="curl\lib\uint-hash.h" />
|
||||
<ClInclude Include="curl\lib\uint-spbset.h" />
|
||||
<ClInclude Include="curl\lib\uint-table.h" />
|
||||
<ClInclude Include="curl\lib\url.h" />
|
||||
<ClInclude Include="curl\lib\urlapi-int.h" />
|
||||
<ClInclude Include="curl\lib\urldata.h" />
|
||||
<ClInclude Include="curl\lib\vquic\curl_ngtcp2.h" />
|
||||
<ClInclude Include="curl\lib\vquic\curl_quiche.h" />
|
||||
<ClInclude Include="curl\lib\vquic\vquic_int.h" />
|
||||
<ClInclude Include="curl\lib\vssh\vssh.h" />
|
||||
<ClInclude Include="curl\lib\vtls\apple.h" />
|
||||
<ClInclude Include="curl\lib\vtls\cipher_suite.h" />
|
||||
<ClInclude Include="curl\lib\vtls\hostcheck.h" />
|
||||
<ClInclude Include="curl\lib\vtls\rustls.h" />
|
||||
<ClInclude Include="curl\lib\vtls\schannel_int.h" />
|
||||
<ClInclude Include="curl\lib\vtls\vtls_int.h" />
|
||||
<ClInclude Include="curl\lib\vtls\vtls_scache.h" />
|
||||
<ClInclude Include="curl\lib\vtls\vtls_spack.h" />
|
||||
<ClInclude Include="curl\lib\vtls\x509asn1.h" />
|
||||
<ClInclude Include="curl\lib\vauth\digest.h" />
|
||||
<ClInclude Include="curl\lib\vauth\ntlm.h" />
|
||||
<ClInclude Include="curl\lib\vauth\vauth.h" />
|
||||
<ClInclude Include="curl\lib\vquic\vquic.h" />
|
||||
<ClInclude Include="curl\lib\vssh\ssh.h" />
|
||||
<ClInclude Include="curl\lib\vtls\gtls.h" />
|
||||
<ClInclude Include="curl\lib\vtls\keylog.h" />
|
||||
<ClInclude Include="curl\lib\vtls\mbedtls.h" />
|
||||
<ClInclude Include="curl\lib\vtls\openssl.h" />
|
||||
<ClInclude Include="curl\lib\vtls\schannel.h" />
|
||||
<ClInclude Include="curl\lib\vtls\vtls.h" />
|
||||
<ClInclude Include="curl\lib\vtls\wolfssl.h" />
|
||||
<ClInclude Include="curl\lib\ws.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="curl\lib\libcurl.rc" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
|
||||
@@ -13,21 +13,17 @@
|
||||
<ItemGroup>
|
||||
<ClInclude Include="fusion\Fusion\Fusion.h" />
|
||||
<ClInclude Include="fusion\Fusion\FusionAhrs.h" />
|
||||
<ClInclude Include="fusion\Fusion\FusionBias.h" />
|
||||
<ClInclude Include="fusion\Fusion\FusionAxes.h" />
|
||||
<ClInclude Include="fusion\Fusion\FusionCalibration.h" />
|
||||
<ClInclude Include="fusion\Fusion\FusionCompass.h" />
|
||||
<ClInclude Include="fusion\Fusion\FusionConfig.h" />
|
||||
<ClInclude Include="fusion\Fusion\FusionConvention.h" />
|
||||
<ClInclude Include="fusion\Fusion\FusionInline.h" />
|
||||
<ClInclude Include="fusion\Fusion\FusionMath.h" />
|
||||
<ClInclude Include="fusion\Fusion\FusionModel.h" />
|
||||
<ClInclude Include="fusion\Fusion\FusionRemap.h" />
|
||||
<ClInclude Include="fusion\Fusion\FusionOffset.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="fusion\Fusion\FusionAhrs.c" />
|
||||
<ClCompile Include="fusion\Fusion\FusionBias.c" />
|
||||
<ClCompile Include="fusion\Fusion\FusionCompass.c" />
|
||||
<ClCompile Include="fusion\Fusion\FusionConvention.c" />
|
||||
<ClCompile Include="fusion\Fusion\FusionRemap.c" />
|
||||
<ClCompile Include="fusion\Fusion\FusionOffset.c" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<RootNamespace>Fusion</RootNamespace>
|
||||
|
||||
@@ -8,14 +8,12 @@
|
||||
<ItemGroup>
|
||||
<ClInclude Include="fusion\Fusion\Fusion.h" />
|
||||
<ClInclude Include="fusion\Fusion\FusionAhrs.h" />
|
||||
<ClInclude Include="fusion\Fusion\FusionAxes.h" />
|
||||
<ClInclude Include="fusion\Fusion\FusionCalibration.h" />
|
||||
<ClInclude Include="fusion\Fusion\FusionCompass.h" />
|
||||
<ClInclude Include="fusion\Fusion\FusionConvention.h" />
|
||||
<ClInclude Include="fusion\Fusion\FusionMath.h" />
|
||||
<ClInclude Include="fusion\Fusion\FusionBias.h" />
|
||||
<ClInclude Include="fusion\Fusion\FusionModel.h" />
|
||||
<ClInclude Include="fusion\Fusion\FusionRemap.h" />
|
||||
<ClInclude Include="fusion\Fusion\FusionConfig.h" />
|
||||
<ClInclude Include="fusion\Fusion\FusionInline.h" />
|
||||
<ClInclude Include="fusion\Fusion\FusionOffset.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="fusion\Fusion\FusionAhrs.c">
|
||||
@@ -24,13 +22,7 @@
|
||||
<ClCompile Include="fusion\Fusion\FusionCompass.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="fusion\Fusion\FusionBias.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="fusion\Fusion\FusionConvention.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="fusion\Fusion\FusionRemap.c">
|
||||
<ClCompile Include="fusion\Fusion\FusionOffset.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
|
||||
@@ -37,46 +37,19 @@
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros">
|
||||
<CmakeGenerator>"Visual Studio $(VisualStudioVersion.Substring(0,2))"</CmakeGenerator>
|
||||
<CmakeReleaseCLI>call vsdevcmd.bat -arch=amd64
|
||||
cd "$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)"
|
||||
if not defined CCACHE_LAUNCH_ARGS set CCACHE_LAUNCH_ARGS=
|
||||
cmake -G Ninja ^
|
||||
-DCMAKE_CXX_COMPILER="cl.exe" ^
|
||||
-DCMAKE_C_COMPILER="cl.exe" ^
|
||||
%25CCACHE_LAUNCH_ARGS%25 ^
|
||||
-DCMAKE_BUILD_TYPE="Release" ^
|
||||
-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded ^
|
||||
-DGLSLANG_TESTS=OFF ^
|
||||
-DENABLE_GLSLANG_BINARIES=OFF ^
|
||||
-DBUILD_EXTERNAL=OFF ^
|
||||
-DENABLE_SPVREMAPPER=OFF ^
|
||||
-DENABLE_HLSL=OFF ^
|
||||
-DENABLE_OPT=OFF ^
|
||||
-S "$(SolutionDir)3rdparty\glslang\glslang"
|
||||
cmake -G $(CmakeGenerator) -A x64 -DCMAKE_BUILD_TYPE="Release" -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded -DGLSLANG_TESTS=OFF -DENABLE_GLSLANG_BINARIES=OFF -DBUILD_EXTERNAL=OFF -DENABLE_SPVREMAPPER=OFF -DENABLE_HLSL=OFF -DENABLE_OPT=OFF -S glslang -B "$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)"
|
||||
</CmakeReleaseCLI>
|
||||
<CmakeDebugCLI>call vsdevcmd.bat -arch=amd64
|
||||
cd "$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)"
|
||||
if not defined CCACHE_LAUNCH_ARGS set CCACHE_LAUNCH_ARGS=
|
||||
cmake -G Ninja ^
|
||||
-DCMAKE_CXX_COMPILER="cl.exe" ^
|
||||
-DCMAKE_C_COMPILER="cl.exe" ^
|
||||
%25CCACHE_LAUNCH_ARGS%25 ^
|
||||
-DCMAKE_BUILD_TYPE="Debug" ^
|
||||
-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDebug ^
|
||||
-DGLSLANG_TESTS=OFF ^
|
||||
-DENABLE_GLSLANG_BINARIES=OFF ^
|
||||
-DBUILD_EXTERNAL=OFF ^
|
||||
-DENABLE_SPVREMAPPER=OFF ^
|
||||
-DENABLE_HLSL=OFF ^
|
||||
-DENABLE_OPT=OFF ^
|
||||
-S "$(SolutionDir)3rdparty\glslang\glslang"
|
||||
cmake -G $(CmakeGenerator) -A x64 -DCMAKE_BUILD_TYPE="Debug" -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDebug -DGLSLANG_TESTS=OFF -DENABLE_GLSLANG_BINARIES=OFF -DBUILD_EXTERNAL=OFF -DENABLE_SPVREMAPPER=OFF -DENABLE_HLSL=OFF -DENABLE_OPT=OFF -S glslang -B "$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)"
|
||||
</CmakeDebugCLI>
|
||||
<CmakeCopyCLI>
|
||||
echo Copying..
|
||||
mkdir "$(SolutionDir)build\lib\$(Configuration)-$(Platform)\$(ProjectName)"
|
||||
copy "$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)\SPIRV\*.lib" "$(SolutionDir)build\lib\$(Configuration)-$(Platform)\$(ProjectName)"
|
||||
copy "$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)\glslang\OSDependent\Windows\*.lib" "$(SolutionDir)build\lib\$(Configuration)-$(Platform)\$(ProjectName)"
|
||||
copy "$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)\glslang\*.lib" "$(SolutionDir)build\lib\$(Configuration)-$(Platform)\$(ProjectName)"
|
||||
copy "$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)\SPIRV\$(CONFIGURATION)\*.lib" "$(SolutionDir)build\lib\$(Configuration)-$(Platform)\$(ProjectName)"
|
||||
copy "$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)\glslang\OSDependent\Windows\$(CONFIGURATION)\*.lib" "$(SolutionDir)build\lib\$(Configuration)-$(Platform)\$(ProjectName)"
|
||||
copy "$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)\glslang\$(CONFIGURATION)\*.lib" "$(SolutionDir)build\lib\$(Configuration)-$(Platform)\$(ProjectName)"
|
||||
</CmakeCopyCLI>
|
||||
<CmakeCleanCLI>
|
||||
echo Cleaning..
|
||||
@@ -90,16 +63,17 @@
|
||||
<IntDir>$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)\</IntDir>
|
||||
<NMakeBuildCommandLine>
|
||||
$(CmakeReleaseCLI)
|
||||
ninja
|
||||
msbuild.exe "$(IntDir)\ALL_BUILD.vcxproj" /t:build /p:Configuration=Release /p:ForceImportBeforeCppTargets="$(PropsAbsPath)" /m
|
||||
$(CmakeCopyCLI)
|
||||
</NMakeBuildCommandLine>
|
||||
<NMakeReBuildCommandLine>
|
||||
$(CmakeCleanCLI)
|
||||
$(CmakeReleaseCLI)
|
||||
ninja
|
||||
msbuild.exe "$(IntDir)\ALL_BUILD.vcxproj" /t:rebuild /p:Configuration=Release /p:ForceImportBeforeCppTargets="$(PropsAbsPath)" /m
|
||||
$(CmakeCopyCLI)
|
||||
</NMakeReBuildCommandLine>
|
||||
<NMakeCleanCommandLine>
|
||||
$(CmakeReleaseCLI)
|
||||
msbuild.exe "$(IntDir)\ALL_BUILD.vcxproj" /t:clean /p:Configuration=Release /p:ForceImportBeforeCppTargets="$(PropsAbsPath)" /m
|
||||
$(CmakeCleanCLI)
|
||||
</NMakeCleanCommandLine>
|
||||
</PropertyGroup>
|
||||
@@ -108,16 +82,17 @@
|
||||
<IntDir>$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)\</IntDir>
|
||||
<NMakeBuildCommandLine>
|
||||
$(CmakeDebugCLI)
|
||||
ninja
|
||||
msbuild.exe "$(IntDir)\ALL_BUILD.vcxproj" /t:build /p:Configuration=Debug /p:ForceImportBeforeCppTargets="$(PropsAbsPath)" /m
|
||||
$(CmakeCopyCLI)
|
||||
</NMakeBuildCommandLine>
|
||||
<NMakeReBuildCommandLine>
|
||||
$(CmakeCleanCLI)
|
||||
$(CmakeDebugCLI)
|
||||
ninja
|
||||
msbuild.exe "$(IntDir)\ALL_BUILD.vcxproj" /t:rebuild /p:Configuration=Debug /p:ForceImportBeforeCppTargets="$(PropsAbsPath)" /m
|
||||
$(CmakeCopyCLI)
|
||||
</NMakeReBuildCommandLine>
|
||||
<NMakeCleanCommandLine>
|
||||
$(CmakeDebugCLI)
|
||||
msbuild.exe "$(IntDir)\ALL_BUILD.vcxproj" /t:clean /p:Configuration=Debug /p:ForceImportBeforeCppTargets="$(PropsAbsPath)" /m
|
||||
$(CmakeCleanCLI)
|
||||
</NMakeCleanCommandLine>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
|
||||
@@ -54,9 +54,6 @@
|
||||
<ClCompile Condition="'$(Configuration)'=='Release'">
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<ClCompile Condition="'$(EnableLibUsbWindowsHotplug)' == 'true'">
|
||||
<PreprocessorDefinitions>LIBUSB_WINDOWS_HOTPLUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Lib>
|
||||
<OutputFile>$(OutDir)libusb-1.0.lib</OutputFile>
|
||||
</Lib>
|
||||
@@ -67,7 +64,6 @@
|
||||
<ClCompile Include="libusb\libusb\hotplug.c" />
|
||||
<ClCompile Include="libusb\libusb\io.c" />
|
||||
<ClCompile Include="libusb\libusb\os\events_windows.c" />
|
||||
<ClCompile Condition="'$(EnableLibUsbWindowsHotplug)' == 'true'" Include="libusb\libusb\os\windows_hotplug.c" />
|
||||
<ClCompile Include="libusb\libusb\strerror.c" />
|
||||
<ClCompile Include="libusb\libusb\sync.c" />
|
||||
<ClCompile Include="libusb\libusb\os\threads_windows.c" />
|
||||
@@ -76,7 +72,6 @@
|
||||
<ClCompile Include="libusb\libusb\os\windows_winusb.c" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Condition="'$(EnableLibUsbWindowsHotplug)' == 'true'" Include="libusb\libusb\os\windows_hotplug.h" />
|
||||
<ClInclude Include="libusb\msvc\config.h" />
|
||||
<ClInclude Include="libusb\libusb\hotplug.h" />
|
||||
<ClInclude Include="libusb\libusb\libusb.h" />
|
||||
|
||||
@@ -51,7 +51,7 @@ if(WITH_LLVM)
|
||||
|
||||
set(STATIC_LINK_LLVM ON CACHE BOOL "Link against LLVM statically. This will get set to ON if you build LLVM from the submodule." FORCE)
|
||||
|
||||
find_package(LLVM 22.1 CONFIG)
|
||||
find_package(LLVM 19.1 CONFIG)
|
||||
if(NOT LLVM_FOUND)
|
||||
message(FATAL_ERROR "Couldn't build LLVM from the submodule. You might need to run `git submodule update --init`")
|
||||
endif()
|
||||
|
||||
@@ -40,65 +40,11 @@
|
||||
<PropertyGroup Label="UserMacros">
|
||||
<CmakeReleaseCLI>call vsdevcmd.bat -arch=amd64
|
||||
cd "$(SolutionDir)build\tmp\llvm_build-$(Configuration)-$(Platform)"
|
||||
cmake -G Ninja ^
|
||||
-DCMAKE_CXX_COMPILER="cl.exe" ^
|
||||
-DCMAKE_C_COMPILER="cl.exe" ^
|
||||
-DCMAKE_BUILD_TYPE="Release" ^
|
||||
-DCMAKE_INSTALL_PREFIX="$(SolutionDir)build\lib\$(Configuration)-$(Platform)\llvm_build" ^
|
||||
-DCMAKE_SYSTEM_VERSION=10.0 ^
|
||||
-DCMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION=$(WindowsTargetPlatformVersion) ^
|
||||
-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded ^
|
||||
-DLLVM_TARGETS_TO_BUILD=X86 ^
|
||||
-DLLVM_DEFAULT_TARGET_TRIPLE:STRING=x86_64-pc-windows-msvc ^
|
||||
-DLLVM_HOST_TRIPLE:STRING=x86_64-pc-windows-msvc ^
|
||||
-DLLVM_BUILD_RUNTIME=OFF ^
|
||||
-DLLVM_BUILD_TOOLS=OFF ^
|
||||
-DLLVM_BUILD_BENCHMARKS=OFF ^
|
||||
-DLLVM_BUILD_DOCS=OFF ^
|
||||
-DLLVM_BUILD_EXAMPLES=OFF ^
|
||||
-DLLVM_BUILD_TESTS=OFF ^
|
||||
-DLLVM_INCLUDE_TOOLS=OFF ^
|
||||
-DLLVM_INCLUDE_DOCS=OFF ^
|
||||
-DLLVM_INCLUDE_EXAMPLES=OFF ^
|
||||
-DLLVM_INCLUDE_TESTS=OFF ^
|
||||
-DLLVM_INCLUDE_BENCHMARKS=OFF ^
|
||||
-DLLVM_INCLUDE_UTILS=OFF ^
|
||||
-DLLVM_INSTALL_UTILS=OFF ^
|
||||
-DLLVM_ENABLE_DIA_SDK=OFF ^
|
||||
-DLLVM_ENABLE_PDB=OFF ^
|
||||
-DLLVM_USE_INTEL_JITEVENTS=ON ^
|
||||
"$(SolutionDir)3rdparty\llvm\llvm\llvm"
|
||||
cmake -G Ninja -DCMAKE_CXX_COMPILER="cl.exe" -DCMAKE_C_COMPILER="cl.exe" -DCMAKE_BUILD_TYPE="Release" -DCMAKE_INSTALL_PREFIX="$(SolutionDir)build\lib\$(Configuration)-$(Platform)\llvm_build" -DCMAKE_SYSTEM_VERSION=10.0 -DCMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION=$(WindowsTargetPlatformVersion) -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded -DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_DEFAULT_TARGET_TRIPLE:STRING=x86_64-pc-windows-msvc -DLLVM_HOST_TRIPLE:STRING=x86_64-pc-windows-msvc -DLLVM_BUILD_RUNTIME=OFF -DLLVM_BUILD_TOOLS=OFF -DLLVM_BUILD_BENCHMARKS=OFF -DLLVM_BUILD_DOCS=OFF -DLLVM_BUILD_EXAMPLES=OFF -DLLVM_BUILD_TESTS=OFF\ -DLLVM_INCLUDE_TOOLS=OFF -DLLVM_INCLUDE_DOCS=OFF -DLLVM_INCLUDE_EXAMPLES=OFF -DLLVM_INCLUDE_TESTS=OFF -DLLVM_INCLUDE_BENCHMARKS=OFF -DLLVM_INCLUDE_UTILS=OFF -DLLVM_INSTALL_UTILS=OFF -DLLVM_ENABLE_DIA_SDK=OFF -DLLVM_ENABLE_PDB=OFF -DLLVM_USE_INTEL_JITEVENTS=ON "$(SolutionDir)3rdparty\llvm\llvm\llvm"
|
||||
</CmakeReleaseCLI>
|
||||
<CmakeDebugCLI>call vsdevcmd.bat -arch=amd64
|
||||
cd "$(SolutionDir)build\tmp\llvm_build-$(Configuration)-$(Platform)"
|
||||
cmake -G Ninja ^
|
||||
-DCMAKE_CXX_COMPILER="cl.exe" ^
|
||||
-DCMAKE_C_COMPILER="cl.exe" ^
|
||||
-DCMAKE_BUILD_TYPE="Debug" ^
|
||||
-DCMAKE_INSTALL_PREFIX="$(SolutionDir)build\lib\$(Configuration)-$(Platform)\llvm_build" ^
|
||||
-DCMAKE_SYSTEM_VERSION=10.0 ^
|
||||
-DCMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION=$(WindowsTargetPlatformVersion) ^
|
||||
-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDebugDLL ^
|
||||
-DLLVM_TARGETS_TO_BUILD=X86 ^
|
||||
-DLLVM_DEFAULT_TARGET_TRIPLE:STRING=x86_64-pc-windows-msvc ^
|
||||
-DLLVM_HOST_TRIPLE:STRING=x86_64-pc-windows-msvc ^
|
||||
-DLLVM_BUILD_RUNTIME=OFF ^
|
||||
-DLLVM_BUILD_TOOLS=OFF ^
|
||||
-DLLVM_BUILD_BENCHMARKS=OFF ^
|
||||
-DLLVM_BUILD_DOCS=OFF ^
|
||||
-DLLVM_BUILD_EXAMPLES=OFF ^
|
||||
-DLLVM_BUILD_TESTS=OFF ^
|
||||
-DLLVM_INCLUDE_TOOLS=OFF ^
|
||||
-DLLVM_INCLUDE_DOCS=OFF ^
|
||||
-DLLVM_INCLUDE_EXAMPLES=OFF ^
|
||||
-DLLVM_INCLUDE_TESTS=OFF ^
|
||||
-DLLVM_INCLUDE_BENCHMARKS=OFF ^
|
||||
-DLLVM_INCLUDE_UTILS=OFF ^
|
||||
-DLLVM_INSTALL_UTILS=OFF ^
|
||||
-DLLVM_ENABLE_DIA_SDK=OFF ^
|
||||
-DLLVM_ENABLE_PDB=OFF ^
|
||||
-DLLVM_USE_INTEL_JITEVENTS=ON ^
|
||||
"$(SolutionDir)3rdparty\llvm\llvm\llvm"
|
||||
cmake -G Ninja -DCMAKE_CXX_COMPILER="cl.exe" -DCMAKE_C_COMPILER="cl.exe" -DCMAKE_BUILD_TYPE="Debug" -DCMAKE_INSTALL_PREFIX="$(SolutionDir)build\lib\$(Configuration)-$(Platform)\llvm_build" -DCMAKE_SYSTEM_VERSION=10.0 -DCMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION=$(WindowsTargetPlatformVersion) -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDebugDLL -DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_DEFAULT_TARGET_TRIPLE:STRING=x86_64-pc-windows-msvc -DLLVM_HOST_TRIPLE:STRING=x86_64-pc-windows-msvc -DLLVM_BUILD_RUNTIME=OFF -DLLVM_BUILD_TOOLS=OFF -DLLVM_BUILD_BENCHMARKS=OFF -DLLVM_BUILD_DOCS=OFF -DLLVM_BUILD_EXAMPLES=OFF -DLLVM_BUILD_TESTS=OFF\ -DLLVM_INCLUDE_TOOLS=OFF -DLLVM_INCLUDE_DOCS=OFF -DLLVM_INCLUDE_EXAMPLES=OFF -DLLVM_INCLUDE_TESTS=OFF -DLLVM_INCLUDE_BENCHMARKS=OFF -DLLVM_INCLUDE_UTILS=OFF -DLLVM_INSTALL_UTILS=OFF -DLLVM_ENABLE_DIA_SDK=OFF -DLLVM_ENABLE_PDB=OFF -DLLVM_USE_INTEL_JITEVENTS=ON "$(SolutionDir)3rdparty\llvm\llvm\llvm"
|
||||
</CmakeDebugCLI>
|
||||
<CmakeCleanCLI>
|
||||
echo Cleaning..
|
||||
|
||||
@@ -40,65 +40,11 @@
|
||||
<PropertyGroup Label="UserMacros">
|
||||
<CmakeReleaseCLI>call vsdevcmd.bat -arch=amd64
|
||||
cd "$(SolutionDir)build\tmp\llvm_build-$(Configuration)-$(Platform)"
|
||||
cmake -G Ninja ^
|
||||
-DCMAKE_CXX_COMPILER="clang-cl.exe" ^
|
||||
-DCMAKE_C_COMPILER="clang-cl.exe" ^
|
||||
-DCMAKE_BUILD_TYPE="Release" ^
|
||||
-DCMAKE_INSTALL_PREFIX="$(SolutionDir)build\lib\$(Configuration)-$(Platform)\llvm_build" ^
|
||||
-DCMAKE_SYSTEM_VERSION=10.0 ^
|
||||
-DCMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION=$(WindowsTargetPlatformVersion) ^
|
||||
-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded ^
|
||||
-DLLVM_TARGETS_TO_BUILD=X86 ^
|
||||
-DLLVM_DEFAULT_TARGET_TRIPLE:STRING=x86_64-pc-windows-msvc ^
|
||||
-DLLVM_HOST_TRIPLE:STRING=x86_64-pc-windows-msvc ^
|
||||
-DLLVM_BUILD_RUNTIME=OFF ^
|
||||
-DLLVM_BUILD_TOOLS=OFF ^
|
||||
-DLLVM_BUILD_BENCHMARKS=OFF ^
|
||||
-DLLVM_BUILD_DOCS=OFF ^
|
||||
-DLLVM_BUILD_EXAMPLES=OFF ^
|
||||
-DLLVM_BUILD_TESTS=OFF ^
|
||||
-DLLVM_INCLUDE_TOOLS=OFF ^
|
||||
-DLLVM_INCLUDE_DOCS=OFF ^
|
||||
-DLLVM_INCLUDE_EXAMPLES=OFF ^
|
||||
-DLLVM_INCLUDE_TESTS=OFF ^
|
||||
-DLLVM_INCLUDE_BENCHMARKS=OFF ^
|
||||
-DLLVM_INCLUDE_UTILS=OFF ^
|
||||
-DLLVM_INSTALL_UTILS=OFF ^
|
||||
-DLLVM_ENABLE_DIA_SDK=OFF ^
|
||||
-DLLVM_ENABLE_PDB=OFF ^
|
||||
-DLLVM_USE_INTEL_JITEVENTS=ON ^
|
||||
"$(SolutionDir)3rdparty\llvm\llvm\llvm"
|
||||
cmake -G Ninja -DCMAKE_CXX_COMPILER="clang-cl.exe" -DCMAKE_C_COMPILER="clang-cl.exe" -DCMAKE_BUILD_TYPE="Release" -DCMAKE_INSTALL_PREFIX="$(SolutionDir)build\lib\$(Configuration)-$(Platform)\llvm_build" -DCMAKE_SYSTEM_VERSION=10.0 -DCMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION=$(WindowsTargetPlatformVersion) -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded -DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_DEFAULT_TARGET_TRIPLE:STRING=x86_64-pc-windows-msvc -DLLVM_HOST_TRIPLE:STRING=x86_64-pc-windows-msvc -DLLVM_BUILD_RUNTIME=OFF -DLLVM_BUILD_TOOLS=OFF -DLLVM_BUILD_BENCHMARKS=OFF -DLLVM_BUILD_DOCS=OFF -DLLVM_BUILD_EXAMPLES=OFF -DLLVM_BUILD_TESTS=OFF\ -DLLVM_INCLUDE_TOOLS=OFF -DLLVM_INCLUDE_DOCS=OFF -DLLVM_INCLUDE_EXAMPLES=OFF -DLLVM_INCLUDE_TESTS=OFF -DLLVM_INCLUDE_BENCHMARKS=OFF -DLLVM_INCLUDE_UTILS=OFF -DLLVM_INSTALL_UTILS=OFF -DLLVM_ENABLE_DIA_SDK=OFF -DLLVM_ENABLE_PDB=OFF -DLLVM_USE_INTEL_JITEVENTS=ON "$(SolutionDir)3rdparty\llvm\llvm\llvm"
|
||||
</CmakeReleaseCLI>
|
||||
<CmakeDebugCLI>call vsdevcmd.bat -arch=amd64
|
||||
cd "$(SolutionDir)build\tmp\llvm_build-$(Configuration)-$(Platform)"
|
||||
cmake -G Ninja ^
|
||||
-DCMAKE_CXX_COMPILER="clang-cl.exe" ^
|
||||
-DCMAKE_C_COMPILER="clang-cl.exe" ^
|
||||
-DCMAKE_BUILD_TYPE="Debug" ^
|
||||
-DCMAKE_INSTALL_PREFIX="$(SolutionDir)build\lib\$(Configuration)-$(Platform)\llvm_build" ^
|
||||
-DCMAKE_SYSTEM_VERSION=10.0 ^
|
||||
-DCMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION=$(WindowsTargetPlatformVersion) ^
|
||||
-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDebugDLL ^
|
||||
-DLLVM_TARGETS_TO_BUILD=X86 ^
|
||||
-DLLVM_DEFAULT_TARGET_TRIPLE:STRING=x86_64-pc-windows-msvc ^
|
||||
-DLLVM_HOST_TRIPLE:STRING=x86_64-pc-windows-msvc ^
|
||||
-DLLVM_BUILD_RUNTIME=OFF ^
|
||||
-DLLVM_BUILD_TOOLS=OFF ^
|
||||
-DLLVM_BUILD_BENCHMARKS=OFF ^
|
||||
-DLLVM_BUILD_DOCS=OFF ^
|
||||
-DLLVM_BUILD_EXAMPLES=OFF ^
|
||||
-DLLVM_BUILD_TESTS=OFF ^
|
||||
-DLLVM_INCLUDE_TOOLS=OFF ^
|
||||
-DLLVM_INCLUDE_DOCS=OFF ^
|
||||
-DLLVM_INCLUDE_EXAMPLES=OFF ^
|
||||
-DLLVM_INCLUDE_TESTS=OFF ^
|
||||
-DLLVM_INCLUDE_BENCHMARKS=OFF ^
|
||||
-DLLVM_INCLUDE_UTILS=OFF ^
|
||||
-DLLVM_INSTALL_UTILS=OFF ^
|
||||
-DLLVM_ENABLE_DIA_SDK=OFF ^
|
||||
-DLLVM_ENABLE_PDB=OFF ^
|
||||
-DLLVM_USE_INTEL_JITEVENTS=ON ^
|
||||
"$(SolutionDir)3rdparty\llvm\llvm\llvm"
|
||||
cmake -G Ninja -DCMAKE_CXX_COMPILER="clang-cl.exe" -DCMAKE_C_COMPILER="clang-cl.exe" -DCMAKE_BUILD_TYPE="Debug" -DCMAKE_INSTALL_PREFIX="$(SolutionDir)build\lib\$(Configuration)-$(Platform)\llvm_build" -DCMAKE_SYSTEM_VERSION=10.0 -DCMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION=$(WindowsTargetPlatformVersion) -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDebugDLL -DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_DEFAULT_TARGET_TRIPLE:STRING=x86_64-pc-windows-msvc -DLLVM_HOST_TRIPLE:STRING=x86_64-pc-windows-msvc -DLLVM_BUILD_RUNTIME=OFF -DLLVM_BUILD_TOOLS=OFF -DLLVM_BUILD_BENCHMARKS=OFF -DLLVM_BUILD_DOCS=OFF -DLLVM_BUILD_EXAMPLES=OFF -DLLVM_BUILD_TESTS=OFF\ -DLLVM_INCLUDE_TOOLS=OFF -DLLVM_INCLUDE_DOCS=OFF -DLLVM_INCLUDE_EXAMPLES=OFF -DLLVM_INCLUDE_TESTS=OFF -DLLVM_INCLUDE_BENCHMARKS=OFF -DLLVM_INCLUDE_UTILS=OFF -DLLVM_INSTALL_UTILS=OFF -DLLVM_ENABLE_DIA_SDK=OFF -DLLVM_ENABLE_PDB=OFF -DLLVM_USE_INTEL_JITEVENTS=ON "$(SolutionDir)3rdparty\llvm\llvm\llvm"
|
||||
</CmakeDebugCLI>
|
||||
<CmakeCleanCLI>
|
||||
echo Cleaning..
|
||||
|
||||
@@ -56,63 +56,6 @@ namespace pine
|
||||
|
||||
typedef unsigned long long SOCKET;
|
||||
|
||||
#ifndef _WIN32
|
||||
inline std::string get_socket_path(std::string_view file_name, int slot, int default_slot)
|
||||
{
|
||||
#ifdef __APPLE__
|
||||
const char* runtime_dir = std::getenv("TMPDIR");
|
||||
#else
|
||||
const char* runtime_dir = std::getenv("XDG_RUNTIME_DIR");
|
||||
#endif
|
||||
// fallback in case macOS or other OSes don't implement the XDG base
|
||||
// spec
|
||||
std::string path = runtime_dir ? std::string(runtime_dir) + '/' : std::string("/tmp/");
|
||||
path += file_name;
|
||||
|
||||
if (slot != default_slot)
|
||||
{
|
||||
fmt::append(path, ".%d", slot);
|
||||
}
|
||||
|
||||
return path;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
inline const char* bind_and_listen(SOCKET sock, u16 port)
|
||||
{
|
||||
const int exclusive = 1;
|
||||
if (setsockopt(sock, SOL_SOCKET, SO_EXCLUSIVEADDRUSE, reinterpret_cast<const char*>(&exclusive), sizeof(exclusive)) != 0)
|
||||
return "setsockopt(SO_EXCLUSIVEADDRUSE) failed";
|
||||
|
||||
sockaddr_in server{};
|
||||
server.sin_family = AF_INET;
|
||||
server.sin_port = htons(port);
|
||||
|
||||
if (inet_pton(AF_INET, "127.0.0.1", &server.sin_addr.s_addr) != 1)
|
||||
return "inet_pton failed";
|
||||
#else
|
||||
inline const char* bind_and_listen(int sock, const std::string& socket_path)
|
||||
{
|
||||
sockaddr_un server{};
|
||||
|
||||
if (socket_path.size() >= sizeof(server.sun_path))
|
||||
return "socket path is too long";
|
||||
|
||||
server.sun_family = AF_UNIX;
|
||||
std::memcpy(server.sun_path, socket_path.c_str(), socket_path.size() + 1);
|
||||
|
||||
unlink(socket_path.c_str());
|
||||
#endif
|
||||
if (bind(sock, reinterpret_cast<sockaddr*>(&server), sizeof(server)) != 0)
|
||||
return "bind failed";
|
||||
|
||||
if (listen(sock, 4096) != 0)
|
||||
return "listen failed";
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
template<typename Impl>
|
||||
class pine_server : public Impl
|
||||
{
|
||||
@@ -221,17 +164,14 @@ namespace pine
|
||||
return IPCBuffer{ 5, MakeFailIPC(ret_buffer) };
|
||||
};
|
||||
|
||||
const auto write_string = [&](std::string_view str)
|
||||
const auto write_string = [&](const std::string& str)
|
||||
{
|
||||
if (!SafetyChecks(buf_cnt, 0, ret_cnt, str.size() + 1 + sizeof(u32), buf_size))
|
||||
return false;
|
||||
ToArray(ret_buffer, ::narrow<u32>(str.size() + 1), ret_cnt);
|
||||
ret_cnt += sizeof(u32);
|
||||
if (str.size())
|
||||
{
|
||||
std::memcpy(&ret_buffer[ret_cnt], str.data(), str.size());
|
||||
ret_cnt += str.size();
|
||||
}
|
||||
memcpy(&ret_buffer[ret_cnt], str.data(), str.size());
|
||||
ret_cnt += str.size();
|
||||
ret_buffer[ret_cnt++] = '\0';
|
||||
return true;
|
||||
};
|
||||
@@ -572,7 +512,7 @@ namespace pine
|
||||
*/
|
||||
static inline bool SafetyChecks(usz command_len, usz command_size, usz reply_len, usz reply_size = 0, usz buf_size = MAX_IPC_SIZE - 1)
|
||||
{
|
||||
const bool res = ((command_len + command_size) > buf_size ||
|
||||
bool res = ((command_len + command_size) > buf_size ||
|
||||
(reply_len + reply_size) >= MAX_IPC_RETURN_SIZE);
|
||||
if (res) [[unlikely]]
|
||||
return false;
|
||||
@@ -584,7 +524,8 @@ namespace pine
|
||||
pine_server() noexcept
|
||||
{
|
||||
#ifdef _WIN32
|
||||
WSADATA wsa {};
|
||||
WSADATA wsa;
|
||||
struct sockaddr_in server;
|
||||
m_sock = INVALID_SOCKET;
|
||||
m_msgsock = INVALID_SOCKET;
|
||||
|
||||
@@ -600,9 +541,45 @@ namespace pine
|
||||
return;
|
||||
}
|
||||
|
||||
const char* failure = bind_and_listen(m_sock, static_cast<u16>(Impl::get_port()));
|
||||
// yes very good windows s/sun/sin/g sure is fine
|
||||
server.sin_family = AF_INET;
|
||||
// localhost only
|
||||
if (!inet_pton(server.sin_family, "127.0.0.1", &server.sin_addr.s_addr))
|
||||
{
|
||||
fmt::throw_exception("IPC: Failed to convert localhost");
|
||||
}
|
||||
server.sin_port = htons(Impl::get_port());
|
||||
|
||||
if (bind(m_sock, reinterpret_cast<struct sockaddr*>(&server), sizeof(server)) == SOCKET_ERROR)
|
||||
{
|
||||
Impl::error("IPC: Error while binding to socket! Shutting down...");
|
||||
return;
|
||||
}
|
||||
|
||||
#else
|
||||
m_socket_name = get_socket_path("rpcs3.sock", Impl::get_port(), IPC_DEFAULT_SLOT);
|
||||
char* runtime_dir = nullptr;
|
||||
#ifdef __APPLE__
|
||||
runtime_dir = std::getenv("TMPDIR");
|
||||
#else
|
||||
runtime_dir = std::getenv("XDG_RUNTIME_DIR");
|
||||
#endif
|
||||
// fallback in case macOS or other OSes don't implement the XDG base
|
||||
// spec
|
||||
if (runtime_dir == nullptr)
|
||||
m_socket_name = "/tmp/rpcs3.sock";
|
||||
else
|
||||
{
|
||||
m_socket_name = runtime_dir;
|
||||
m_socket_name += "/rpcs3.sock";
|
||||
}
|
||||
|
||||
const int slot = Impl::get_port();
|
||||
if (slot != IPC_DEFAULT_SLOT)
|
||||
{
|
||||
fmt::append(m_socket_name, ".%d", slot);
|
||||
}
|
||||
|
||||
struct sockaddr_un server;
|
||||
|
||||
m_sock = socket(AF_UNIX, SOCK_STREAM, 0);
|
||||
if (m_sock < 0)
|
||||
@@ -610,13 +587,23 @@ namespace pine
|
||||
Impl::error("IPC: Cannot open socket! Shutting down...");
|
||||
return;
|
||||
}
|
||||
server.sun_family = AF_UNIX;
|
||||
strcpy(server.sun_path, m_socket_name.c_str());
|
||||
|
||||
const char* failure = bind_and_listen(m_sock, m_socket_name);
|
||||
#endif
|
||||
if (failure)
|
||||
// we unlink the socket so that when releasing this thread the socket gets
|
||||
// freed even if we didn't close correctly the loop
|
||||
unlink(m_socket_name.c_str());
|
||||
if (bind(m_sock, std::bit_cast<struct sockaddr*>(&server), sizeof(struct sockaddr_un)))
|
||||
{
|
||||
Impl::error("IPC: Error while setting up socket (%s)! Shutting down...", failure);
|
||||
Impl::error("IPC: Error while binding to socket! Shutting down...");
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
// maximum queue of 4096 commands before refusing, approximated to the
|
||||
// nearest legal value. We do not use SOMAXCONN as windows have this idea
|
||||
// that a "reasonable" value is 5, which is not.
|
||||
listen(m_sock, 4096);
|
||||
}
|
||||
|
||||
pine_server(const pine_server&) = delete;
|
||||
|
||||
@@ -41,58 +41,12 @@
|
||||
<CmakeReleaseCLI>call vsdevcmd.bat -arch=amd64
|
||||
if not exist "$(SolutionDir)build\tmp\protobuf_build-$(Configuration)-$(Platform)" mkdir "$(SolutionDir)build\tmp\protobuf_build-$(Configuration)-$(Platform)"
|
||||
cd "$(SolutionDir)build\tmp\protobuf_build-$(Configuration)-$(Platform)"
|
||||
if not defined CCACHE_LAUNCH_ARGS set CCACHE_LAUNCH_ARGS=
|
||||
cmake -G Ninja ^
|
||||
-DCMAKE_CXX_COMPILER="cl.exe" ^
|
||||
-DCMAKE_C_COMPILER="cl.exe" ^
|
||||
%25CCACHE_LAUNCH_ARGS%25 ^
|
||||
-DCMAKE_CXX_STANDARD=20 ^
|
||||
-DCMAKE_BUILD_TYPE="Release" ^
|
||||
-DCMAKE_INSTALL_PREFIX="$(SolutionDir)build\lib\$(Configuration)-$(Platform)\protobuf_build" ^
|
||||
-DCMAKE_SYSTEM_VERSION=10.0 ^
|
||||
-DCMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION=$(WindowsTargetPlatformVersion) ^
|
||||
-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded ^
|
||||
-Dprotobuf_INSTALL=ON ^
|
||||
-Dprotobuf_BUILD_TESTS=OFF ^
|
||||
-Dprotobuf_BUILD_CONFORMANCE=OFF ^
|
||||
-Dprotobuf_BUILD_EXAMPLES=OFF ^
|
||||
-Dprotobuf_BUILD_PROTOBUF_BINARIES=ON ^
|
||||
-Dprotobuf_BUILD_PROTOC_BINARIES=OFF ^
|
||||
-Dprotobuf_BUILD_LIBPROTOC=OFF ^
|
||||
-Dprotobuf_BUILD_LIBUPB=OFF ^
|
||||
-Dprotobuf_ALLOW_CCACHE=ON ^
|
||||
-Dprotobuf_FORCE_FETCH_DEPENDENCIES=ON ^
|
||||
-Dprotobuf_WITH_ZLIB=OFF ^
|
||||
-Dprotobuf_MSVC_STATIC_RUNTIME=ON ^
|
||||
"$(SolutionDir)3rdparty\protobuf\protobuf"
|
||||
cmake -G Ninja -DCMAKE_CXX_COMPILER="cl.exe" -DCMAKE_C_COMPILER="cl.exe" -DCMAKE_CXX_STANDARD=20 -DCMAKE_BUILD_TYPE="Release" -DCMAKE_INSTALL_PREFIX="$(SolutionDir)build\lib\$(Configuration)-$(Platform)\protobuf_build" -DCMAKE_SYSTEM_VERSION=10.0 -DCMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION=$(WindowsTargetPlatformVersion) -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded -Dprotobuf_INSTALL=ON -Dprotobuf_BUILD_TESTS=OFF -Dprotobuf_BUILD_CONFORMANCE=OFF -Dprotobuf_BUILD_EXAMPLES=OFF -Dprotobuf_BUILD_PROTOBUF_BINARIES=ON -Dprotobuf_BUILD_PROTOC_BINARIES=OFF -Dprotobuf_BUILD_LIBPROTOC=OFF -Dprotobuf_BUILD_LIBUPB=OFF -Dprotobuf_ALLOW_CCACHE=ON -Dprotobuf_FORCE_FETCH_DEPENDENCIES=ON -Dprotobuf_WITH_ZLIB=OFF -Dprotobuf_MSVC_STATIC_RUNTIME=ON "$(SolutionDir)3rdparty\protobuf\protobuf"
|
||||
</CmakeReleaseCLI>
|
||||
<CmakeDebugCLI>call vsdevcmd.bat -arch=amd64
|
||||
if not exist "$(SolutionDir)build\tmp\protobuf_build-$(Configuration)-$(Platform)" mkdir "$(SolutionDir)build\tmp\protobuf_build-$(Configuration)-$(Platform)"
|
||||
cd "$(SolutionDir)build\tmp\protobuf_build-$(Configuration)-$(Platform)"
|
||||
if not defined CCACHE_LAUNCH_ARGS set CCACHE_LAUNCH_ARGS=
|
||||
cmake -G Ninja ^
|
||||
-DCMAKE_CXX_COMPILER="cl.exe" ^
|
||||
-DCMAKE_C_COMPILER="cl.exe" ^
|
||||
%25CCACHE_LAUNCH_ARGS%25 ^
|
||||
-DCMAKE_CXX_STANDARD=20 ^
|
||||
-DCMAKE_BUILD_TYPE="Debug" ^
|
||||
-DCMAKE_INSTALL_PREFIX="$(SolutionDir)build\lib\$(Configuration)-$(Platform)\protobuf_build" ^
|
||||
-DCMAKE_SYSTEM_VERSION=10.0 ^
|
||||
-DCMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION=$(WindowsTargetPlatformVersion) ^
|
||||
-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDebugDLL ^
|
||||
-Dprotobuf_INSTALL=ON ^
|
||||
-Dprotobuf_BUILD_TESTS=OFF ^
|
||||
-Dprotobuf_BUILD_CONFORMANCE=OFF ^
|
||||
-Dprotobuf_BUILD_EXAMPLES=OFF ^
|
||||
-Dprotobuf_BUILD_PROTOBUF_BINARIES=ON ^
|
||||
-Dprotobuf_BUILD_PROTOC_BINARIES=OFF ^
|
||||
-Dprotobuf_BUILD_LIBPROTOC=OFF ^
|
||||
-Dprotobuf_BUILD_LIBUPB=OFF ^
|
||||
-Dprotobuf_ALLOW_CCACHE=ON ^
|
||||
-Dprotobuf_FORCE_FETCH_DEPENDENCIES=ON ^
|
||||
-Dprotobuf_WITH_ZLIB=OFF ^
|
||||
-Dprotobuf_MSVC_STATIC_RUNTIME=OFF ^
|
||||
"$(SolutionDir)3rdparty\protobuf\protobuf"
|
||||
cmake -G Ninja -DCMAKE_CXX_COMPILER="cl.exe" -DCMAKE_C_COMPILER="cl.exe" -DCMAKE_CXX_STANDARD=20 -DCMAKE_BUILD_TYPE="Debug" -DCMAKE_INSTALL_PREFIX="$(SolutionDir)build\lib\$(Configuration)-$(Platform)\protobuf_build" -DCMAKE_SYSTEM_VERSION=10.0 -DCMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION=$(WindowsTargetPlatformVersion) -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDebugDLL -Dprotobuf_INSTALL=ON -Dprotobuf_BUILD_TESTS=OFF -Dprotobuf_BUILD_CONFORMANCE=OFF -Dprotobuf_BUILD_EXAMPLES=OFF -Dprotobuf_BUILD_PROTOBUF_BINARIES=ON -Dprotobuf_BUILD_PROTOC_BINARIES=OFF -Dprotobuf_BUILD_LIBPROTOC=OFF -Dprotobuf_BUILD_LIBUPB=OFF -Dprotobuf_ALLOW_CCACHE=ON -Dprotobuf_FORCE_FETCH_DEPENDENCIES=ON -Dprotobuf_WITH_ZLIB=OFF -Dprotobuf_MSVC_STATIC_RUNTIME=OFF "$(SolutionDir)3rdparty\protobuf\protobuf"
|
||||
</CmakeDebugCLI>
|
||||
<CmakeCleanCLI>
|
||||
echo Cleaning..
|
||||
|
||||
@@ -119,8 +119,7 @@ echo -e "\n\nResult:\n"
|
||||
|
||||
# Find the max length of the paths (before '->')
|
||||
max_len=0
|
||||
while read -r line; do
|
||||
left="${line%%->*}"
|
||||
while IFS='->' read -r left _; do
|
||||
len=$(echo -n "$left" | wc -c)
|
||||
if (( len > max_len )); then
|
||||
max_len=$len
|
||||
@@ -128,10 +127,8 @@ while read -r line; do
|
||||
done < "$resultfile"
|
||||
|
||||
# Print with padding so '->' lines up
|
||||
while read -r line; do
|
||||
left="${line%%->*}"
|
||||
right="${line#*->}"
|
||||
right=$(echo "$right" | sed 's/^[[:space:]]*//')
|
||||
while IFS='->' read -r left right; do
|
||||
right=$(echo "$right" | sed 's/^[[:space:]]*>*[[:space:]]*//')
|
||||
printf "%-${max_len}s -> %s\n" "$left" "$right"
|
||||
done < "$resultfile"
|
||||
|
||||
|
||||
@@ -4,23 +4,23 @@ if(USE_SYSTEM_WOLFSSL)
|
||||
add_library(wolfssl INTERFACE)
|
||||
target_link_libraries(wolfssl INTERFACE PkgConfig::WolfSSL)
|
||||
else()
|
||||
set(WOLFSSL_TLS13 ON CACHE INTERNAL "" FORCE)
|
||||
set(WOLFSSL_SHA3 ON CACHE INTERNAL "")
|
||||
set(WOLFSSL_SHAKE256 ON CACHE INTERNAL "")
|
||||
set(WOLFSSL_BASE64_ENCODE OFF CACHE INTERNAL "")
|
||||
set(WOLFSSL_DES3 ON CACHE INTERNAL "")
|
||||
set(WOLFSSL_PWDBASED ON CACHE INTERNAL "")
|
||||
set(WOLFSSL_FAST_MATH ON CACHE INTERNAL "")
|
||||
set(WOLFSSL_EXAMPLES OFF CACHE INTERNAL "")
|
||||
set(WOLFSSL_CRYPT_TESTS OFF CACHE INTERNAL "")
|
||||
set(WOLFSSL_ASYNC_THREADS OFF CACHE INTERNAL "")
|
||||
set(WOLFSSL_BUILD_OUT_OF_TREE ON CACHE INTERNAL "")
|
||||
set(WOLFSSL_SNI ON CACHE INTERNAL "")
|
||||
set(WOLFSSL_OPENSSLEXTRA ON CACHE INTERNAL "")
|
||||
set(WOLFSSL_ALT_CERT_CHAINS ON CACHE INTERNAL "")
|
||||
option(WOLFSSL_TLS13 "Enable wolfSSL TLS v1.3 (default: enabled)" OFF)
|
||||
set(WOLFSSL_SHA3 ON CACHE STRING "Enable wolfSSL SHA-3 support (default: enabled on x86_64/aarch64)")
|
||||
set(WOLFSSL_SHAKE256 ON CACHE STRING "Enable wolfSSL SHAKE256 support (default: enabled on x86_64/aarch64)")
|
||||
option(WOLFSSL_BASE64_ENCODE "Enable Base64 encoding (default: enabled on x86_64)" OFF)
|
||||
option(WOLFSSL_DES3 "Enable DES3 (default: disabled)" ON)
|
||||
option(WOLFSSL_PWDBASED "Enable PWDBASED (default: disabled)" ON)
|
||||
option(WOLFSSL_FAST_MATH "Enable fast math ops (default: disabled)" ON)
|
||||
option(WOLFSSL_EXAMPLES "Enable examples (default: enabled)" OFF)
|
||||
option(WOLFSSL_CRYPT_TESTS "Enable Crypt Bench/Test (default: enabled)" OFF)
|
||||
option(WOLFSSL_ASYNC_THREADS "Enable Asynchronous Threading (default: enabled)" OFF)
|
||||
option(WOLFSSL_BUILD_OUT_OF_TREE "Don't generate files in the source tree (default: yes)" ON)
|
||||
option(WOLFSSL_SNI "Enable SNI (default: disabled)" ON)
|
||||
option(WOLFSSL_OPENSSLEXTRA "Enable extra OpenSSL API, size+ (default: disabled)" ON)
|
||||
option(WOLFSSL_HARDEN "Enable Hardened build, Enables Timing Resistance and Blinding (default: enabled)" OFF)
|
||||
option(WOLFSSL_ALT_CERT_CHAINS "Enable support for Alternate certification chains (default: disabled)" ON)
|
||||
|
||||
add_subdirectory(wolfssl EXCLUDE_FROM_ALL)
|
||||
|
||||
target_compile_definitions(wolfssl PUBLIC WOLFSSL_DES_ECB HAVE_WRITE_DUP FP_MAX_BITS=8192)
|
||||
target_compile_definitions(wolfssl INTERFACE WOLFSSL_USE_OPTIONS_H)
|
||||
target_compile_definitions(wolfssl PUBLIC WOLFSSL_DES_ECB HAVE_WRITE_DUP FP_MAX_BITS=8192 WOLFSSL_NO_OPTIONS_H)
|
||||
endif()
|
||||
|
||||
@@ -46,9 +46,6 @@
|
||||
#define HAVE_AESGCM
|
||||
#define HAVE_SUPPORTED_CURVES
|
||||
#define HAVE_TLS_EXTENSIONS
|
||||
#define HAVE_HKDF
|
||||
#define WC_RSA_PSS
|
||||
#define WOLFSSL_TLS13
|
||||
#define HAVE_ECC
|
||||
#define ECC_SHAMIR
|
||||
#define ECC_TIMING_RESISTANT
|
||||
|
||||
@@ -71,44 +71,15 @@
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="wolfssl\src\bio.c" />
|
||||
<ClCompile Include="wolfssl\src\conf.c" />
|
||||
<ClCompile Include="wolfssl\src\crl.c" />
|
||||
<ClCompile Include="wolfssl\src\dtls.c" />
|
||||
<ClCompile Include="wolfssl\src\dtls13.c" />
|
||||
<ClCompile Include="wolfssl\src\internal.c" />
|
||||
<ClCompile Include="wolfssl\src\pk.c" />
|
||||
<ClCompile Include="wolfssl\src\pk_ec.c" />
|
||||
<ClCompile Include="wolfssl\src\pk_rsa.c" />
|
||||
<ClCompile Include="wolfssl\src\quic.c" />
|
||||
<ClCompile Include="wolfssl\src\sniffer.c" />
|
||||
<ClCompile Include="wolfssl\src\ssl_api_cert.c" />
|
||||
<ClCompile Include="wolfssl\src\ssl_api_crl_ocsp.c" />
|
||||
<ClCompile Include="wolfssl\src\ssl_api_dtls.c" />
|
||||
<ClCompile Include="wolfssl\src\ssl_api_ext.c" />
|
||||
<ClCompile Include="wolfssl\src\ssl_api_hs.c" />
|
||||
<ClCompile Include="wolfssl\src\ssl_api_pk.c" />
|
||||
<ClCompile Include="wolfssl\src\ssl_api_rw.c" />
|
||||
<ClCompile Include="wolfssl\src\ssl_asn1.c" />
|
||||
<ClCompile Include="wolfssl\src\ssl_bn.c" />
|
||||
<ClCompile Include="wolfssl\src\ssl_certman.c" />
|
||||
<ClCompile Include="wolfssl\src\ssl_crypto.c" />
|
||||
<ClCompile Include="wolfssl\src\ssl_ech.c" />
|
||||
<ClCompile Include="wolfssl\src\ssl_err.c" />
|
||||
<ClCompile Include="wolfssl\src\ssl_load.c" />
|
||||
<ClCompile Include="wolfssl\src\ssl_misc.c" />
|
||||
<ClCompile Include="wolfssl\src\ssl_p7p12.c" />
|
||||
<ClCompile Include="wolfssl\src\ssl_sess.c" />
|
||||
<ClCompile Include="wolfssl\src\ssl_sk.c" />
|
||||
<ClCompile Include="wolfssl\src\ssl_tsp.c" />
|
||||
<ClCompile Include="wolfssl\src\wolfio.c" />
|
||||
<ClCompile Include="wolfssl\src\keys.c" />
|
||||
<ClCompile Include="wolfssl\src\ocsp.c" />
|
||||
<ClCompile Include="wolfssl\src\ssl.c" />
|
||||
<ClCompile Include="wolfssl\src\tls.c" />
|
||||
<ClCompile Include="wolfssl\src\tls13.c" />
|
||||
<ClCompile Include="wolfssl\src\x509.c" />
|
||||
<ClCompile Include="wolfssl\src\x509_str.c" />
|
||||
<ClCompile Include="wolfssl\wolfcrypt\src\aes.c" />
|
||||
<ClCompile Include="wolfssl\wolfcrypt\src\arc4.c" />
|
||||
<ClCompile Include="wolfssl\wolfcrypt\src\asn.c" />
|
||||
@@ -168,77 +139,6 @@
|
||||
<ItemGroup>
|
||||
<ClInclude Include="extra\win32\user_settings.h" />
|
||||
<ClInclude Include="wolfssl\resource.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\callbacks.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\certs_test.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\certs_test_sm.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\crl.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\error-ssl.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\internal.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\ocsp.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\openssl\aes.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\openssl\asn1.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\openssl\asn1t.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\openssl\bio.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\openssl\bn.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\openssl\buffer.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\openssl\camellia.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\openssl\cmac.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\openssl\cms.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\openssl\compat_types.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\openssl\conf.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\openssl\crypto.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\openssl\des.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\openssl\dh.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\openssl\dsa.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\openssl\ec.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\openssl\ec25519.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\openssl\ec448.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\openssl\ecdh.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\openssl\ecdsa.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\openssl\ed25519.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\openssl\ed448.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\openssl\engine.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\openssl\err.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\openssl\evp.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\openssl\fips_rand.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\openssl\hmac.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\openssl\kdf.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\openssl\lhash.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\openssl\md4.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\openssl\md5.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\openssl\modes.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\openssl\objects.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\openssl\obj_mac.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\openssl\ocsp.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\openssl\opensslconf.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\openssl\opensslv.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\openssl\ossl_typ.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\openssl\pem.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\openssl\pkcs12.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\openssl\pkcs7.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\openssl\rand.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\openssl\rc4.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\openssl\ripemd.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\openssl\rsa.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\openssl\safestack.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\openssl\sha.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\openssl\sha3.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\openssl\srp.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\openssl\ssl.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\openssl\ssl23.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\openssl\stack.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\openssl\tls1.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\openssl\txt_db.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\openssl\ui.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\openssl\x509.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\openssl\x509v3.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\openssl\x509_vfy.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\quic.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\sniffer.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\sniffer_error.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\ssl.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\test.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\version.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\aes.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\arc4.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\asn.h" />
|
||||
@@ -266,6 +166,8 @@
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\ed448.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\error-crypt.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\ext_kyber.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\ext_lms.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\ext_xmss.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\falcon.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\fe_448.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\fe_operations.h" />
|
||||
@@ -278,6 +180,7 @@
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\integer.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\kdf.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\kyber.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\lms.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\logging.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\md2.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\md4.h" />
|
||||
@@ -291,7 +194,6 @@
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\pkcs12.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\pkcs7.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\poly1305.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\puf.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\pwdbased.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\random.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\rc2.h" />
|
||||
@@ -310,6 +212,7 @@
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\sm3.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\sm4.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\sp.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\sphincs.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\sp_int.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\srp.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\tfm.h" />
|
||||
@@ -318,16 +221,12 @@
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\wc_encrypt.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\wc_kyber.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\wc_lms.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\wc_mldsa.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\wc_mlkem.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\wc_pkcs11.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\wc_port.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\wc_she.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\wc_slhdsa.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\wc_xmss.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\wolfevent.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\wolfmath.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfio.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\xmss.h" />
|
||||
<CustomBuild Include="wolfssl\wolfcrypt\src\aes_asm.asm">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DLL Debug|x64'">false</ExcludedFromBuild>
|
||||
@@ -348,7 +247,6 @@
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ResourceCompile>
|
||||
<ResourceCompile Include="wolfssl\wolfssl\sniffer_error.rc" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="wolfssl\wolfssl\wolfcrypt\include.am" />
|
||||
|
||||
@@ -20,27 +20,27 @@ The following tools are required to build RPCS3 on Windows 10 or later:
|
||||
with standalone **CMake** tool.
|
||||
|
||||
- [Python 3.6+](https://www.python.org/downloads/) (add to PATH)
|
||||
- [Qt 6.12.0](https://www.qt.io/download-qt-installer) In case you can't download from the official installer, you can use [Another Qt installer](https://github.com/miurahr/aqtinstall) (In that case you will need to manually add the "qtmultimedia" module when installing Qt)
|
||||
- [Vulkan SDK 1.4.341.1](https://vulkan.lunarg.com/sdk/home) (see "Install the SDK" [here](https://vulkan.lunarg.com/doc/sdk/latest/windows/getting_started.html)). Note that future SDKs may not work.
|
||||
- [Qt 6.11.0](https://www.qt.io/download-qt-installer) In case you can't download from the official installer, you can use [Another Qt installer](https://github.com/miurahr/aqtinstall) (In that case you will need to manually add the "qtmultimedia" module when installing Qt)
|
||||
- [Vulkan SDK 1.3.268.0](https://vulkan.lunarg.com/sdk/home) (see "Install the SDK" [here](https://vulkan.lunarg.com/doc/sdk/latest/windows/getting_started.html)) for now future SDKs don't work. You need precisely 1.3.268.0.
|
||||
|
||||
The `sln` solution available only on **Visual Studio** is the preferred building solution. It easily allows to build the **RPCS3** application in `Release` and `Debug` mode.
|
||||
|
||||
In order to build **RPCS3** with the `sln` solution (with **Visual Studio**), **Qt** libs need to be detected. To detect the libs:
|
||||
- add and set the `QTDIR` environment variable, e.g. `<QtInstallFolder>\6.12.0\msvc2022_64\`
|
||||
- add and set the `QTDIR` environment variable, e.g. `<QtInstallFolder>\6.11.0\msvc2022_64\`
|
||||
- or use the [Visual Studio Qt Plugin](https://marketplace.visualstudio.com/items?itemName=TheQtCompany.QtVisualStudioTools2022)
|
||||
|
||||
**NOTE:** If you have issues with the **Visual Studio Qt Plugin**, you may want to uninstall it and install the [Legacy Qt Plugin](https://marketplace.visualstudio.com/items?itemName=TheQtCompany.LEGACYQtVisualStudioTools2022) instead.
|
||||
|
||||
In order to build **RPCS3** with the `CMake` solution (with both **Visual Studio** and standalone **CMake** tool):
|
||||
- add and set the `Qt6_ROOT` environment variable to the **Qt** libs path, e.g. `<QtInstallFolder>\6.12.0\msvc2022_64\`
|
||||
- add and set the `Qt6_ROOT` environment variable to the **Qt** libs path, e.g. `<QtInstallFolder>\6.11.0\msvc2022_64\`
|
||||
|
||||
### Linux
|
||||
|
||||
These are the essentials tools to build RPCS3 on Linux. Some of them can be installed through your favorite package manager:
|
||||
- Clang 17+ or GCC 13+
|
||||
- [CMake 3.28.0+](https://www.cmake.org/download/)
|
||||
- [Qt 6.12.0](https://www.qt.io/download-qt-installer)
|
||||
- [Vulkan SDK 1.4.341.1](https://vulkan.lunarg.com/sdk/home) (See "Install the SDK" [here](https://vulkan.lunarg.com/doc/sdk/latest/linux/getting_started.html)). Note that future SDKs may not work.
|
||||
- [Qt 6.11.0](https://www.qt.io/download-qt-installer)
|
||||
- [Vulkan SDK 1.3.268.0](https://vulkan.lunarg.com/sdk/home) (See "Install the SDK" [here](https://vulkan.lunarg.com/doc/sdk/latest/linux/getting_started.html)) for now future SDKs don't work. You need precisely 1.3.268.0.
|
||||
- [SDL3](https://github.com/libsdl-org/SDL/releases) (for the FAudio backend)
|
||||
|
||||
**If you have an NVIDIA GPU, you may need to install the libglvnd package.**
|
||||
@@ -72,7 +72,14 @@ You can either use `update-alternatives` to setup `gcc-13`/`g++-13` as your defa
|
||||
|
||||
##### Vulkan SDK
|
||||
|
||||
For Ubuntu systems, it is strongly recommended to use the official [Linux Tarball Vulkan SDK](https://vulkan.lunarg.com/doc/view/1.4.341.0/linux/getting_started.html) which will provide a compatible Vulkan SDK to compile RPCS3. If your Vulkan SDK is older, it can lead to compilation errors.
|
||||
For Ubuntu systems, it is strongly recommended to use the PPA from [LunarG](https://packages.lunarg.com/) which will provide a compatible Vulkan SDK to compile RPCS3. If your Vulkan SDK is older, it can lead to compilation errors.
|
||||
```
|
||||
. /etc/os-release
|
||||
wget -qO - https://packages.lunarg.com/lunarg-signing-key-pub.asc | sudo apt-key add -
|
||||
sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-1.3.268-$UBUNTU_CODENAME.list https://packages.lunarg.com/vulkan/1.3.268/lunarg-vulkan-1.3.268-$UBUNTU_CODENAME.list
|
||||
sudo apt update
|
||||
sudo apt install vulkan-sdk
|
||||
```
|
||||
|
||||
##### CMake
|
||||
|
||||
@@ -116,7 +123,7 @@ Start **Visual Studio**, click on `Open a project or solution` and select the `r
|
||||
##### Configuring the Qt Plugin (if used)
|
||||
|
||||
1) go to `Extensions->Qt VS Tools->Qt Versions`
|
||||
2) add the path to your Qt installation with compiler e.g. `<QtInstallFolder>\6.12.0\msvc2022_64`, version will fill in automatically
|
||||
2) add the path to your Qt installation with compiler e.g. `<QtInstallFolder>\6.11.0\msvc2022_64`, version will fill in automatically
|
||||
3) go to `Extensions->Qt VS Tools->Options->Legacy Project Format`. (Only available in the **Legacy Qt Plugin**)
|
||||
4) set `Build: Run pre-build setup` to `true`. (Only available in the **Legacy Qt Plugin**)
|
||||
|
||||
@@ -125,7 +132,7 @@ Start **Visual Studio**, click on `Open a project or solution` and select the `r
|
||||
**NOTE:** The recommended build configuration is `Release`. (On older revisions: `Release - LLVM`)
|
||||
|
||||
To speed up the compilation time, you may want to download and extract to `<rpcs3_root>\build\lib_ext\<$(Configuration)>-x64` (e.g. `c:\rpcs3\build\lib_ext\Release-x64`; the path needs to be created) the following precompiled lib:
|
||||
- [LLVM libs](https://github.com/RPCS3/llvm-mirror/releases/download/custom-build-win-22.1.8/llvmlibs_mt.7z)
|
||||
- [LLVM libs](https://github.com/RPCS3/llvm-mirror/releases/download/custom-build-win-19.1.7/llvmlibs_mt.7z)
|
||||
|
||||
**NOTES:**
|
||||
- `<$(Configuration)>` can assume values `Release` or `Debug`.
|
||||
@@ -172,22 +179,6 @@ In case you preferred to install and use the standalone **CMake** tool:
|
||||
```
|
||||
3) once the build is completed, the **RPCS3** application will be available under the `<rpcs3_root>\build-msvc\bin` folder
|
||||
|
||||
#### Building with the PowerShell script
|
||||
|
||||
As an alternative to building through Visual Studio, run the PowerShell helper from the repository root:
|
||||
|
||||
```powershell
|
||||
.\scripts\win_build.ps1
|
||||
```
|
||||
|
||||
The script locates a supported Visual Studio installation, finds Qt from `Qt6_ROOT` or a standard `C:\Qt` installation, configures a Release Ninja Multi-Config build, and then builds it. Pass `-Cores <count>` to set the parallel build count; by default it uses all logical processors:
|
||||
|
||||
```powershell
|
||||
.\scripts\win_build.ps1 -Cores 8
|
||||
```
|
||||
|
||||
The resulting application is placed in `<rpcs3_root>\build\bin`.
|
||||
|
||||
### Linux
|
||||
|
||||
While still in the project root:
|
||||
|
||||
@@ -29,7 +29,6 @@ else()
|
||||
endif()
|
||||
|
||||
option(USE_NATIVE_INSTRUCTIONS "USE_NATIVE_INSTRUCTIONS makes rpcs3 compile with -march=native, which is useful for local builds, but not good for packages." ON)
|
||||
option(USE_ARM_LSE2 "Compile with LSE2 instructions" OFF)
|
||||
option(WITH_LLVM "Enable usage of LLVM library" ON)
|
||||
option(BUILD_LLVM "Build LLVM from git submodule" OFF)
|
||||
option(STATIC_LINK_LLVM "Link against LLVM statically. This will get set to ON if you build LLVM from the submodule." OFF)
|
||||
@@ -64,7 +63,6 @@ option(USE_LTO "Use LTO for building" ON)
|
||||
option(BUILD_RPCS3_TESTS "Build RPCS3 unit tests." OFF)
|
||||
option(RUN_RPCS3_TESTS "Run RPCS3 unit tests. Requires BUILD_RPCS3_TESTS" OFF)
|
||||
option(USE_GAMEMODE "Choose whether to enable GameMode features or not." ON)
|
||||
option(BUNDLE_UDEV_RULES "Include udev rules on Linux/FreeBSD" OFF)
|
||||
|
||||
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/buildfiles/cmake")
|
||||
|
||||
@@ -96,8 +94,8 @@ if(NOT CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
endif()
|
||||
|
||||
if(APPLE AND CMAKE_OSX_ARCHITECTURES STREQUAL "arm64")
|
||||
list(APPEND CMAKE_PREFIX_PATH "/opt/homebrew")
|
||||
list(APPEND CMAKE_SYSTEM_PREFIX_PATH "/opt/homebrew")
|
||||
include_directories(/opt/homebrew/include)
|
||||
link_directories(/opt/homebrew/lib)
|
||||
endif()
|
||||
|
||||
if(MSVC)
|
||||
|
||||
@@ -9,7 +9,7 @@ The world's first free and open-source PlayStation 3 emulator/debugger, written
|
||||
You can find some basic information on our [**website**](https://rpcs3.net/). Game info is being populated on the [**Wiki**](https://wiki.rpcs3.net/).
|
||||
For discussion about this emulator, PS3 emulation, and game compatibility reports, please visit our [**forums**](https://forums.rpcs3.net) and our [**Discord server**](https://discord.gg/RPCS3).
|
||||
|
||||
[**Support the Lead Developers on Patreon**](https://rpcs3.net/patreon)
|
||||
[**Support Lead Developers Nekotekina and kd-11 on Patreon**](https://www.patreon.com/Nekotekina)
|
||||
|
||||
## Contributing
|
||||
|
||||
@@ -23,16 +23,6 @@ If you want to contribute as a developer, please take a look at the following pa
|
||||
|
||||
You should also contact any of the developers in the forums or in the Discord server to learn more about the current state of the emulator.
|
||||
|
||||
### AI Use
|
||||
|
||||
Use of AI tools for research and reverse engineering purposes is permitted. However, contributors are expected to fully own and understand all code they submit. Any communication with the team — including code, code comments, and GitHub comments — must come from the human contributor, not an AI agent acting autonomously.
|
||||
|
||||
We have unfortunately seen a rise in untested and unverified AI-generated slop being submitted to this project. This wastes maintainer time and, in worse cases, such changes get merged and break functionality for all users. Repeated violations will result in a ban from the repository. Please be respectful of everyone's time.
|
||||
|
||||
**Pull requests opened by AI agents or automated tools must include a disclosure in the PR description** stating the scope of AI involvement — which parts were AI-generated and what human testing or review was performed prior to submission. PRs that omit this disclosure may be closed without review.
|
||||
|
||||
If you are unsure about your work, open a discussion issue to talk it through with the team, or reach out to a maintainer on [Discord](https://discord.gg/RPCS3).
|
||||
|
||||
## Building
|
||||
|
||||
See [BUILDING.md](BUILDING.md) for more information about how to setup an environment to build RPCS3.
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
#include "Config.h"
|
||||
#include "util/types.hpp"
|
||||
#include "util/yaml.hpp"
|
||||
#include "util/cctype.hpp"
|
||||
|
||||
#include <charconv>
|
||||
|
||||
@@ -41,7 +40,7 @@ namespace cfg
|
||||
owner->m_nodes.emplace_back(this);
|
||||
}
|
||||
|
||||
bool _base::from_string(std::string_view /*value*/, bool /*dynamic*/)
|
||||
bool _base::from_string(std::string_view, bool)
|
||||
{
|
||||
cfg_log.fatal("cfg::_base::from_string() purecall");
|
||||
return false;
|
||||
@@ -69,7 +68,7 @@ namespace cfg
|
||||
|
||||
// Incrementally load config entries from YAML::Node.
|
||||
// The config value is preserved if the corresponding YAML node doesn't exist.
|
||||
[[nodiscard]] static bool decode(const YAML::Node& data, class _base& rhs, bool dynamic, bool strict);
|
||||
static void decode(const YAML::Node& data, class _base& rhs, bool dynamic = false);
|
||||
}
|
||||
|
||||
std::vector<std::string> cfg::make_int_range(s64 min, s64 max)
|
||||
@@ -77,11 +76,11 @@ std::vector<std::string> cfg::make_int_range(s64 min, s64 max)
|
||||
return {std::to_string(min), std::to_string(max)};
|
||||
}
|
||||
|
||||
bool try_to_int64(s64* out, std::string_view value, s64 min, s64 max, std::string_view name)
|
||||
bool try_to_int64(s64* out, std::string_view value, s64 min, s64 max)
|
||||
{
|
||||
if (value.empty())
|
||||
{
|
||||
if (out) cfg_log.error("cfg::try_to_int64('%s'): called with an empty string", name);
|
||||
if (out) cfg_log.error("cfg::try_to_int64(): called with an empty string");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -108,7 +107,7 @@ bool try_to_int64(s64* out, std::string_view value, s64 min, s64 max, std::strin
|
||||
|
||||
if (ret.ec != std::errc() || ret.ptr != end || (start[0] == '-' && sign < 0))
|
||||
{
|
||||
if (out) cfg_log.error("cfg::try_to_int64('%s', '%s'): invalid integer", value, name);
|
||||
if (out) cfg_log.error("cfg::try_to_int64('%s'): invalid integer", value);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -116,7 +115,7 @@ bool try_to_int64(s64* out, std::string_view value, s64 min, s64 max, std::strin
|
||||
|
||||
if (result < min || result > max)
|
||||
{
|
||||
if (out) cfg_log.error("cfg::try_to_int64('%s', '%s'): out of bounds (val=%d, min=%d, max=%d)", value, name, result, min, max);
|
||||
if (out) cfg_log.error("cfg::try_to_int64('%s'): out of bounds (val=%d, min=%d, max=%d)", value, result, min, max);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -129,11 +128,11 @@ std::vector<std::string> cfg::make_uint_range(u64 min, u64 max)
|
||||
return {std::to_string(min), std::to_string(max)};
|
||||
}
|
||||
|
||||
bool try_to_uint64(u64* out, std::string_view value, u64 min, u64 max, std::string_view name)
|
||||
bool try_to_uint64(u64* out, std::string_view value, u64 min, u64 max)
|
||||
{
|
||||
if (value.empty())
|
||||
{
|
||||
if (out) cfg_log.error("cfg::try_to_uint64('%s'): called with an empty string", name);
|
||||
if (out) cfg_log.error("cfg::try_to_uint64(): called with an empty string");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -153,13 +152,13 @@ bool try_to_uint64(u64* out, std::string_view value, u64 min, u64 max, std::stri
|
||||
|
||||
if (ret.ec != std::errc() || ret.ptr != end)
|
||||
{
|
||||
if (out) cfg_log.error("cfg::try_to_uint64('%s', '%s'): invalid integer", value, name);
|
||||
if (out) cfg_log.error("cfg::try_to_uint64('%s'): invalid integer", value);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (result < min || result > max)
|
||||
{
|
||||
if (out) cfg_log.error("cfg::try_to_uint64('%s', '%s'): out of bounds (val=%u, min=%u, max=%u)", value, name, result, min, max);
|
||||
if (out) cfg_log.error("cfg::try_to_uint64('%s'): out of bounds (val=%u, min=%u, max=%u)", value, result, min, max);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -167,11 +166,11 @@ bool try_to_uint64(u64* out, std::string_view value, u64 min, u64 max, std::stri
|
||||
return true;
|
||||
}
|
||||
|
||||
bool try_to_uint128(u128* out, std::string_view value, std::string_view name)
|
||||
bool try_to_uint128(u128* out, std::string_view value)
|
||||
{
|
||||
if (value.empty())
|
||||
{
|
||||
if (out) cfg_log.error("cfg::try_to_uint128('%s'): called with an empty string", name);
|
||||
if (out) cfg_log.error("cfg::try_to_uint128(): called with an empty string");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -194,7 +193,7 @@ bool try_to_uint128(u128* out, std::string_view value, std::string_view name)
|
||||
|
||||
if (ret.ec != std::errc() || ret.ptr != end)
|
||||
{
|
||||
if (out) cfg_log.error("cfg::try_to_uint128('%s', '%s'): invalid integer", value, name);
|
||||
if (out) cfg_log.error("cfg::try_to_uint128('%s'): invalid integer", value);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -208,7 +207,7 @@ bool try_to_uint128(u128* out, std::string_view value, std::string_view name)
|
||||
|
||||
if (ret.ec != std::errc() || ret.ptr != start_low64)
|
||||
{
|
||||
if (out) cfg_log.error("cfg::try_to_uint128('%s', '%s'): invalid integer", value, name);
|
||||
if (out) cfg_log.error("cfg::try_to_uint128('%s'): invalid integer", value);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -221,11 +220,11 @@ std::vector<std::string> cfg::make_float_range(f64 min, f64 max)
|
||||
return {std::to_string(min), std::to_string(max)};
|
||||
}
|
||||
|
||||
bool try_to_float(f64* out, std::string_view value, f64 min, f64 max, std::string_view name)
|
||||
bool try_to_float(f64* out, std::string_view value, f64 min, f64 max)
|
||||
{
|
||||
if (value.empty())
|
||||
{
|
||||
if (out) cfg_log.error("cfg::try_to_float('%s'): called with an empty string", name);
|
||||
if (out) cfg_log.error("cfg::try_to_float(): called with an empty string");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -238,13 +237,13 @@ bool try_to_float(f64* out, std::string_view value, f64 min, f64 max, std::strin
|
||||
|
||||
if (end_check != str.data() + str.size())
|
||||
{
|
||||
if (out) cfg_log.error("cfg::try_to_float('%s', '%s'): invalid float", value, name);
|
||||
if (out) cfg_log.error("cfg::try_to_float('%s'): invalid float", value);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (result < min || result > max)
|
||||
{
|
||||
if (out) cfg_log.error("cfg::try_to_float('%s', '%s'): out of bounds (val=%f, min=%f, max=%f)", value, name, result, min, max);
|
||||
if (out) cfg_log.error("cfg::try_to_float('%s'): out of bounds (val=%f, min=%f, max=%f)", value, result, min, max);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -252,8 +251,12 @@ bool try_to_float(f64* out, std::string_view value, f64 min, f64 max, std::strin
|
||||
return true;
|
||||
}
|
||||
|
||||
bool try_to_string(std::string* out, f64 value, std::string_view name)
|
||||
bool try_to_string(std::string* out, const f64& value)
|
||||
{
|
||||
#ifdef __APPLE__
|
||||
if (out) *out = std::to_string(value);
|
||||
return true;
|
||||
#else
|
||||
std::array<char, 32> str{};
|
||||
|
||||
if (auto [ptr, ec] = std::to_chars(str.data(), str.data() + str.size(), value, std::chars_format::fixed); ec == std::errc())
|
||||
@@ -263,15 +266,14 @@ bool try_to_string(std::string* out, f64 value, std::string_view name)
|
||||
}
|
||||
else
|
||||
{
|
||||
if (out) cfg_log.error("cfg::try_to_string('%s'): could not convert value '%f' to string. error='%s'", name, value, std::make_error_code(ec).message());
|
||||
if (out) cfg_log.error("cfg::try_to_string(): could not convert value '%f' to string. error='%s'", value, std::make_error_code(ec).message());
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
bool cfg::try_to_enum_value(u64* out, decltype(&fmt_class_string<int>::format) func, std::string_view value, std::string_view name)
|
||||
bool cfg::try_to_enum_value(u64* out, decltype(&fmt_class_string<int>::format) func, std::string_view value)
|
||||
{
|
||||
ensure(func);
|
||||
|
||||
u64 max = umax;
|
||||
|
||||
for (u64 i = 0;; i++)
|
||||
@@ -300,7 +302,7 @@ bool cfg::try_to_enum_value(u64* out, decltype(&fmt_class_string<int>::format) f
|
||||
const char* end = start + value.size();
|
||||
int base = 10;
|
||||
|
||||
if (value.size() >= 2 && start[0] == '0' && (start[1] == 'x' || start[1] == 'X'))
|
||||
if (start[0] == '0' && (start[1] == 'x' || start[1] == 'X'))
|
||||
{
|
||||
// Limited hex support
|
||||
base = 16;
|
||||
@@ -311,13 +313,13 @@ bool cfg::try_to_enum_value(u64* out, decltype(&fmt_class_string<int>::format) f
|
||||
|
||||
if (ret.ec != std::errc() || ret.ptr != end)
|
||||
{
|
||||
if (out) cfg_log.error("cfg::try_to_enum_value('%s', '%s'): invalid enum or integer", value, name);
|
||||
if (out) cfg_log.error("cfg::try_to_enum_value('%s'): invalid enum or integer", value);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (result > max)
|
||||
{
|
||||
if (out) cfg_log.error("cfg::try_to_enum_value('%s', '%s'): out of bounds(val=%u, min=0, max=%u)", value, name, result, max);
|
||||
if (out) cfg_log.error("cfg::try_to_enum_value('%s'): out of bounds(val=%u, min=0, max=%u)", value, result, max);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -466,50 +468,37 @@ void cfg::encode(YAML::Emitter& out, const cfg::_base& rhs)
|
||||
}
|
||||
}
|
||||
|
||||
bool cfg::decode(const YAML::Node& data, cfg::_base& rhs, bool dynamic, bool strict)
|
||||
void cfg::decode(const YAML::Node& data, cfg::_base& rhs, bool dynamic)
|
||||
{
|
||||
if (dynamic && !rhs.get_is_dynamic())
|
||||
{
|
||||
return true;
|
||||
return;
|
||||
}
|
||||
|
||||
switch (rhs.get_type())
|
||||
{
|
||||
case type::node:
|
||||
{
|
||||
if (!data.IsMap())
|
||||
if (data.IsScalar() || data.IsSequence())
|
||||
{
|
||||
cfg_log.error("node node is not a map");
|
||||
return false;
|
||||
return; // ???
|
||||
}
|
||||
|
||||
bool success = true;
|
||||
|
||||
for (const auto& pair : data)
|
||||
{
|
||||
if (!pair.first.IsScalar()) continue;
|
||||
|
||||
// Find the key among existing nodes
|
||||
const auto& nodes = static_cast<node&>(rhs).get_nodes();
|
||||
const auto it = std::find_if(nodes.cbegin(), nodes.cend(), [&pair](const auto& node) { return ensure(node)->get_name() == pair.first.Scalar(); });
|
||||
|
||||
if (it == nodes.cend())
|
||||
for (const auto& node : static_cast<node&>(rhs).get_nodes())
|
||||
{
|
||||
if (strict)
|
||||
if (node->get_name() == pair.first.Scalar())
|
||||
{
|
||||
cfg_log.error("Unknown key found: '%s'", pair.first.Scalar());
|
||||
success = false;
|
||||
decode(pair.second, *node, dynamic);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!decode(pair.second, *ensure(*it), dynamic, strict) && strict)
|
||||
{
|
||||
success = false;
|
||||
}
|
||||
}
|
||||
|
||||
return success;
|
||||
break;
|
||||
}
|
||||
case type::set:
|
||||
{
|
||||
@@ -517,10 +506,7 @@ bool cfg::decode(const YAML::Node& data, cfg::_base& rhs, bool dynamic, bool str
|
||||
|
||||
if (YAML::convert<decltype(values)>::decode(data, values))
|
||||
{
|
||||
if (!rhs.from_list(std::move(values)) && strict)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
rhs.from_list(std::move(values));
|
||||
}
|
||||
|
||||
break;
|
||||
@@ -530,8 +516,7 @@ bool cfg::decode(const YAML::Node& data, cfg::_base& rhs, bool dynamic, bool str
|
||||
{
|
||||
if (!data.IsMap())
|
||||
{
|
||||
cfg_log.error("map node is not a map");
|
||||
return false;
|
||||
return;
|
||||
}
|
||||
|
||||
map_of_type<std::string> values;
|
||||
@@ -548,36 +533,22 @@ bool cfg::decode(const YAML::Node& data, cfg::_base& rhs, bool dynamic, bool str
|
||||
}
|
||||
case type::log:
|
||||
{
|
||||
if (!data.IsMap())
|
||||
if (data.IsScalar() || data.IsSequence())
|
||||
{
|
||||
cfg_log.error("log node is not a map");
|
||||
return false;
|
||||
return; // ???
|
||||
}
|
||||
|
||||
map_of_type<logs::level> values;
|
||||
|
||||
for (const auto& pair : data)
|
||||
{
|
||||
if (!pair.first.IsScalar() || !pair.second.IsScalar())
|
||||
{
|
||||
if (strict)
|
||||
{
|
||||
if (!pair.first.IsScalar())
|
||||
cfg_log.error("Key in map is not a scalar");
|
||||
else
|
||||
cfg_log.error("Value in map is not a scalar. key='%s'", pair.first.Scalar());
|
||||
return false;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
if (!pair.first.IsScalar() || !pair.second.IsScalar()) continue;
|
||||
|
||||
u64 value;
|
||||
if (!cfg::try_to_enum_value(&value, &fmt_class_string<logs::level>::format, pair.second.Scalar(), pair.first.Scalar()) && strict)
|
||||
if (cfg::try_to_enum_value(&value, &fmt_class_string<logs::level>::format, pair.second.Scalar()))
|
||||
{
|
||||
return false;
|
||||
values.emplace(pair.first.Scalar(), static_cast<logs::level>(static_cast<int>(value)));
|
||||
}
|
||||
|
||||
values.emplace(pair.first.Scalar(), static_cast<logs::level>(static_cast<int>(value)));
|
||||
}
|
||||
|
||||
static_cast<log_entry&>(rhs).set_map(std::move(values));
|
||||
@@ -587,43 +558,20 @@ bool cfg::decode(const YAML::Node& data, cfg::_base& rhs, bool dynamic, bool str
|
||||
{
|
||||
if (!data.IsMap())
|
||||
{
|
||||
cfg_log.error("device node is not a map");
|
||||
return false;
|
||||
return; // ???
|
||||
}
|
||||
|
||||
map_of_type<device_info> values;
|
||||
|
||||
for (const auto& pair : data)
|
||||
{
|
||||
if (!pair.first.IsScalar() || !pair.second.IsMap())
|
||||
{
|
||||
if (strict)
|
||||
{
|
||||
if (!pair.first.IsScalar())
|
||||
cfg_log.error("Key in device map is not a scalar");
|
||||
else
|
||||
cfg_log.error("Value in device map is not a map. key='%s'", pair.first.Scalar());
|
||||
return false;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
if (!pair.first.IsScalar() || !pair.second.IsMap()) continue;
|
||||
|
||||
device_info info{};
|
||||
|
||||
for (const auto& key_value : pair.second)
|
||||
{
|
||||
if (!key_value.first.IsScalar() || !key_value.second.IsScalar())
|
||||
{
|
||||
if (strict)
|
||||
{
|
||||
if (!key_value.first.IsScalar())
|
||||
cfg_log.error("Key in device info map is not a scalar");
|
||||
else
|
||||
cfg_log.error("Value in device map is not a scalar. key='%s'", key_value.first.Scalar());
|
||||
return false;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
if (!key_value.first.IsScalar() || !key_value.second.IsScalar()) continue;
|
||||
|
||||
if (key_value.first.Scalar() == "Path")
|
||||
info.path = key_value.second.Scalar();
|
||||
@@ -650,17 +598,12 @@ bool cfg::decode(const YAML::Node& data, cfg::_base& rhs, bool dynamic, bool str
|
||||
|
||||
if (YAML::convert<std::string>::decode(data, value))
|
||||
{
|
||||
if (!rhs.from_string(value, dynamic) && strict)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
rhs.from_string(value, dynamic);
|
||||
}
|
||||
|
||||
break; // ???
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
std::string cfg::node::to_string() const
|
||||
@@ -677,7 +620,8 @@ bool cfg::node::from_string(std::string_view value, bool dynamic)
|
||||
|
||||
if (error.empty())
|
||||
{
|
||||
return cfg::decode(result, *this, dynamic, false);
|
||||
cfg::decode(result, *this, dynamic);
|
||||
return true;
|
||||
}
|
||||
|
||||
cfg_log.error("Failed to load node: %s", error);
|
||||
@@ -700,39 +644,6 @@ void cfg::node::restore_defaults()
|
||||
}
|
||||
}
|
||||
|
||||
bool cfg::node::validate(std::string_view value)
|
||||
{
|
||||
auto [result, error] = yaml_load(std::string(value));
|
||||
|
||||
if (error.empty())
|
||||
{
|
||||
return cfg::decode(result, *this, false, true);
|
||||
}
|
||||
|
||||
cfg_log.error("Failed to load node: %s", error);
|
||||
return false;
|
||||
}
|
||||
|
||||
bool cfg::_bool::from_string(std::string_view value, bool /*dynamic*/)
|
||||
{
|
||||
if (value.size() != 4 && value.size() != 5)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
char copy[5];
|
||||
std::transform(value.begin(), value.end(), std::begin(copy), utils::tolower<char>);
|
||||
|
||||
if (value.size() == 5 && std::string_view{copy, 5} == "false")
|
||||
m_value = false;
|
||||
else if (value.size() == 4 && std::string_view{copy, 4} == "true")
|
||||
m_value = true;
|
||||
else
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
std::string cfg::map_entry::get_value(std::string_view key)
|
||||
{
|
||||
if (auto it = m_map.find(key); it != m_map.end())
|
||||
@@ -778,7 +689,7 @@ void cfg::log_entry::from_default()
|
||||
|
||||
std::pair<u16, u16> cfg::device_info::get_usb_ids() const
|
||||
{
|
||||
auto string_to_hex = [](std::string_view str) -> u16
|
||||
auto string_to_hex = [](const std::string& str) -> u16
|
||||
{
|
||||
u16 value = 0x0000;
|
||||
if (!str.empty() && std::from_chars(str.data(), str.data() + str.size(), value, 16).ec != std::errc{})
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace cfg
|
||||
std::vector<std::string> make_float_range(f64 min, f64 max);
|
||||
|
||||
// Internal hack
|
||||
bool try_to_enum_value(u64* out, decltype(&fmt_class_string<int>::format) func, std::string_view value, std::string_view name = {});
|
||||
bool try_to_enum_value(u64* out, decltype(&fmt_class_string<int>::format) func, std::string_view);
|
||||
|
||||
// Internal hack
|
||||
std::vector<std::string> try_to_enum_list(decltype(&fmt_class_string<int>::format) func);
|
||||
@@ -110,7 +110,7 @@ namespace cfg
|
||||
}
|
||||
|
||||
// Try to convert from string (optional)
|
||||
virtual bool from_string(std::string_view value, bool dynamic = false);
|
||||
virtual bool from_string(std::string_view, bool /*dynamic*/ = false);
|
||||
|
||||
// Get string list (optional)
|
||||
virtual std::vector<std::string> to_list() const
|
||||
@@ -161,9 +161,6 @@ namespace cfg
|
||||
|
||||
// Restore default members
|
||||
void restore_defaults() override;
|
||||
|
||||
// Try to convert from string and validate
|
||||
bool validate(std::string_view value);
|
||||
};
|
||||
|
||||
class _bool final : public _base
|
||||
@@ -212,7 +209,25 @@ namespace cfg
|
||||
return def ? "true" : "false";
|
||||
}
|
||||
|
||||
bool from_string(std::string_view value, bool dynamic = false) override;
|
||||
bool from_string(std::string_view value, bool /*dynamic*/ = false) override
|
||||
{
|
||||
if (value.size() != 4 && value.size() != 5)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
char copy[5];
|
||||
std::transform(value.begin(), value.end(), std::begin(copy), ::tolower);
|
||||
|
||||
if (value.size() == 5 && std::string_view{copy, 5} == "false")
|
||||
m_value = false;
|
||||
else if (value.size() == 4 && std::string_view{copy, 4} == "true")
|
||||
m_value = true;
|
||||
else
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void set(const bool& value)
|
||||
{
|
||||
@@ -286,7 +301,7 @@ namespace cfg
|
||||
{
|
||||
u64 result;
|
||||
|
||||
if (try_to_enum_value(&result, &fmt_class_string<T>::format, value, m_name))
|
||||
if (try_to_enum_value(&result, &fmt_class_string<T>::format, value))
|
||||
{
|
||||
// No narrowing check, it's hard to do right there
|
||||
m_value = static_cast<T>(static_cast<std::underlying_type_t<T>>(result));
|
||||
@@ -367,7 +382,7 @@ namespace cfg
|
||||
bool from_string(std::string_view value, bool /*dynamic*/ = false) override
|
||||
{
|
||||
s64 result;
|
||||
if (try_to_int64(&result, value, Min, Max, m_name))
|
||||
if (try_to_int64(&result, value, Min, Max))
|
||||
{
|
||||
m_value = static_cast<int_type>(result);
|
||||
return true;
|
||||
@@ -436,7 +451,7 @@ namespace cfg
|
||||
std::string to_string() const override
|
||||
{
|
||||
std::string result;
|
||||
if (try_to_string(&result, m_value, m_name))
|
||||
if (try_to_string(&result, m_value))
|
||||
{
|
||||
return result;
|
||||
}
|
||||
@@ -447,7 +462,7 @@ namespace cfg
|
||||
std::string def_to_string() const override
|
||||
{
|
||||
std::string result;
|
||||
if (try_to_string(&result, def, m_name))
|
||||
if (try_to_string(&result, def))
|
||||
{
|
||||
return result;
|
||||
}
|
||||
@@ -458,7 +473,7 @@ namespace cfg
|
||||
bool from_string(std::string_view value, bool /*dynamic*/ = false) override
|
||||
{
|
||||
f64 result;
|
||||
if (try_to_float(&result, value, Min, Max, m_name))
|
||||
if (try_to_float(&result, value, Min, Max))
|
||||
{
|
||||
m_value = static_cast<float_type>(result);
|
||||
return true;
|
||||
@@ -545,7 +560,7 @@ namespace cfg
|
||||
bool from_string(std::string_view value, bool /*dynamic*/ = false) override
|
||||
{
|
||||
u64 result;
|
||||
if (try_to_uint64(&result, value, Min, Max, m_name))
|
||||
if (try_to_uint64(&result, value, Min, Max))
|
||||
{
|
||||
m_value = static_cast<int_type>(result);
|
||||
return true;
|
||||
@@ -631,7 +646,7 @@ namespace cfg
|
||||
bool from_string(std::string_view value, bool /*dynamic*/ = false) override
|
||||
{
|
||||
u128 result;
|
||||
if (try_to_uint128(&result, value, m_name))
|
||||
if (try_to_uint128(&result, value))
|
||||
{
|
||||
m_value = result;
|
||||
return true;
|
||||
@@ -689,11 +704,6 @@ namespace cfg
|
||||
return *m_value.load().get();
|
||||
}
|
||||
|
||||
std::string get() const
|
||||
{
|
||||
return *m_value.load().get();
|
||||
}
|
||||
|
||||
std::string def_to_string() const override
|
||||
{
|
||||
return def;
|
||||
@@ -704,11 +714,6 @@ namespace cfg
|
||||
m_value = std::string(value);
|
||||
return true;
|
||||
}
|
||||
|
||||
void set(std::string_view value)
|
||||
{
|
||||
m_value = std::string(value);
|
||||
}
|
||||
};
|
||||
|
||||
// Simple set entry (TODO: template for various types)
|
||||
|
||||
@@ -26,7 +26,6 @@ std::string g_android_cache_dir;
|
||||
|
||||
#include <cwchar>
|
||||
#include <Windows.h>
|
||||
#include <winioctl.h>
|
||||
|
||||
static std::unique_ptr<wchar_t[]> to_wchar(std::string_view source)
|
||||
{
|
||||
@@ -39,17 +38,6 @@ static std::unique_ptr<wchar_t[]> to_wchar(std::string_view source)
|
||||
// Buffer for max possible output length
|
||||
std::unique_ptr<wchar_t[]> buffer(new wchar_t[buf_size + 8 + 32768]);
|
||||
|
||||
// If path points to an optical raw device, copy it AS IS
|
||||
if (fs::is_optical_raw_device(std::string(source)))
|
||||
{
|
||||
ensure(MultiByteToWideChar(CP_UTF8, 0, source.data(), size, buffer.get() + 32768, size)); // "to_wchar"
|
||||
|
||||
// Canonicalize wide path (replace '/', ".", "..", \\ repetitions, etc)
|
||||
ensure(GetFullPathNameW(buffer.get() + 32768, 32768, buffer.get(), nullptr) - 1 < 32768 - 1); // "to_wchar"
|
||||
|
||||
return buffer;
|
||||
}
|
||||
|
||||
// Prepend wide path prefix (4 characters)
|
||||
std::memcpy(buffer.get() + 32768, L"\\\\\?\\", 4 * sizeof(wchar_t));
|
||||
|
||||
@@ -148,7 +136,6 @@ static fs::error to_error(DWORD e)
|
||||
#include <sys/statvfs.h>
|
||||
#include <sys/file.h>
|
||||
#include <sys/uio.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <dirent.h>
|
||||
#include <fcntl.h>
|
||||
#include <libgen.h>
|
||||
@@ -160,19 +147,12 @@ static fs::error to_error(DWORD e)
|
||||
#include <copyfile.h>
|
||||
#include <mach-o/dyld.h>
|
||||
#include <limits.h>
|
||||
#include <sys/disk.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/mount.h>
|
||||
#elif defined(__linux__) || defined(__sun)
|
||||
#include <sys/sendfile.h>
|
||||
#include <sys/syscall.h>
|
||||
#include <sys/sysmacros.h>
|
||||
#include <linux/fs.h>
|
||||
#else
|
||||
#include <fstream>
|
||||
#include <sys/disk.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/mount.h>
|
||||
#endif
|
||||
|
||||
static fs::error to_error(int e)
|
||||
@@ -186,103 +166,12 @@ static fs::error to_error(int e)
|
||||
case ENOTEMPTY: return fs::error::notempty;
|
||||
case EROFS: return fs::error::readonly;
|
||||
case EISDIR: return fs::error::isdir;
|
||||
case ENOTDIR: return fs::error::notdir;
|
||||
case ENOSPC: return fs::error::nospace;
|
||||
case EXDEV: return fs::error::xdev;
|
||||
default: return fs::error::unknown;
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(__linux__)
|
||||
// Major numbers of the block devices an optical disc can be accessed through (see "Documentation/admin-guide/devices.txt")
|
||||
constexpr unsigned int s_scsi_cdrom_major = 11; // Optical drive (e.g. "/dev/sr0")
|
||||
constexpr unsigned int s_loopback_major = 7; // Disc image attached with "mount"/"losetup" (e.g. "/dev/loop0")
|
||||
#endif
|
||||
|
||||
// Check whether the provided device node is an optical drive (e.g. a Blu-Ray Disc drive) or a mounted disc image
|
||||
static bool is_optical_device_node(const struct ::stat& file_info)
|
||||
{
|
||||
#if defined(__linux__)
|
||||
// An optical drive is exposed as a block device using the SCSI CD-ROM major number (e.g. "/dev/sr0", "/dev/scd0" or the "/dev/cdrom" link).
|
||||
// A disc image attached through "mount -o loop" (or "losetup") is exposed as a loopback block device instead (e.g. "/dev/loop0"):
|
||||
// it is the counterpart of an ISO file mounted on Windows, where the resulting virtual drive is reported as DRIVE_CDROM
|
||||
if (!S_ISBLK(file_info.st_mode))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
const unsigned int device_major = major(file_info.st_rdev);
|
||||
|
||||
return device_major == s_scsi_cdrom_major || device_major == s_loopback_major;
|
||||
#elif defined(__APPLE__)
|
||||
// The raw (unbuffered) device is a character device (e.g. "/dev/rdisk2").
|
||||
// NOTE: there is no cheap way to tell an optical drive from any other raw disk here, so any raw disk node is accepted
|
||||
return S_ISCHR(file_info.st_mode);
|
||||
#else
|
||||
// On the BSDs an optical drive is a character device (e.g. "/dev/cd0")
|
||||
return S_ISCHR(file_info.st_mode) || S_ISBLK(file_info.st_mode);
|
||||
#endif
|
||||
}
|
||||
|
||||
// Check whether the path is the root of a mounted filesystem (e.g. the mount point of a disc): "st_dev" changes when crossing a mount point
|
||||
[[maybe_unused]] static bool is_mount_point(const std::string& path, const struct ::stat& file_info)
|
||||
{
|
||||
// A file is never a mount point: discard it without any syscall (the "stat()" below would fail with ENOTDIR anyway)
|
||||
if (!S_ISDIR(file_info.st_mode))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
struct ::stat parent_info;
|
||||
|
||||
if (::stat((path + "/..").c_str(), &parent_info) != 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return parent_info.st_dev != file_info.st_dev;
|
||||
}
|
||||
|
||||
// Retrieve the size of a raw device: "fstat()" reports no size (0) on such a device
|
||||
static u64 get_raw_device_size(int fd)
|
||||
{
|
||||
#if defined(__linux__)
|
||||
if (u64 size = 0; ::ioctl(fd, BLKGETSIZE64, &size) == 0)
|
||||
{
|
||||
return size;
|
||||
}
|
||||
#elif defined(__APPLE__)
|
||||
u64 block_count = 0;
|
||||
u32 block_size = 0;
|
||||
|
||||
if (::ioctl(fd, DKIOCGETBLOCKCOUNT, &block_count) == 0 && ::ioctl(fd, DKIOCGETBLOCKSIZE, &block_size) == 0)
|
||||
{
|
||||
if (block_size && block_count > u64{umax} / block_size)
|
||||
{
|
||||
fmt::throw_exception("Raw device size overflow (block count: 0x%x, block size: 0x%x)", block_count, block_size);
|
||||
}
|
||||
|
||||
return block_count * block_size;
|
||||
}
|
||||
#elif defined(__FreeBSD__) || defined(__DragonFly__)
|
||||
if (off_t media_size = 0; ::ioctl(fd, DIOCGMEDIASIZE, &media_size) == 0)
|
||||
{
|
||||
return static_cast<u64>(media_size);
|
||||
}
|
||||
#endif
|
||||
|
||||
// Fallback: seek to the end of the device (restoring the current position afterwards)
|
||||
const off_t old_pos = ::lseek(fd, 0, SEEK_CUR);
|
||||
const off_t end_pos = ::lseek(fd, 0, SEEK_END);
|
||||
|
||||
if (old_pos >= 0)
|
||||
{
|
||||
::lseek(fd, old_pos, SEEK_SET);
|
||||
}
|
||||
|
||||
return end_pos > 0 ? static_cast<u64>(end_pos) : 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
static std::string path_append(std::string_view path, std::string_view more)
|
||||
@@ -510,12 +399,11 @@ namespace fs
|
||||
class windows_file final : public file_base
|
||||
{
|
||||
HANDLE m_handle;
|
||||
u64 m_raw_device_size; // Size of the raw device, 0 if it's not one: it never changes, so it's retrieved once when the file is opened
|
||||
atomic_t<u64> m_pos {0};
|
||||
|
||||
public:
|
||||
windows_file(HANDLE handle, u64 raw_device_size = 0)
|
||||
: m_handle(handle), m_raw_device_size(raw_device_size)
|
||||
windows_file(HANDLE handle)
|
||||
: m_handle(handle)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -675,17 +563,11 @@ namespace fs
|
||||
|
||||
u64 size() override
|
||||
{
|
||||
if (!m_raw_device_size)
|
||||
{
|
||||
// NOTE: this can fail if we access a mounted empty drive (e.g. after unmounting an iso).
|
||||
LARGE_INTEGER size;
|
||||
// NOTE: this can fail if we access a mounted empty drive (e.g. after unmounting an iso).
|
||||
LARGE_INTEGER size;
|
||||
ensure(GetFileSizeEx(m_handle, &size)); // "file::size"
|
||||
|
||||
ensure(GetFileSizeEx(m_handle, &size)); // "file::size"
|
||||
return size.QuadPart;
|
||||
}
|
||||
|
||||
// For a raw device, the size was already retrieved with DeviceIoControl() when the file was opened
|
||||
return m_raw_device_size;
|
||||
return size.QuadPart;
|
||||
}
|
||||
|
||||
native_handle get_handle() override
|
||||
@@ -724,11 +606,10 @@ namespace fs
|
||||
class unix_file final : public file_base
|
||||
{
|
||||
int m_fd;
|
||||
u64 m_raw_device_size; // Size of the raw device, 0 if it's not one: it never changes, so it's retrieved once when the file is opened
|
||||
|
||||
public:
|
||||
unix_file(int fd, u64 raw_device_size = 0)
|
||||
: m_fd(fd), m_raw_device_size(raw_device_size)
|
||||
unix_file(int fd)
|
||||
: m_fd(fd)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -747,8 +628,8 @@ namespace fs
|
||||
|
||||
stat_t info {};
|
||||
info.is_directory = S_ISDIR(file_info.st_mode);
|
||||
info.is_writable = !m_raw_device_size && (file_info.st_mode & 0200); // HACK: approximation
|
||||
info.size = m_raw_device_size ? m_raw_device_size : static_cast<u64>(file_info.st_size); // A raw device reports no size through "fstat()"
|
||||
info.is_writable = file_info.st_mode & 0200; // HACK: approximation
|
||||
info.size = file_info.st_size;
|
||||
info.atime = file_info.st_atime;
|
||||
info.mtime = file_info.st_mtime;
|
||||
info.ctime = info.mtime;
|
||||
@@ -854,16 +735,10 @@ namespace fs
|
||||
|
||||
u64 size() override
|
||||
{
|
||||
if (!m_raw_device_size)
|
||||
{
|
||||
struct ::stat file_info;
|
||||
ensure(::fstat(m_fd, &file_info) == 0); // "file::size"
|
||||
struct ::stat file_info;
|
||||
ensure(::fstat(m_fd, &file_info) == 0); // "file::size"
|
||||
|
||||
return file_info.st_size;
|
||||
}
|
||||
|
||||
// For a raw device, the size was already retrieved with an ioctl when the file was opened
|
||||
return m_raw_device_size;
|
||||
return file_info.st_size;
|
||||
}
|
||||
|
||||
native_handle get_handle() override
|
||||
@@ -1215,203 +1090,6 @@ bool fs::is_symlink(const std::string& path)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool fs::is_optical_raw_device(const std::string& path)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
if (path.starts_with("\\\\.\\"))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
#else
|
||||
#ifdef __APPLE__
|
||||
// On Mac OS X optical disks will only ever be mounted under /dev/disk(whatever), similar for raw devices,
|
||||
// so reject anything not containing the disk string.
|
||||
if (!path.starts_with("/dev/disk") && !path.starts_with("/dev/rdisk"))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
#else
|
||||
// Skip a useless check if the path cannot point to a device node (device nodes always live in "/dev")
|
||||
if (!path.starts_with("/dev/"))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
struct ::stat file_info;
|
||||
|
||||
if (::stat(path.c_str(), &file_info) != 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return is_optical_device_node(file_info);
|
||||
#endif
|
||||
}
|
||||
|
||||
bool fs::get_optical_raw_device(const std::string& path, std::string* raw_device)
|
||||
{
|
||||
if (fs::is_optical_raw_device(path))
|
||||
{
|
||||
if (raw_device)
|
||||
{
|
||||
*raw_device = path;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
// Skip a useless check to detect an optical raw device if navigating on subfolders (e.g. C:\subfolder_1\subfolder_2\),
|
||||
// it means we are on a HDD/SSD. A path for an optical drive should include only the drive letter (e.g. E:\)
|
||||
const size_t drive_delim_pos = path.find_first_of(":");
|
||||
|
||||
if (drive_delim_pos != 1 || drive_delim_pos != path.find_last_not_of(delim))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
const std::string drive_letter = path.substr(0, drive_delim_pos + 1); // e.g. "E:"
|
||||
const std::string drive_path = drive_letter + "\\"; // e.g. "E:\"
|
||||
|
||||
if (GetDriveTypeA(drive_path.c_str()) == DRIVE_CDROM)
|
||||
{
|
||||
if (raw_device)
|
||||
{
|
||||
*raw_device = "\\\\.\\" + drive_letter;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
#elif defined(__linux__)
|
||||
// Here the path points to a mounted optical disc (e.g. "/media/user/PS3_DISC") or to a mounted disc image
|
||||
// (e.g. "mount -o loop game.iso /mnt/game"), so retrieve the device backing the filesystem it belongs to
|
||||
struct ::stat file_info;
|
||||
|
||||
if (::stat(path.c_str(), &file_info) != 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// "st_dev" of anything stored on a filesystem backed by a block device matches "st_rdev" of the device itself
|
||||
const dev_t device_id = file_info.st_dev;
|
||||
const unsigned int device_major = major(device_id);
|
||||
|
||||
// Discard at once anything which is not backed by an optical drive or by a loopback device, so that the checks
|
||||
// below (each one costing at least a syscall) only run on an actual candidate
|
||||
if (device_major != s_scsi_cdrom_major && device_major != s_loopback_major)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// Skip a useless check to detect an optical raw device if the path is not the mount point of the disc, it means we are
|
||||
// navigating on subfolders (on Windows, in the same way, only the drive root is accepted)
|
||||
if (!is_mount_point(path, file_info))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
const unsigned int device_minor = minor(device_id);
|
||||
|
||||
// Retrieve the device name from sysfs (e.g. "/sys/dev/block/11:0" -> "../../devices/[...]/block/sr0")
|
||||
std::string device_path;
|
||||
char link_target[1024]; // NOTE: "readlink()" never null terminates, so the buffer is used through the returned length only
|
||||
|
||||
if (const ssize_t len = ::readlink(("/sys/dev/block/" + std::to_string(device_major) + ":" + std::to_string(device_minor)).c_str(), link_target, sizeof(link_target)); len > 0)
|
||||
{
|
||||
const std::string_view target{link_target, static_cast<usz>(len)};
|
||||
|
||||
device_path = "/dev/";
|
||||
device_path += target.substr(target.find_last_of('/') + 1);
|
||||
}
|
||||
else if (device_major == s_scsi_cdrom_major)
|
||||
{
|
||||
// Fallback (sysfs not available): the minor number matches the index of the SCSI CD-ROM device
|
||||
device_path = "/dev/sr" + std::to_string(device_minor);
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// Ensure the resolved node really points to the same optical device
|
||||
struct ::stat device_info;
|
||||
|
||||
if (::stat(device_path.c_str(), &device_info) != 0 || device_info.st_rdev != device_id || !is_optical_device_node(device_info))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (raw_device)
|
||||
{
|
||||
*raw_device = device_path;
|
||||
}
|
||||
|
||||
return true;
|
||||
#elif defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
|
||||
// Here the path points to a mounted optical disc or to a mounted disc image (e.g. attached with "hdiutil"/"mdconfig"),
|
||||
// so retrieve the device backing the filesystem it belongs to
|
||||
struct ::stat file_info;
|
||||
|
||||
if (::stat(path.c_str(), &file_info) != 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// Skip a useless check to detect an optical raw device if the path is not the mount point of the disc, it means we are
|
||||
// navigating on subfolders (on Windows, in the same way, only the drive root is accepted). There is no cheap way to
|
||||
// discard a device here (unlike the major number on Linux), so this is the filter which must come first: it rejects
|
||||
// any file without a single syscall and any other folder with just one more
|
||||
if (!is_mount_point(path, file_info))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
struct ::statfs mount_info;
|
||||
|
||||
if (::statfs(path.c_str(), &mount_info) != 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
std::string device_path = mount_info.f_mntfromname; // e.g. "/dev/disk2"
|
||||
|
||||
if (!device_path.starts_with("/dev/"))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
#ifdef __APPLE__
|
||||
// Use the raw (unbuffered) device (e.g. "/dev/disk2" -> "/dev/rdisk2")
|
||||
if (!device_path.starts_with("/dev/r"))
|
||||
{
|
||||
device_path.insert(5, 1, 'r');
|
||||
}
|
||||
#endif
|
||||
|
||||
// Ensure the resolved node really points to a raw device
|
||||
struct ::stat device_info;
|
||||
|
||||
if (::stat(device_path.c_str(), &device_info) != 0 || !is_optical_device_node(device_info))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (raw_device)
|
||||
{
|
||||
*raw_device = device_path;
|
||||
}
|
||||
|
||||
return true;
|
||||
#else
|
||||
// Not supported on this platform
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
bool fs::statfs(const std::string& path, fs::device_stat& info)
|
||||
{
|
||||
if (auto device = get_virtual_device(path))
|
||||
@@ -1892,29 +1570,11 @@ bool fs::utime(const std::string& path, s64 atime, s64 mtime)
|
||||
#endif
|
||||
}
|
||||
|
||||
void fs::sync(const std::string& path)
|
||||
void fs::sync()
|
||||
{
|
||||
#ifdef _WIN32
|
||||
static_cast<void>(path);
|
||||
fs::g_tls_error = fs::error::unknown;
|
||||
#elif defined(__linux__)
|
||||
// Only flush the filesystem containing the path: a global sync() also waits on every other mounted
|
||||
// filesystem and may block indefinitely on a slow or stalled one (e.g. network or FUSE mounts)
|
||||
const int fd = ::open(path.c_str(), O_RDONLY | O_CLOEXEC);
|
||||
|
||||
if (fd == -1)
|
||||
{
|
||||
fs::g_tls_error = to_error(errno);
|
||||
return;
|
||||
}
|
||||
|
||||
const int res = ::syncfs(fd);
|
||||
const int err = errno;
|
||||
::close(fd);
|
||||
|
||||
fs::g_tls_error = res == 0 ? fs::error::ok : to_error(err);
|
||||
#else
|
||||
static_cast<void>(path);
|
||||
::sync();
|
||||
fs::g_tls_error = fs::error::ok;
|
||||
#endif
|
||||
@@ -1997,29 +1657,9 @@ fs::file::file(const std::string& path, bs_t<open_mode> mode)
|
||||
return;
|
||||
}
|
||||
|
||||
// If path points to an optical raw device, complete the file opening
|
||||
// (the following GetFileInformationByHandle() would always fail on a raw device).
|
||||
if (is_optical_raw_device(path))
|
||||
{
|
||||
DISK_GEOMETRY_EX geometry;
|
||||
|
||||
// Try to retrieve information on content. If it fails, no disc is probably mounted so abort the file opening
|
||||
if (!DeviceIoControl(handle, IOCTL_DISK_GET_DRIVE_GEOMETRY_EX, nullptr, 0, &geometry, sizeof(geometry), nullptr, nullptr))
|
||||
{
|
||||
const DWORD last_error = GetLastError();
|
||||
CloseHandle(handle);
|
||||
g_tls_error = to_error(last_error);
|
||||
return;
|
||||
}
|
||||
|
||||
m_file = std::make_unique<windows_file>(handle, static_cast<u64>(ensure(geometry.DiskSize.QuadPart)));
|
||||
return;
|
||||
}
|
||||
|
||||
// Check if the handle is actually valid.
|
||||
// This can fail on empty mounted drives (e.g. with ERROR_NOT_READY or ERROR_INVALID_FUNCTION).
|
||||
BY_HANDLE_FILE_INFORMATION info{};
|
||||
|
||||
if (!GetFileInformationByHandle(handle, &info))
|
||||
{
|
||||
const DWORD last_error = GetLastError();
|
||||
@@ -2030,7 +1670,7 @@ fs::file::file(const std::string& path, bs_t<open_mode> mode)
|
||||
g_tls_error = fs::error::isdir;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
g_tls_error = to_error(last_error);
|
||||
return;
|
||||
}
|
||||
@@ -2042,7 +1682,7 @@ fs::file::file(const std::string& path, bs_t<open_mode> mode)
|
||||
return;
|
||||
}
|
||||
|
||||
if ((mode & fs::write) && (info.dwFileAttributes & FILE_ATTRIBUTE_SYSTEM))
|
||||
if (info.dwFileAttributes & FILE_ATTRIBUTE_SYSTEM)
|
||||
{
|
||||
CloseHandle(handle);
|
||||
g_tls_error = fs::error::acces;
|
||||
@@ -2058,9 +1698,6 @@ fs::file::file(const std::string& path, bs_t<open_mode> mode)
|
||||
|
||||
m_file = std::make_unique<windows_file>(handle);
|
||||
#else
|
||||
// An optical raw device can only be read: any write related flag makes the opening fail (handled as any other error)
|
||||
const bool raw_device = is_optical_raw_device(path);
|
||||
|
||||
int flags = O_CLOEXEC; // Ensures all files are closed on execl for auto updater
|
||||
|
||||
if (mode & fs::read && mode & fs::write) flags |= O_RDWR;
|
||||
@@ -2076,7 +1713,7 @@ fs::file::file(const std::string& path, bs_t<open_mode> mode)
|
||||
|
||||
if (mode & fs::write && mode & fs::unread)
|
||||
{
|
||||
if (!raw_device && !(mode & (fs::excl + fs::lock)) && mode & fs::trunc)
|
||||
if (!(mode & (fs::excl + fs::lock)) && mode & fs::trunc)
|
||||
{
|
||||
// Alternative to truncation for "unread" flag (TODO)
|
||||
if (mode & fs::create)
|
||||
@@ -2109,23 +1746,6 @@ fs::file::file(const std::string& path, bs_t<open_mode> mode)
|
||||
ensure(::ftruncate(fd, 0) == 0);
|
||||
}
|
||||
|
||||
// If path points to an optical raw device, complete the file opening
|
||||
if (raw_device)
|
||||
{
|
||||
// Try to retrieve the size of the content. If it fails, no disc is probably mounted so abort the file opening
|
||||
const u64 raw_device_size = get_raw_device_size(fd);
|
||||
|
||||
if (!raw_device_size)
|
||||
{
|
||||
::close(fd);
|
||||
g_tls_error = fs::error::noent;
|
||||
return;
|
||||
}
|
||||
|
||||
m_file = std::make_unique<unix_file>(fd, raw_device_size);
|
||||
return;
|
||||
}
|
||||
|
||||
m_file = std::make_unique<unix_file>(fd);
|
||||
|
||||
if (mode & fs::isfile && !(mode & fs::write) && get_stat().is_directory)
|
||||
@@ -2252,17 +1872,6 @@ fs::native_handle fs::file::get_handle() const
|
||||
#endif
|
||||
}
|
||||
|
||||
bool fs::set_sparse([[maybe_unused]] const fs::file& file)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
FILE_SET_SPARSE_BUFFER sparse{TRUE};
|
||||
DWORD returned = 0;
|
||||
return DeviceIoControl(file.get_handle(), FSCTL_SET_SPARSE, &sparse, sizeof(sparse), nullptr, 0, &returned, nullptr) != FALSE;
|
||||
#else
|
||||
return true;
|
||||
#endif
|
||||
}
|
||||
|
||||
fs::file_id fs::file::get_id() const
|
||||
{
|
||||
if (m_file)
|
||||
@@ -2547,7 +2156,6 @@ const std::string& fs::get_config_dir([[maybe_unused]] bool get_config_subdirect
|
||||
// Clear buffer on failure and notify user
|
||||
MessageBoxA(nullptr, fmt::format("GetEnvironmentVariable(RPCS3_CONFIG_DIR) failed: error: %s", fmt::win_error{GetLastError(), nullptr}).c_str(), "fs::get_config_dir()", MB_ICONERROR);
|
||||
buf.clear();
|
||||
size = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3225,7 +2833,6 @@ void fmt_class_string<fs::error>::format(std::string& out, u64 arg)
|
||||
case fs::error::notempty: return "Not empty";
|
||||
case fs::error::readonly: return "Read only";
|
||||
case fs::error::isdir: return "Is a directory";
|
||||
case fs::error::notdir: return "Not a directory";
|
||||
case fs::error::toolong: return "Path too long";
|
||||
case fs::error::nospace: return "Not enough space on the device";
|
||||
case fs::error::xdev: return "Device mismatch";
|
||||
|
||||
@@ -198,19 +198,6 @@ namespace fs
|
||||
// Return "path" plus an ending delimiter (if missing) if "path" is an existing directory. Otherwise, an empty string
|
||||
std::string get_path_if_dir(const std::string& path);
|
||||
|
||||
// Check whether the path is the bare name of a drive (e.g. "E:"), that is a root path whose trailing delimiter was
|
||||
// trimmed: such a path does not point to the root of the drive but to the current directory of that drive, so the
|
||||
// delimiter must be restored before using or storing it.
|
||||
// NOTE: always false on the other platforms, where a name ending with ':' is a regular path component
|
||||
inline bool is_drive_name([[maybe_unused]] std::string_view path)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
return !path.empty() && path.back() == ':';
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
// Get file information
|
||||
bool get_stat(const std::string& path, stat_t& info);
|
||||
|
||||
@@ -226,13 +213,6 @@ namespace fs
|
||||
// Check whether the path points to an existing symlink
|
||||
bool is_symlink(const std::string& path);
|
||||
|
||||
// Check whether the path points to a raw device (e.g. "\\.\E:" on Windows, "/dev/sr0" on Linux, "/dev/rdisk2" on macOS)
|
||||
bool is_optical_raw_device(const std::string& path);
|
||||
|
||||
// Check whether the path points to an optical drive or to a mounted disc image (either the raw device itself or the
|
||||
// mount point of the disc/image). If so, provide the raw device in "raw_device" if requested
|
||||
bool get_optical_raw_device(const std::string& path, std::string* raw_device = nullptr);
|
||||
|
||||
// Get filesystem information
|
||||
bool statfs(const std::string& path, device_stat& info);
|
||||
|
||||
@@ -263,8 +243,8 @@ namespace fs
|
||||
// Set file access/modification time
|
||||
bool utime(const std::string& path, s64 atime, s64 mtime);
|
||||
|
||||
// Synchronize the filesystem containing the given path (only that filesystem where supported)
|
||||
void sync(const std::string& path);
|
||||
// Synchronize filesystems (TODO)
|
||||
void sync();
|
||||
|
||||
class file final
|
||||
{
|
||||
@@ -510,9 +490,6 @@ namespace fs
|
||||
}
|
||||
};
|
||||
|
||||
// Enable sparse-file semantics when required by the host platform.
|
||||
bool set_sparse(const file& file);
|
||||
|
||||
class dir final
|
||||
{
|
||||
std::unique_ptr<dir_base> m_dir{};
|
||||
@@ -706,7 +683,6 @@ namespace fs
|
||||
notempty,
|
||||
readonly,
|
||||
isdir,
|
||||
notdir,
|
||||
toolong,
|
||||
nospace,
|
||||
xdev,
|
||||
|
||||
@@ -244,6 +244,7 @@ namespace asmjit
|
||||
|
||||
void vec_load_unaligned(u32 esize, const Operand& v, const x86::Mem& src);
|
||||
void vec_store_unaligned(u32 esize, const Operand& v, const x86::Mem& dst);
|
||||
void vec_partial_move(u32 esize, const Operand& dst, const Operand& src);
|
||||
|
||||
void _vec_binary_op(x86::Inst::Id sse_op, x86::Inst::Id vex_op, x86::Inst::Id evex_op, const Operand& dst, const Operand& lhs, const Operand& rhs);
|
||||
|
||||
@@ -433,35 +434,13 @@ namespace asmjit
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef __APPLE__
|
||||
struct jit_write_guard
|
||||
{
|
||||
jit_write_guard() noexcept
|
||||
{
|
||||
pthread_jit_write_protect_np(false);
|
||||
|
||||
// Ensure stores are not reordered by the compiler
|
||||
atomic_fence_acq_rel();
|
||||
}
|
||||
|
||||
~jit_write_guard() noexcept
|
||||
{
|
||||
// Ensure stores are not reordered by the compiler
|
||||
atomic_fence_seq_cst();
|
||||
|
||||
pthread_jit_write_protect_np(true);
|
||||
}
|
||||
};
|
||||
#else
|
||||
#define jit_write_guard [[maybe_unused]] int
|
||||
#endif
|
||||
|
||||
// Build runtime function with asmjit::X86Assembler
|
||||
template <typename FT, typename Asm = native_asm, typename F>
|
||||
inline FT build_function_asm(std::string_view name, F&& builder, ::jit_runtime* custom_runtime = nullptr, bool reduced_size = false)
|
||||
{
|
||||
jit_write_guard jit_guard;
|
||||
|
||||
#ifdef __APPLE__
|
||||
pthread_jit_write_protect_np(false);
|
||||
#endif
|
||||
using namespace asmjit;
|
||||
|
||||
auto& rt = custom_runtime ? *custom_runtime : get_global_runtime();
|
||||
@@ -514,10 +493,6 @@ inline FT build_function_asm(std::string_view name, F&& builder, ::jit_runtime*
|
||||
return reinterpret_cast<FT>(uptr(result));
|
||||
}
|
||||
|
||||
#if defined(__INTELLISENSE__) && !defined(LLVM_AVAILABLE)
|
||||
#define LLVM_AVAILABLE
|
||||
#endif
|
||||
|
||||
#ifdef LLVM_AVAILABLE
|
||||
|
||||
namespace llvm
|
||||
@@ -546,7 +521,7 @@ class jit_compiler final
|
||||
atomic_t<usz> m_disk_space = umax;
|
||||
|
||||
public:
|
||||
jit_compiler(const std::unordered_map<std::string, u64>& _link, std::string_view _cpu, u32 flags = 0, std::function<u64(const std::string&)> symbols_cement = {}) noexcept;
|
||||
jit_compiler(const std::unordered_map<std::string, u64>& _link, const std::string& _cpu, u32 flags = 0, std::function<u64(const std::string&)> symbols_cement = {}) noexcept;
|
||||
jit_compiler& operator=(thread_state) noexcept;
|
||||
~jit_compiler() noexcept;
|
||||
|
||||
@@ -564,15 +539,9 @@ public:
|
||||
// Add module (path to obj cache dir)
|
||||
void add(std::unique_ptr<llvm::Module> _module, const std::string& path);
|
||||
|
||||
// Returns false after LLVM fatal recovery. The compiler must be discarded.
|
||||
bool try_add(std::unique_ptr<llvm::Module> _module, const std::string& path, std::string& error);
|
||||
|
||||
// Add module (not cached)
|
||||
void add(std::unique_ptr<llvm::Module> _module);
|
||||
|
||||
// Returns false after LLVM fatal recovery. The compiler must be discarded.
|
||||
bool try_add(std::unique_ptr<llvm::Module> _module, std::string& error);
|
||||
|
||||
// Add object (path to obj file)
|
||||
bool add(const std::string& path);
|
||||
|
||||
@@ -585,14 +554,11 @@ public:
|
||||
// Finalize
|
||||
void fin();
|
||||
|
||||
// Returns false after LLVM fatal recovery. The compiler must be discarded.
|
||||
bool try_fin(std::string& error);
|
||||
|
||||
// Get compiled function address
|
||||
u64 get(const std::string& name);
|
||||
|
||||
// Get CPU info
|
||||
static std::string cpu(std::string_view _cpu);
|
||||
static std::string cpu(const std::string& _cpu);
|
||||
|
||||
// Get system triple (PPU)
|
||||
static std::string triple1();
|
||||
|
||||
@@ -122,7 +122,7 @@ static u8* get_jit_memory()
|
||||
// Reserve 2G memory (magic static)
|
||||
static void* const s_memory2 = []() -> void*
|
||||
{
|
||||
void* ptr = utils::memory_reserve(0x80000000, true);
|
||||
void* ptr = utils::memory_reserve(0x80000000);
|
||||
#ifdef CAN_OVERCOMMIT
|
||||
utils::memory_commit(ptr, 0x80000000);
|
||||
utils::memory_protect(ptr, 0x40000000, utils::protection::wx);
|
||||
@@ -316,10 +316,10 @@ void jit_runtime::finalize() noexcept
|
||||
#endif
|
||||
// Reset JIT memory
|
||||
#ifdef CAN_OVERCOMMIT
|
||||
utils::memory_reset(get_jit_memory(), 0x80000000, true);
|
||||
utils::memory_reset(get_jit_memory(), 0x80000000);
|
||||
utils::memory_protect(get_jit_memory(), 0x40000000, utils::protection::wx);
|
||||
#else
|
||||
utils::memory_decommit(get_jit_memory(), 0x80000000, true);
|
||||
utils::memory_decommit(get_jit_memory(), 0x80000000);
|
||||
#endif
|
||||
|
||||
s_code_pos = 0;
|
||||
@@ -348,7 +348,7 @@ jit_runtime_base& asmjit::get_global_runtime()
|
||||
{
|
||||
custom_runtime() noexcept
|
||||
{
|
||||
ensure(m_pos.raw() = static_cast<uchar*>(utils::memory_reserve(size, true)));
|
||||
ensure(m_pos.raw() = static_cast<uchar*>(utils::memory_reserve(size)));
|
||||
|
||||
// Initialize "end" pointer
|
||||
m_max = m_pos + size;
|
||||
|
||||
@@ -12,12 +12,6 @@
|
||||
|
||||
#include <charconv>
|
||||
|
||||
#if defined(__APPLE__)
|
||||
#include <pthread.h>
|
||||
#elif defined(ANDROID)
|
||||
#include "util/cctype.hpp"
|
||||
#endif
|
||||
|
||||
LOG_CHANNEL(jit_log, "JIT");
|
||||
|
||||
#ifdef LLVM_AVAILABLE
|
||||
@@ -56,44 +50,6 @@ LOG_CHANNEL(jit_log, "JIT");
|
||||
#include "Emu/CPU/Backends/AArch64/AArch64Common.h"
|
||||
#endif
|
||||
|
||||
namespace
|
||||
{
|
||||
thread_local std::string* g_llvm_fatal_message = nullptr;
|
||||
|
||||
template <typename F>
|
||||
bool run_recoverable_llvm(F&& func, std::string& error)
|
||||
{
|
||||
error.clear();
|
||||
|
||||
// Run LLVM codegen in a disposable thread. If LLVM invokes the fatal
|
||||
// handler, only this helper thread exits.
|
||||
named_thread worker("LLVM JIT", [&]()
|
||||
{
|
||||
#if defined(__APPLE__)
|
||||
pthread_jit_write_protect_np(false);
|
||||
#endif
|
||||
g_llvm_fatal_message = &error;
|
||||
|
||||
std::forward<F>(func)();
|
||||
|
||||
g_llvm_fatal_message = nullptr;
|
||||
#if defined(__APPLE__)
|
||||
pthread_jit_write_protect_np(true);
|
||||
#endif
|
||||
});
|
||||
|
||||
worker();
|
||||
const bool result = static_cast<thread_state>(worker) == thread_state::finished;
|
||||
|
||||
if (!result && error.empty())
|
||||
{
|
||||
error = "LLVM crash recovery invoked";
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
const bool jit_initialize = []() -> bool
|
||||
{
|
||||
llvm::InitializeNativeTarget();
|
||||
@@ -243,7 +199,7 @@ struct MemoryManager1 : llvm::RTDyldMemoryManager
|
||||
MemoryManager1(std::function<u64(const std::string&)> symbols_cement = {}) noexcept
|
||||
: m_symbols_cement(std::move(symbols_cement))
|
||||
{
|
||||
auto ptr = reinterpret_cast<u8*>(utils::memory_reserve(c_max_size * 3, true));
|
||||
auto ptr = reinterpret_cast<u8*>(utils::memory_reserve(c_max_size * 3));
|
||||
m_code_mems = ptr;
|
||||
// ptr += c_max_size;
|
||||
// m_data_ro_mems = ptr;
|
||||
@@ -262,7 +218,7 @@ struct MemoryManager1 : llvm::RTDyldMemoryManager
|
||||
// utils::memory_decommit(m_code_mems, how_much(code_ptr));
|
||||
// utils::memory_decommit(m_data_ro_mems, how_much(data_ro_ptr));
|
||||
// utils::memory_decommit(m_data_rw_mems, how_much(data_rw_ptr));
|
||||
utils::memory_decommit(m_code_mems, c_max_size * 3, true);
|
||||
utils::memory_decommit(m_code_mems, c_max_size * 3);
|
||||
}
|
||||
|
||||
llvm::JITSymbol findSymbol(const std::string& name) override
|
||||
@@ -553,9 +509,9 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
std::string jit_compiler::cpu(std::string_view _cpu)
|
||||
std::string jit_compiler::cpu(const std::string& _cpu)
|
||||
{
|
||||
std::string m_cpu = std::string(_cpu);
|
||||
std::string m_cpu = _cpu;
|
||||
|
||||
if (m_cpu.empty())
|
||||
{
|
||||
@@ -683,7 +639,7 @@ bool jit_compiler::add_sub_disk_space(ssz space)
|
||||
}).second;
|
||||
}
|
||||
|
||||
jit_compiler::jit_compiler(const std::unordered_map<std::string, u64>& _link, std::string_view _cpu, u32 flags, std::function<u64(const std::string&)> symbols_cement) noexcept
|
||||
jit_compiler::jit_compiler(const std::unordered_map<std::string, u64>& _link, const std::string& _cpu, u32 flags, std::function<u64(const std::string&)> symbols_cement) noexcept
|
||||
: m_context(new llvm::LLVMContext)
|
||||
, m_cpu(cpu(_cpu))
|
||||
{
|
||||
@@ -693,13 +649,6 @@ jit_compiler::jit_compiler(const std::unordered_map<std::string, u64>& _link, st
|
||||
llvm::install_fatal_error_handler([](void*, const char* msg, bool)
|
||||
{
|
||||
const std::string_view out = msg ? msg : "";
|
||||
|
||||
if (g_llvm_fatal_message)
|
||||
{
|
||||
*g_llvm_fatal_message = out;
|
||||
thread_ctrl::silent_exit();
|
||||
}
|
||||
|
||||
fmt::throw_exception("LLVM Emergency Exit Invoked: '%s'", out);
|
||||
}, nullptr);
|
||||
|
||||
@@ -709,7 +658,11 @@ jit_compiler::jit_compiler(const std::unordered_map<std::string, u64>& _link, st
|
||||
std::string result;
|
||||
|
||||
auto null_mod = std::make_unique<llvm::Module> ("null_", *m_context);
|
||||
#if LLVM_VERSION_MAJOR >= 21 && (LLVM_VERSION_MINOR >= 1 || LLVM_VERSION_MAJOR >= 22)
|
||||
null_mod->setTargetTriple(llvm::Triple(jit_compiler::triple1()));
|
||||
#else
|
||||
null_mod->setTargetTriple(jit_compiler::triple1());
|
||||
#endif
|
||||
|
||||
std::unique_ptr<llvm::RTDyldMemoryManager> mem;
|
||||
|
||||
@@ -723,7 +676,11 @@ jit_compiler::jit_compiler(const std::unordered_map<std::string, u64>& _link, st
|
||||
else
|
||||
{
|
||||
mem = std::make_unique<MemoryManager2>(std::move(symbols_cement));
|
||||
#if LLVM_VERSION_MAJOR >= 21 && (LLVM_VERSION_MINOR >= 1 || LLVM_VERSION_MAJOR >= 22)
|
||||
null_mod->setTargetTriple(llvm::Triple(jit_compiler::triple2()));
|
||||
#else
|
||||
null_mod->setTargetTriple(jit_compiler::triple2());
|
||||
#endif
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -744,15 +701,6 @@ jit_compiler::jit_compiler(const std::unordered_map<std::string, u64>& _link, st
|
||||
else
|
||||
attributes.push_back("-dotprod");
|
||||
|
||||
// The recompilers emit i8mm intrinsics (e.g. ummla) gated on utils::has_i8mm().
|
||||
// The JIT target features must advertise i8mm too, otherwise the backend fails
|
||||
// with "Cannot select: intrinsic %llvm.aarch64.neon.ummla" whenever the resolved
|
||||
// -mcpu does not already imply it (e.g. the cortex-a78 fallback on Apple silicon).
|
||||
if (utils::has_i8mm())
|
||||
attributes.push_back("+i8mm");
|
||||
else
|
||||
attributes.push_back("-i8mm");
|
||||
|
||||
if (utils::has_sve())
|
||||
attributes.push_back("+sve");
|
||||
else
|
||||
@@ -840,33 +788,6 @@ void jit_compiler::add(std::unique_ptr<llvm::Module> _module, const std::string&
|
||||
}
|
||||
}
|
||||
|
||||
bool jit_compiler::try_add(std::unique_ptr<llvm::Module> _module, const std::string& path, std::string& error)
|
||||
{
|
||||
ObjectCache cache{path, this};
|
||||
m_engine->setObjectCache(&cache);
|
||||
|
||||
const auto ptr = _module.get();
|
||||
m_engine->addModule(std::move(_module));
|
||||
|
||||
if (!run_recoverable_llvm([&]()
|
||||
{
|
||||
m_engine->generateCodeForModule(ptr);
|
||||
}, error))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
m_engine->setObjectCache(nullptr);
|
||||
|
||||
for (auto& func : ptr->functions())
|
||||
{
|
||||
// Delete IR to lower memory consumption
|
||||
func.deleteBody();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void jit_compiler::add(std::unique_ptr<llvm::Module> _module)
|
||||
{
|
||||
const auto ptr = _module.get();
|
||||
@@ -880,28 +801,6 @@ void jit_compiler::add(std::unique_ptr<llvm::Module> _module)
|
||||
}
|
||||
}
|
||||
|
||||
bool jit_compiler::try_add(std::unique_ptr<llvm::Module> _module, std::string& error)
|
||||
{
|
||||
const auto ptr = _module.get();
|
||||
m_engine->addModule(std::move(_module));
|
||||
|
||||
if (!run_recoverable_llvm([&]()
|
||||
{
|
||||
m_engine->generateCodeForModule(ptr);
|
||||
}, error))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
for (auto& func : ptr->functions())
|
||||
{
|
||||
// Delete IR to lower memory consumption
|
||||
func.deleteBody();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool jit_compiler::add(const std::string& path)
|
||||
{
|
||||
auto cache = ObjectCache::load(path);
|
||||
@@ -953,14 +852,6 @@ void jit_compiler::fin()
|
||||
m_engine->finalizeObject();
|
||||
}
|
||||
|
||||
bool jit_compiler::try_fin(std::string& error)
|
||||
{
|
||||
return run_recoverable_llvm([&]()
|
||||
{
|
||||
m_engine->finalizeObject();
|
||||
}, error);
|
||||
}
|
||||
|
||||
u64 jit_compiler::get(const std::string& name)
|
||||
{
|
||||
return m_engine->getGlobalValueAddress(name);
|
||||
@@ -1041,7 +932,7 @@ const char * fallback_cpu_detection()
|
||||
return "cortex-a78";
|
||||
}
|
||||
|
||||
std::transform(result.begin(), result.end(), result.begin(), utils::tolower<char>);
|
||||
std::transform(result.begin(), result.end(), result.begin(), ::tolower);
|
||||
return result;
|
||||
}();
|
||||
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
*/
|
||||
|
||||
#include "LUrlParser.h"
|
||||
#include "util/cctype.hpp"
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstring>
|
||||
@@ -37,7 +36,7 @@ static bool IsSchemeValid( const std::string& SchemeName )
|
||||
{
|
||||
return std::all_of(SchemeName.cbegin(), SchemeName.cend(), [](const auto& c)
|
||||
{
|
||||
return utils::isalpha(c) || c == '+' || c == '-' || c == '.';
|
||||
return isalpha(c) || c == '+' || c == '-' || c == '.';
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
#include "cfmt.h"
|
||||
#include "util/endian.hpp"
|
||||
#include "util/v128.hpp"
|
||||
#include "util/cctype.hpp"
|
||||
|
||||
#include <locale>
|
||||
#include <codecvt>
|
||||
@@ -199,12 +198,12 @@ fmt::base57_result fmt::base57_result::from_string(std::string_view str)
|
||||
{
|
||||
auto to_val = [](u8 c) -> u64
|
||||
{
|
||||
if (utils::isdigit(c))
|
||||
if (std::isdigit(c))
|
||||
{
|
||||
return c - '0';
|
||||
}
|
||||
|
||||
if (utils::isupper(c))
|
||||
if (std::isupper(c))
|
||||
{
|
||||
// Omitted characters
|
||||
if (c == 'B' || c == 'D' || c == 'I' || c == 'O')
|
||||
@@ -232,7 +231,7 @@ fmt::base57_result fmt::base57_result::from_string(std::string_view str)
|
||||
return c - 'A' + 10;
|
||||
}
|
||||
|
||||
if (utils::islower(c))
|
||||
if (std::islower(c))
|
||||
{
|
||||
// Omitted characters
|
||||
if (c == 'l')
|
||||
@@ -612,7 +611,7 @@ void fmt_class_string<std::source_location>::format(std::string& out, u64 arg)
|
||||
#ifdef _WIN32
|
||||
if (DWORD error = GetLastError())
|
||||
{
|
||||
fmt::append(out, " (error=%s)", fmt::win_error_to_string(error));
|
||||
fmt::append(out, " (error=%s)", error, fmt::win_error_to_string(error));
|
||||
}
|
||||
#else
|
||||
if (int error = errno)
|
||||
@@ -631,13 +630,6 @@ namespace fmt
|
||||
thread_ctrl::emergency_exit(out);
|
||||
}
|
||||
|
||||
[[noreturn]] void raw_verify_error(std::source_location loc, std::source_location propagated_loc, const char8_t* msg, usz object)
|
||||
{
|
||||
std::string out;
|
||||
fmt::append(out, "%s (object: 0x%x)%s%s", msg ? msg : u8"Verification failed", object, loc, propagated_loc);
|
||||
thread_ctrl::emergency_exit(out);
|
||||
}
|
||||
|
||||
[[noreturn]] void raw_range_error(std::source_location loc, std::string_view index, usz container_size)
|
||||
{
|
||||
std::string out;
|
||||
@@ -929,13 +921,6 @@ std::string_view fmt::trim_front_sv(std::string_view source, std::string_view va
|
||||
void fmt::trim_back(std::string& source, std::string_view values)
|
||||
{
|
||||
const usz index = source.find_last_not_of(values);
|
||||
|
||||
if (index == source.npos)
|
||||
{
|
||||
source.clear();
|
||||
return;
|
||||
}
|
||||
|
||||
source.resize(index + 1);
|
||||
}
|
||||
|
||||
@@ -953,7 +938,7 @@ std::string fmt::to_upper(std::string_view string)
|
||||
{
|
||||
std::string result;
|
||||
result.resize(string.size());
|
||||
std::transform(string.begin(), string.end(), result.begin(), utils::toupper<char>);
|
||||
std::transform(string.begin(), string.end(), result.begin(), ::toupper);
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -961,7 +946,7 @@ std::string fmt::to_lower(std::string_view string)
|
||||
{
|
||||
std::string result;
|
||||
result.resize(string.size());
|
||||
std::transform(string.begin(), string.end(), result.begin(), utils::tolower<char>);
|
||||
std::transform(string.begin(), string.end(), result.begin(), ::tolower);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@@ -23,19 +23,19 @@ inline void strcpy_trunc(D&& dst, const T& src)
|
||||
}
|
||||
|
||||
// Convert string to signed integer
|
||||
bool try_to_int64(s64* out, std::string_view value, s64 min, s64 max, std::string_view name = {});
|
||||
bool try_to_int64(s64* out, std::string_view value, s64 min, s64 max);
|
||||
|
||||
// Convert string to unsigned integer
|
||||
bool try_to_uint64(u64* out, std::string_view value, u64 min, u64 max, std::string_view name = {});
|
||||
bool try_to_uint64(u64* out, std::string_view value, u64 min, u64 max);
|
||||
|
||||
// Convert string to unsigned int128_t
|
||||
bool try_to_uint128(u128* out, std::string_view value, std::string_view name = {});
|
||||
bool try_to_uint128(u128* out, std::string_view value);
|
||||
|
||||
// Convert string to float
|
||||
bool try_to_float(f64* out, std::string_view value, f64 min, f64 max, std::string_view name = {});
|
||||
bool try_to_float(f64* out, std::string_view value, f64 min, f64 max);
|
||||
|
||||
// Convert float to string locale independent
|
||||
bool try_to_string(std::string* out, f64 value, std::string_view name = {});
|
||||
bool try_to_string(std::string* out, const f64& value);
|
||||
|
||||
// Get the file extension of a file path ("png", "jpg", etc.)
|
||||
std::string get_file_extension(const std::string& file_path);
|
||||
@@ -161,7 +161,7 @@ namespace fmt
|
||||
std::string_view trim_back_sv(std::string_view source, std::string_view values = " \t");
|
||||
|
||||
template <typename T>
|
||||
std::string merge(const T& source, std::string_view separator, bool is_skip_empty = false)
|
||||
std::string merge(const T& source, std::string_view separator)
|
||||
{
|
||||
if (source.empty())
|
||||
{
|
||||
@@ -180,23 +180,6 @@ namespace fmt
|
||||
auto it = source.begin();
|
||||
auto end = source.end();
|
||||
|
||||
if (is_skip_empty)
|
||||
{
|
||||
for (; it != end; ++it)
|
||||
{
|
||||
if (it->empty()) continue;
|
||||
|
||||
if (!result.empty() && !separator.empty())
|
||||
{
|
||||
result.append(separator);
|
||||
}
|
||||
|
||||
result.append(*it);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
for (--end; it != end; ++it)
|
||||
{
|
||||
result.append(*it);
|
||||
@@ -209,7 +192,7 @@ namespace fmt
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
std::string merge(std::initializer_list<T> sources, std::string_view separator, bool is_skip_empty = false)
|
||||
std::string merge(std::initializer_list<T> sources, std::string_view separator)
|
||||
{
|
||||
if (!sources.size())
|
||||
{
|
||||
@@ -230,11 +213,6 @@ namespace fmt
|
||||
|
||||
for (const auto& v : sources)
|
||||
{
|
||||
if (v.empty()) continue;
|
||||
|
||||
std::string sub = fmt::merge(v, separator, is_skip_empty);
|
||||
if (sub.empty()) continue;
|
||||
|
||||
if (first)
|
||||
{
|
||||
first = false;
|
||||
@@ -244,7 +222,7 @@ namespace fmt
|
||||
result.append(separator);
|
||||
}
|
||||
|
||||
result.append(std::move(sub));
|
||||
result.append(fmt::merge(v, separator));
|
||||
}
|
||||
|
||||
return result;
|
||||
|
||||
@@ -129,7 +129,7 @@ public:
|
||||
const native_entry entry_point;
|
||||
|
||||
// Set name for debugger
|
||||
static void set_name(std::string name);
|
||||
static void set_name(std::string);
|
||||
|
||||
private:
|
||||
// Thread handle (platform-specific)
|
||||
@@ -232,7 +232,11 @@ public:
|
||||
}
|
||||
|
||||
// Set current thread name (not recommended)
|
||||
static void set_name(std::string name);
|
||||
static void set_name(std::string name)
|
||||
{
|
||||
g_tls_this_thread->m_tname.store(make_single<std::string>(name));
|
||||
g_tls_this_thread->set_name(std::move(name));
|
||||
}
|
||||
|
||||
// Set thread name (not recommended)
|
||||
template <typename T>
|
||||
@@ -315,9 +319,6 @@ public:
|
||||
// Exit.
|
||||
[[noreturn]] static void emergency_exit(std::string_view reason);
|
||||
|
||||
// Exit the current named thread as errored without reporting a fatal error.
|
||||
[[noreturn]] static void silent_exit() noexcept;
|
||||
|
||||
// Get current thread (may be nullptr)
|
||||
static thread_base* get_current()
|
||||
{
|
||||
@@ -800,30 +801,31 @@ public:
|
||||
m_count = 0;
|
||||
|
||||
// Create all threads
|
||||
for (; m_count < count - 1; m_count++)
|
||||
for (u32 i = 0; i < count - 1; i++)
|
||||
{
|
||||
// Copy the context
|
||||
std::remove_cvref_t<Context> context(static_cast<const Context&>(f));
|
||||
|
||||
// Perform the check and additional preparations for each context
|
||||
if (!std::invoke(std::forward<CheckAndPrepare>(check), m_count, context))
|
||||
if (!std::invoke(std::forward<CheckAndPrepare>(check), i, context))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
new (static_cast<void*>(m_threads + m_count)) Thread(std::string(name) + std::to_string(m_count + 1), std::move(context));
|
||||
m_count++;
|
||||
new (static_cast<void*>(m_threads + i)) Thread(std::string(name) + std::to_string(i + 1), std::move(context));
|
||||
}
|
||||
|
||||
// Move the context (if movable)
|
||||
std::remove_cvref_t<Context> context(std::forward<Context>(f));
|
||||
|
||||
if (!std::invoke(std::forward<CheckAndPrepare>(check), m_count, context))
|
||||
if (!std::invoke(std::forward<CheckAndPrepare>(check), m_count - 1, context))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
new (static_cast<void*>(m_threads + m_count)) Thread(std::string(name) + std::to_string(m_count + 1), std::move(context));
|
||||
m_count++;
|
||||
new (static_cast<void*>(m_threads + m_count - 1)) Thread(std::string(name) + std::to_string(m_count - 1), std::move(context));
|
||||
}
|
||||
|
||||
// Default constructor
|
||||
@@ -905,6 +907,3 @@ public:
|
||||
::operator delete(static_cast<void*>(m_threads), std::align_val_t{alignof(Thread)});
|
||||
}
|
||||
};
|
||||
|
||||
usz map_workload(std::string_view thread_name, usz thread_count, usz count, std::function<void(usz)>&& func);
|
||||
usz map_workload(std::string_view thread_name, usz thread_count, std::function<void()>&& func);
|
||||
|
||||
@@ -5,13 +5,11 @@
|
||||
#include "version.h"
|
||||
#include "Emu/IdManager.h"
|
||||
#include "Emu/Memory/vm.h"
|
||||
#include "Emu/emu_callbacks.h"
|
||||
#include "Emu/System.h"
|
||||
#include "Emu/VFS.h"
|
||||
|
||||
#include "util/types.hpp"
|
||||
#include "util/asm.hpp"
|
||||
#include "util/cctype.hpp"
|
||||
|
||||
#include <charconv>
|
||||
#include <regex>
|
||||
@@ -331,7 +329,7 @@ bool patch_engine::load(patch_map& patches_map, const std::string& path, std::st
|
||||
is_valid = false;
|
||||
continue;
|
||||
}
|
||||
else if (serial.size() != 9 || !std::all_of(serial.begin(), serial.end(), [](char c) { return utils::isalnum(c); }))
|
||||
else if (serial.size() != 9 || !std::all_of(serial.begin(), serial.end(), [](char c) { return std::isalnum(static_cast<unsigned char>(c)); }))
|
||||
{
|
||||
append_log_message(log_messages, fmt::format("Error: Serial '%s' invalid (patch: %s, key: %s, location: %s, file: %s)", serial, description, main_key, get_yaml_node_location(serial_node), path), &patch_log.error);
|
||||
is_valid = false;
|
||||
@@ -964,7 +962,7 @@ static usz apply_modification(std::vector<u32>& applied, patch_engine::patch_inf
|
||||
const u32 alloc_size = utils::align(static_cast<u32>(p.value.long_value) + alloc_at % 4096, 4096);
|
||||
|
||||
// Allocate map if needed, if allocated flags will indicate that bit 62 is set (unique identifier)
|
||||
auto alloc_map = vm::reserve_map(vm::any, alloc_at & -0x10000, utils::align(alloc_size, 0x10000), vm::block_size_64k | (1ull << 62));
|
||||
auto alloc_map = vm::reserve_map(vm::any, alloc_at & -0x10000, utils::align(alloc_size, 0x10000), vm::page_size_64k | (1ull << 62));
|
||||
|
||||
u64 flags = vm::alloc_unwritable;
|
||||
|
||||
@@ -1190,7 +1188,7 @@ static usz apply_modification(std::vector<u32>& applied, patch_engine::patch_inf
|
||||
|
||||
if (!addr)
|
||||
{
|
||||
patch_log.error("Failed to allocate 0x%x bytes for code (entry=0x%x)", alloc_size, out_branch);
|
||||
patch_log.error("Failed to allocate 0x%x bytes for code (entry=0x%x)", alloc_size, addr, out_branch);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -1388,7 +1386,7 @@ static usz apply_modification(std::vector<u32>& applied, patch_engine::patch_inf
|
||||
|
||||
if (exec_addr)
|
||||
{
|
||||
g_emu_callbacks.add_breakpoint(exec_addr);
|
||||
Emu.GetCallbacks().add_breakpoint(exec_addr);
|
||||
}
|
||||
|
||||
break;
|
||||
@@ -1436,7 +1434,7 @@ static usz apply_modification(std::vector<u32>& applied, patch_engine::patch_inf
|
||||
|
||||
if (dest_path.empty())
|
||||
{
|
||||
patch_log.error("Failed to patch file path at '%s': destination is not mounted", original_vfs_path);
|
||||
patch_log.error("Failed to patch file path at '%s': destination is not mounted", original_vfs_path, dest_vfs_path);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -1805,9 +1803,8 @@ static void append_patches(patch_engine::patch_map& existing_patches, const patc
|
||||
|
||||
bool patch_engine::save_patches(const patch_map& patches, const std::string& path, std::stringstream* log_messages)
|
||||
{
|
||||
fs::pending_file file(path);
|
||||
|
||||
if (!file.file)
|
||||
fs::file file(path, fs::rewrite);
|
||||
if (!file)
|
||||
{
|
||||
append_log_message(log_messages, fmt::format("Failed to open patch file %s (%s)", path, fs::g_tls_error), &patch_log.fatal);
|
||||
return false;
|
||||
@@ -1907,17 +1904,7 @@ bool patch_engine::save_patches(const patch_map& patches, const std::string& pat
|
||||
out << YAML::Flow;
|
||||
out << YAML::BeginSeq;
|
||||
out << fmt::format("%s", data.type);
|
||||
|
||||
if (patch_type_uses_hex_offset(data.type))
|
||||
{
|
||||
out << fmt::format("0x%.8x", data.offset);
|
||||
}
|
||||
else
|
||||
{
|
||||
// This element is a path for move_file and hide_file, not an address
|
||||
out << data.original_offset;
|
||||
}
|
||||
|
||||
out << fmt::format("0x%.8x", data.offset);
|
||||
out << data.original_value;
|
||||
out << YAML::EndSeq;
|
||||
}
|
||||
@@ -1931,11 +1918,7 @@ bool patch_engine::save_patches(const patch_map& patches, const std::string& pat
|
||||
|
||||
out << YAML::EndMap;
|
||||
|
||||
if (file.file.write(out.c_str(), out.size()) < out.size() || !file.commit())
|
||||
{
|
||||
append_log_message(log_messages, fmt::format("Failed to write patch file %s (%s)", path, fs::g_tls_error), &patch_log.fatal);
|
||||
return false;
|
||||
}
|
||||
file.write(out.c_str(), out.size());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -146,41 +146,25 @@ public:
|
||||
|
||||
constexpr bool test_and_set(T bit)
|
||||
{
|
||||
const under s = shift(bit);
|
||||
const bool r = (m_data & s) != 0;
|
||||
m_data |= s;
|
||||
return r;
|
||||
}
|
||||
|
||||
constexpr bool test_and_set(T bit, bool value)
|
||||
{
|
||||
const under s = shift(bit);
|
||||
const bool r = (m_data & s) != 0;
|
||||
m_data = (value ? (m_data | s) : (m_data & ~s));
|
||||
bool r = (m_data & shift(bit)) != 0;
|
||||
m_data |= shift(bit);
|
||||
return r;
|
||||
}
|
||||
|
||||
constexpr bool test_and_reset(T bit)
|
||||
{
|
||||
const under s = shift(bit);
|
||||
const bool r = (m_data & s) != 0;
|
||||
m_data &= ~s;
|
||||
bool r = (m_data & shift(bit)) != 0;
|
||||
m_data &= ~shift(bit);
|
||||
return r;
|
||||
}
|
||||
|
||||
constexpr bool test_and_complement(T bit)
|
||||
{
|
||||
const under s = shift(bit);
|
||||
const bool r = (m_data & s) != 0;
|
||||
m_data ^= s;
|
||||
bool r = (m_data & shift(bit)) != 0;
|
||||
m_data ^= shift(bit);
|
||||
return r;
|
||||
}
|
||||
|
||||
constexpr bool test(bs_t arg) const
|
||||
{
|
||||
return (m_data & arg.m_data) != 0;
|
||||
}
|
||||
|
||||
constexpr bool all_of(bs_t arg) const
|
||||
{
|
||||
return (m_data & arg.m_data) == arg.m_data;
|
||||
|
||||
@@ -91,24 +91,6 @@ usz cfmt_append(Dst& out, const Char* fmt, Src&& src)
|
||||
}
|
||||
};
|
||||
|
||||
const auto write_binary = [&](auto value, u64 min_num)
|
||||
{
|
||||
if constexpr (sizeof(value) == 16)
|
||||
{
|
||||
out.resize(out.size() + std::max<u64>(min_num, 128 - utils::clz128(value | 1)), '0');
|
||||
}
|
||||
else
|
||||
{
|
||||
out.resize(out.size() + std::max<u64>(min_num, 64 - std::countl_zero<u64>(value | 1)), '0');
|
||||
}
|
||||
|
||||
// Write in reversed order
|
||||
for (auto i = out.rbegin(); value; i++, value >>= 1)
|
||||
{
|
||||
*i = static_cast<usz>(value & 0b1) ? '1' : '0';
|
||||
}
|
||||
};
|
||||
|
||||
const auto write_decimal = [&](auto value, s64 min_size)
|
||||
{
|
||||
const usz start = out.size();
|
||||
@@ -653,71 +635,6 @@ usz cfmt_append(Dst& out, const Char* fmt, Src&& src)
|
||||
break;
|
||||
}
|
||||
|
||||
case 'b':
|
||||
case 'B':
|
||||
{
|
||||
if (!src.test(ctx.args)) [[unlikely]]
|
||||
{
|
||||
drop_sequence();
|
||||
break;
|
||||
}
|
||||
|
||||
const usz src_type = src.type(ctx.args);
|
||||
|
||||
if (!ctx.type || src_type > 8)
|
||||
{
|
||||
ctx.type = static_cast<u8>(src_type);
|
||||
|
||||
if (!ctx.type)
|
||||
{
|
||||
ctx.type = src.size_int;
|
||||
}
|
||||
}
|
||||
|
||||
const u64 mask =
|
||||
ctx.type == 1 ? 0xff :
|
||||
ctx.type == 2 ? 0xffff :
|
||||
ctx.type == 4 ? 0xffff'ffffu :
|
||||
0xffff'ffff'ffff'ffffu;
|
||||
|
||||
// Trunc sign-extended signed types
|
||||
const u64 val = src.template get<u64>(ctx.args) & mask;
|
||||
|
||||
const usz start = out.size();
|
||||
|
||||
if (!ctx.dot || ctx.prec)
|
||||
{
|
||||
if (ctx.type >= 16)
|
||||
{
|
||||
u128 val2 = *reinterpret_cast<const u128*>(val);
|
||||
write_binary(val2, ctx.prec);
|
||||
}
|
||||
else
|
||||
{
|
||||
write_binary(val, ctx.prec);
|
||||
}
|
||||
}
|
||||
|
||||
const usz size2 = out.size() - start;
|
||||
|
||||
if (size2 < ctx.width)
|
||||
{
|
||||
// Add padding if necessary
|
||||
if (ctx.zeros && !ctx.left && !ctx.dot)
|
||||
{
|
||||
out.insert(out.begin() + start + (ctx.alter && val ? 2 : 0), ctx.width - size2, '0');
|
||||
}
|
||||
else
|
||||
{
|
||||
out.insert(ctx.left ? out.end() : out.begin() + start, ctx.width - size2, ' ');
|
||||
}
|
||||
}
|
||||
|
||||
src.skip(ctx.args);
|
||||
ctx = {0};
|
||||
break;
|
||||
}
|
||||
|
||||
case 'p':
|
||||
{
|
||||
if (!src.test(ctx.args) || ctx.type) [[unlikely]]
|
||||
|
||||
@@ -29,7 +29,7 @@ void fmt_class_string<cheat_type>::format(std::string& out, u64 arg)
|
||||
|
||||
bool cheat_info::from_str(std::string_view cheat_line)
|
||||
{
|
||||
auto cheat_vec = fmt::split(cheat_line, {"@@@"}, false);
|
||||
const auto cheat_vec = fmt::split(cheat_line, {"@@@"}, false);
|
||||
|
||||
s64 val64 = 0;
|
||||
if (cheat_vec.size() != 5 || !try_to_int64(&val64, cheat_vec[2], 0, cheat_type_max - 1))
|
||||
@@ -38,11 +38,11 @@ bool cheat_info::from_str(std::string_view cheat_line)
|
||||
return false;
|
||||
}
|
||||
|
||||
game = std::move(cheat_vec[0]);
|
||||
description = std::move(cheat_vec[1]);
|
||||
game = cheat_vec[0];
|
||||
description = cheat_vec[1];
|
||||
type = cheat_type{::narrow<u8>(val64)};
|
||||
offset = std::stoul(cheat_vec[3]);
|
||||
red_script = std::move(cheat_vec[4]);
|
||||
red_script = cheat_vec[4];
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ namespace date_time
|
||||
|
||||
std::string parse_buf;
|
||||
|
||||
if constexpr (separator != 0)
|
||||
if constexpr(separator != 0)
|
||||
parse_buf = std::string("%Y") + separator + "%m" + separator + "%d" + separator + "%H" + separator + "%M" + separator + "%S";
|
||||
else
|
||||
parse_buf = "%Y%m%d%H%M%S";
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
#include <array>
|
||||
#include <cmath>
|
||||
#include <type_traits>
|
||||
|
||||
@@ -724,24 +723,15 @@ struct coord3_base
|
||||
struct { T width, height, depth; };
|
||||
};
|
||||
|
||||
constexpr coord3_base()
|
||||
: position{}, size{}
|
||||
constexpr coord3_base() : position{}, size{}
|
||||
{
|
||||
}
|
||||
|
||||
constexpr coord3_base(const position3_base<T>& position, const size3_base<T>& size)
|
||||
: position{ position }, size{ size }
|
||||
constexpr coord3_base(const position3_base<T>& position, const size3_base<T>& size) : position{ position }, size{ size }
|
||||
{
|
||||
}
|
||||
|
||||
constexpr coord3_base(T x, T y, T z, T width, T height, T depth)
|
||||
: x{ x }, y{ y }, z{ z }, width{ width }, height{ height }, depth{ depth }
|
||||
{
|
||||
}
|
||||
|
||||
constexpr coord3_base(const area_base<T>& area, T z = 0, T depth = 1)
|
||||
: x{ area.x1 }, y{ area.y1 }, z{ z }
|
||||
, width{ area.x2 - area.x1 }, height{ area.y2 - area.y1 }, depth{ depth }
|
||||
constexpr coord3_base(T x, T y, T z, T width, T height, T depth) : x{ x }, y{ y }, z{ z }, width{ width }, height{ height }, depth{ depth }
|
||||
{
|
||||
}
|
||||
|
||||
@@ -764,51 +754,6 @@ struct coord3_base
|
||||
{
|
||||
return{ static_cast<NT>(x), static_cast<NT>(y), static_cast<NT>(z), static_cast<NT>(width), static_cast<NT>(height), static_cast<NT>(depth) };
|
||||
}
|
||||
|
||||
void flip_horizontal()
|
||||
requires std::is_signed_v<T>
|
||||
{
|
||||
auto x2 = x + width;
|
||||
x = x2;
|
||||
width = -width;
|
||||
}
|
||||
|
||||
void flip_vertical()
|
||||
requires std::is_signed_v<T>
|
||||
{
|
||||
auto y2 = y + height;
|
||||
y = y2;
|
||||
height = -height;
|
||||
}
|
||||
|
||||
bool is_flipped() const
|
||||
requires std::is_signed_v<T>
|
||||
{
|
||||
return width < 0 || height < 0 || depth < 0;
|
||||
}
|
||||
|
||||
area_base<T> to_area() const
|
||||
{
|
||||
return { x, y, x + width, y + height };
|
||||
}
|
||||
|
||||
T abs_width() const
|
||||
requires std::is_signed_v<T>
|
||||
{
|
||||
return width < 0 ? -width : width;
|
||||
}
|
||||
|
||||
T abs_height() const
|
||||
requires std::is_signed_v<T>
|
||||
{
|
||||
return height < 0 ? -height : height;
|
||||
}
|
||||
|
||||
T abs_depth() const
|
||||
requires std::is_signed_v<T>
|
||||
{
|
||||
return depth < 0 ? -depth : depth;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -1082,6 +1027,3 @@ using color1u = color1_base<unsigned int>;
|
||||
using color1i = color1_base<int>;
|
||||
using color1f = color1_base<float>;
|
||||
using color1d = color1_base<double>;
|
||||
|
||||
using mat3f = color3_base<float>[3];
|
||||
static_assert(sizeof(mat3f) == sizeof(float) * 3 * 3);
|
||||
|
||||
@@ -28,11 +28,6 @@ class shared_mutex final
|
||||
public:
|
||||
constexpr shared_mutex() = default;
|
||||
|
||||
const atomic_t<u32>& raw() const
|
||||
{
|
||||
return m_value;
|
||||
}
|
||||
|
||||
bool try_lock_shared()
|
||||
{
|
||||
const u32 value = m_value.load();
|
||||
|
||||
@@ -10,19 +10,6 @@ rXmlNode::rXmlNode(const pugi::xml_node& node)
|
||||
handle = node;
|
||||
}
|
||||
|
||||
std::shared_ptr<rXmlNode> rXmlNode::GetChild(std::string_view name)
|
||||
{
|
||||
if (handle)
|
||||
{
|
||||
if (const pugi::xml_node child = handle.child(name))
|
||||
{
|
||||
return std::make_shared<rXmlNode>(child);
|
||||
}
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
std::shared_ptr<rXmlNode> rXmlNode::GetChildren()
|
||||
{
|
||||
if (handle)
|
||||
|
||||
@@ -20,7 +20,6 @@ struct rXmlNode
|
||||
{
|
||||
rXmlNode();
|
||||
rXmlNode(const pugi::xml_node& node);
|
||||
std::shared_ptr<rXmlNode> GetChild(std::string_view name);
|
||||
std::shared_ptr<rXmlNode> GetChildren();
|
||||
std::shared_ptr<rXmlNode> GetNext();
|
||||
std::string GetName();
|
||||
|
||||
@@ -41,13 +41,7 @@ void semaphore_base::imp_wait()
|
||||
// Add waiter
|
||||
value += c_waiter;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}).first;
|
||||
});
|
||||
|
||||
if (value & c_value_mask)
|
||||
{
|
||||
|
||||
@@ -13,33 +13,6 @@
|
||||
|
||||
namespace utils
|
||||
{
|
||||
void clean_backtrace(std::vector<std::string>& result)
|
||||
{
|
||||
for (usz it = 1, first_in_seq = 0, del_count = 0;;)
|
||||
{
|
||||
if (it >= result.size() || result[it] != result[first_in_seq])
|
||||
{
|
||||
if (del_count)
|
||||
{
|
||||
fmt::append(result[first_in_seq], " x%u", del_count + 1);
|
||||
}
|
||||
|
||||
if (it < result.size())
|
||||
{
|
||||
first_in_seq = it;
|
||||
it++;
|
||||
del_count = 0;
|
||||
continue;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
result.erase(result.begin() + it);
|
||||
del_count++;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
std::string wstr_to_utf8(LPWSTR data, int str_len)
|
||||
{
|
||||
@@ -57,61 +30,42 @@ namespace utils
|
||||
return out.data();
|
||||
}
|
||||
|
||||
std::vector<void*> get_backtrace(int max_depth, PCONTEXT ctx)
|
||||
std::vector<void*> get_backtrace(int max_depth)
|
||||
{
|
||||
static struct sym_initer_t
|
||||
{
|
||||
sym_initer_t() noexcept
|
||||
{
|
||||
SymInitialize(GetCurrentProcess(), NULL, TRUE);
|
||||
}
|
||||
~sym_initer_t() noexcept
|
||||
{
|
||||
SymCleanup(GetCurrentProcess());
|
||||
}
|
||||
} s_initer{};
|
||||
|
||||
std::vector<void*> result = {};
|
||||
|
||||
const auto hProcess = ::GetCurrentProcess();
|
||||
const auto hThread = ::GetCurrentThread();
|
||||
|
||||
CONTEXT context{};
|
||||
if (ctx)
|
||||
context = *ctx;
|
||||
else
|
||||
RtlCaptureContext(&context);
|
||||
RtlCaptureContext(&context);
|
||||
|
||||
STACKFRAME64 stack = {};
|
||||
stack.AddrPC.Mode = AddrModeFlat;
|
||||
stack.AddrStack.Mode = AddrModeFlat;
|
||||
stack.AddrFrame.Mode = AddrModeFlat;
|
||||
#if defined(ARCH_X64)
|
||||
const DWORD machineType = IMAGE_FILE_MACHINE_AMD64;
|
||||
stack.AddrPC.Offset = context.Rip;
|
||||
stack.AddrStack.Offset = context.Rsp;
|
||||
stack.AddrFrame.Offset = context.Rbp;
|
||||
#elif defined(ARCH_ARM64)
|
||||
const DWORD machineType = IMAGE_FILE_MACHINE_ARM64;
|
||||
stack.AddrPC.Offset = context.Pc;
|
||||
stack.AddrStack.Offset = context.Sp;
|
||||
stack.AddrFrame.Offset = context.Fp;
|
||||
#else
|
||||
#error "Unsupported architecture"
|
||||
#endif
|
||||
|
||||
while (max_depth--)
|
||||
{
|
||||
if (!StackWalk64(
|
||||
machineType,
|
||||
hProcess,
|
||||
hThread,
|
||||
&stack,
|
||||
&context,
|
||||
NULL,
|
||||
SymFunctionTableAccess64,
|
||||
SymGetModuleBase64,
|
||||
NULL))
|
||||
IMAGE_FILE_MACHINE_AMD64,
|
||||
hProcess,
|
||||
hThread,
|
||||
&stack,
|
||||
&context,
|
||||
NULL,
|
||||
SymFunctionTableAccess64,
|
||||
SymGetModuleBase64,
|
||||
NULL))
|
||||
{
|
||||
break;
|
||||
}
|
||||
@@ -146,27 +100,26 @@ namespace utils
|
||||
|
||||
if (sym->NameLen)
|
||||
{
|
||||
std::string function_name = wstr_to_utf8(sym->Name, static_cast<int>(sym->NameLen));
|
||||
const auto function_name = wstr_to_utf8(sym->Name, static_cast<int>(sym->NameLen));
|
||||
|
||||
// Attempt to get file and line information if available
|
||||
DWORD unused2;
|
||||
if (SymGetLineFromAddrW64(hProcess, reinterpret_cast<DWORD64>(pointer), &unused2, &line_info))
|
||||
{
|
||||
std::string full_path = fmt::format("%s:%u %s", wstr_to_utf8(line_info.FileName, -1), line_info.LineNumber, function_name);
|
||||
result.push_back(std::move(full_path));
|
||||
const auto full_path = fmt::format("%s:%u %s", wstr_to_utf8(line_info.FileName, -1), line_info.LineNumber, function_name);
|
||||
result.push_back(full_path);
|
||||
}
|
||||
else
|
||||
{
|
||||
result.push_back(std::move(function_name));
|
||||
result.push_back(function_name);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
result.push_back(fmt::format("rpcs3@0x%p", pointer));
|
||||
result.push_back(fmt::format("rpcs3@0xp", pointer));
|
||||
}
|
||||
}
|
||||
|
||||
clean_backtrace(result);
|
||||
return result;
|
||||
}
|
||||
#else
|
||||
@@ -194,7 +147,6 @@ namespace utils
|
||||
|
||||
free(symbols);
|
||||
#endif
|
||||
clean_backtrace(result);
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -2,11 +2,6 @@
|
||||
#include <util/types.hpp>
|
||||
#include <util/logs.hpp>
|
||||
|
||||
#ifdef _WIN32
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <Windows.h>
|
||||
#endif
|
||||
|
||||
namespace utils
|
||||
{
|
||||
namespace stack_trace
|
||||
@@ -14,7 +9,7 @@ namespace utils
|
||||
// Printing utilities
|
||||
|
||||
template <typename T>
|
||||
concept Logger = requires (T& t, std::string_view msg)
|
||||
concept Logger = requires (T& t, const std::string& msg)
|
||||
{
|
||||
{ t.print(msg) };
|
||||
};
|
||||
@@ -28,19 +23,14 @@ namespace utils
|
||||
: log(chan)
|
||||
{}
|
||||
|
||||
void print(std::string_view s)
|
||||
void print(const std::string& s)
|
||||
{
|
||||
log.error("%s", s);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
std::vector<void*> get_backtrace(int max_depth = 255, PCONTEXT ctx = nullptr);
|
||||
#else
|
||||
std::vector<void*> get_backtrace(int max_depth = 255);
|
||||
#endif
|
||||
|
||||
std::vector<std::string> get_backtrace_symbols(const std::vector<void*>& stack);
|
||||
|
||||
FORCE_INLINE void print_trace(stack_trace::Logger auto& logger, int max_depth = 255)
|
||||
|
||||
@@ -1,159 +0,0 @@
|
||||
#include "stdafx.h"
|
||||
#include "stereo_config.h"
|
||||
#include "Emu/system_config.h"
|
||||
|
||||
stereo_config::stereo_matrices::stereo_matrices(const std::array<color3_base<f32>, 3>& l, const std::array<color3_base<f32>, 3>& r)
|
||||
{
|
||||
for (usz i = 0; i < 3; i++)
|
||||
{
|
||||
left[i] = l[i];
|
||||
right[i] = r[i];
|
||||
}
|
||||
}
|
||||
|
||||
atomic_t<bool> stereo_config::s_live_preview_enabled = false;
|
||||
stereo_config::stereo_matrices stereo_config::m_live_matrices = {};
|
||||
|
||||
const std::unordered_map<stereo_render_mode_options, stereo_config::stereo_matrices> stereo_config::m_matrices =
|
||||
{
|
||||
{stereo_render_mode_options::anaglyph_red_cyan, stereo_matrices(
|
||||
{
|
||||
color3_base<f32>(1, 0, 0),
|
||||
color3_base<f32>(0, 0, 0),
|
||||
color3_base<f32>(0, 0, 0)
|
||||
},
|
||||
{
|
||||
color3_base<f32>(0, 0, 0),
|
||||
color3_base<f32>(0, 1, 0),
|
||||
color3_base<f32>(0, 0, 1)
|
||||
}
|
||||
)},
|
||||
{stereo_render_mode_options::anaglyph_red_green, stereo_matrices(
|
||||
{
|
||||
color3_base<f32>(1, 0, 0),
|
||||
color3_base<f32>(0, 0, 0),
|
||||
color3_base<f32>(0, 0, 0)
|
||||
},
|
||||
{
|
||||
color3_base<f32>(0, 0, 0),
|
||||
color3_base<f32>(0, 1, 0),
|
||||
color3_base<f32>(0, 0, 0)
|
||||
}
|
||||
)},
|
||||
{stereo_render_mode_options::anaglyph_red_blue, stereo_matrices(
|
||||
{
|
||||
color3_base<f32>(1, 0, 0),
|
||||
color3_base<f32>(0, 0, 0),
|
||||
color3_base<f32>(0, 0, 0)
|
||||
},
|
||||
{
|
||||
color3_base<f32>(0, 0, 0),
|
||||
color3_base<f32>(0, 0, 0),
|
||||
color3_base<f32>(0, 0, 1)
|
||||
}
|
||||
)},
|
||||
{stereo_render_mode_options::anaglyph_magenta_cyan, stereo_matrices(
|
||||
{
|
||||
color3_base<f32>(1, 0, 0),
|
||||
color3_base<f32>(0, 0, 0),
|
||||
color3_base<f32>(0, 0, 0.5f)
|
||||
},
|
||||
{
|
||||
color3_base<f32>(0, 0, 0),
|
||||
color3_base<f32>(0, 1, 0),
|
||||
color3_base<f32>(0, 0, 0.5f)
|
||||
}
|
||||
)},
|
||||
{stereo_render_mode_options::anaglyph_trioscopic, stereo_matrices(
|
||||
{
|
||||
color3_base<f32>(0, 0, 0),
|
||||
color3_base<f32>(0, 1, 0),
|
||||
color3_base<f32>(0, 0, 0)
|
||||
},
|
||||
{
|
||||
color3_base<f32>(1, 0, 0),
|
||||
color3_base<f32>(0, 0, 0),
|
||||
color3_base<f32>(0, 0, 1)
|
||||
}
|
||||
)},
|
||||
{stereo_render_mode_options::anaglyph_amber_blue, stereo_matrices(
|
||||
{
|
||||
color3_base<f32>(1, 0, 0),
|
||||
color3_base<f32>(0, 1, 0),
|
||||
color3_base<f32>(0, 0, 0)
|
||||
},
|
||||
{
|
||||
color3_base<f32>(0, 0, 1.0f / 3.0f),
|
||||
color3_base<f32>(0, 0, 1.0f / 3.0f),
|
||||
color3_base<f32>(0, 0, 1.0f / 3.0f)
|
||||
}
|
||||
)},
|
||||
};
|
||||
|
||||
void stereo_config::update_from_config(bool stereo_enabled)
|
||||
{
|
||||
m_stereo_mode = stereo_enabled ? g_cfg.video.stereo_render_mode.get() : stereo_render_mode_options::disabled;
|
||||
|
||||
if (m_stereo_mode == stereo_render_mode_options::anaglyph_custom)
|
||||
{
|
||||
stereo_config::convert_matrix(m_custom_matrices.left, g_cfg.video.custom_anaglyph_matrices.left.get_map());
|
||||
stereo_config::convert_matrix(m_custom_matrices.right, g_cfg.video.custom_anaglyph_matrices.right.get_map());
|
||||
}
|
||||
}
|
||||
|
||||
const stereo_config::stereo_matrices& stereo_config::matrices() const
|
||||
{
|
||||
if (m_in_emulation && s_live_preview_enabled)
|
||||
{
|
||||
return m_live_matrices;
|
||||
}
|
||||
|
||||
switch (m_stereo_mode)
|
||||
{
|
||||
case stereo_render_mode_options::disabled:
|
||||
case stereo_render_mode_options::side_by_side:
|
||||
case stereo_render_mode_options::over_under:
|
||||
case stereo_render_mode_options::interlaced:
|
||||
break;
|
||||
case stereo_render_mode_options::anaglyph_red_green:
|
||||
case stereo_render_mode_options::anaglyph_red_blue:
|
||||
case stereo_render_mode_options::anaglyph_red_cyan:
|
||||
case stereo_render_mode_options::anaglyph_magenta_cyan:
|
||||
case stereo_render_mode_options::anaglyph_trioscopic:
|
||||
case stereo_render_mode_options::anaglyph_amber_blue:
|
||||
return ::at32(m_matrices, m_stereo_mode);
|
||||
case stereo_render_mode_options::anaglyph_custom:
|
||||
return m_custom_matrices;
|
||||
}
|
||||
|
||||
static const stereo_matrices s_left_only_matrices = stereo_matrices(
|
||||
{
|
||||
color3_base<float>(1, 0, 0),
|
||||
color3_base<float>(0, 1, 0),
|
||||
color3_base<float>(0, 0, 1)
|
||||
},
|
||||
{
|
||||
color3_base<float>(0, 0, 0),
|
||||
color3_base<float>(0, 0, 0),
|
||||
color3_base<float>(0, 0, 0)
|
||||
});
|
||||
return s_left_only_matrices;
|
||||
}
|
||||
|
||||
std::map<std::string, std::string> stereo_config::get_custom_matrix(bool is_left) const
|
||||
{
|
||||
return convert_matrix(is_left ? m_custom_matrices.left : m_custom_matrices.right);
|
||||
}
|
||||
|
||||
std::map<std::string, std::string> stereo_config::convert_matrix(const mat3f& mat)
|
||||
{
|
||||
std::map<std::string, std::string> values {};
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
for (int j = 0; j < 3; j++)
|
||||
{
|
||||
values[fmt::format("%d%d", i, j)] = fmt::format("%f", mat[i].rgb[j]);
|
||||
}
|
||||
}
|
||||
return values;
|
||||
}
|
||||
@@ -1,79 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include "geometry.h"
|
||||
#include "Emu/system_config_types.h"
|
||||
#include "util/atomic.hpp"
|
||||
#include "Utilities/StrFmt.h"
|
||||
#include "Utilities/StrUtil.h"
|
||||
#include <map>
|
||||
#include <mutex>
|
||||
|
||||
struct stereo_config
|
||||
{
|
||||
public:
|
||||
struct stereo_matrices
|
||||
{
|
||||
stereo_matrices() = default;
|
||||
stereo_matrices(const std::array<color3_base<f32>, 3>& l, const std::array<color3_base<f32>, 3>& r);
|
||||
|
||||
mat3f left {};
|
||||
mat3f right {};
|
||||
};
|
||||
|
||||
stereo_config(bool in_emulation) : m_in_emulation(in_emulation) {}
|
||||
|
||||
void set_stereo_mode(stereo_render_mode_options mode) { m_stereo_mode = mode; }
|
||||
stereo_render_mode_options stereo_mode() const { return m_stereo_mode; }
|
||||
|
||||
const stereo_matrices& matrices() const;
|
||||
|
||||
void update_from_config(bool stereo_enabled);
|
||||
|
||||
void set_custom_matrices(const stereo_matrices& matrices) { m_custom_matrices = matrices; }
|
||||
static void set_live_matrices(const stereo_matrices& matrices) { m_live_matrices = matrices; }
|
||||
|
||||
std::map<std::string, std::string> get_custom_matrix(bool is_left) const;
|
||||
|
||||
template <typename T>
|
||||
static void convert_matrix(mat3f& mat, const T& values)
|
||||
{
|
||||
mat[0] = {};
|
||||
mat[1] = {};
|
||||
mat[2] = {};
|
||||
|
||||
if (values.empty())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
for (int j = 0; j < 3; j++)
|
||||
{
|
||||
const std::string key = fmt::format("%d%d", i, j);
|
||||
const auto it = values.find(key);
|
||||
if (it == values.cend()) continue;
|
||||
|
||||
const std::string& val_s = it->second;
|
||||
if (val_s.empty()) continue;
|
||||
|
||||
if (f64 val = 0.0f; try_to_float(&val, val_s, -10.0f, 10.0f))
|
||||
{
|
||||
mat[i].rgb[j] = static_cast<f32>(val);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static std::map<std::string, std::string> convert_matrix(const mat3f& mat);
|
||||
|
||||
static atomic_t<bool> s_live_preview_enabled;
|
||||
|
||||
private:
|
||||
stereo_matrices m_custom_matrices {};
|
||||
stereo_render_mode_options m_stereo_mode = stereo_render_mode_options::disabled;
|
||||
bool m_in_emulation = false;
|
||||
|
||||
static stereo_matrices m_live_matrices;
|
||||
static const std::unordered_map<stereo_render_mode_options, stereo_matrices> m_matrices;
|
||||
};
|
||||
@@ -74,7 +74,7 @@ enum
|
||||
};
|
||||
#endif
|
||||
|
||||
inline int futex(volatile void* uaddr, int futex_op, uint val, const timespec* timeout = nullptr, [[maybe_unused]] uint mask = 0)
|
||||
inline int futex(volatile void* uaddr, int futex_op, uint val, const timespec* timeout = nullptr, uint mask = 0)
|
||||
{
|
||||
#ifdef __linux__
|
||||
return syscall(SYS_futex, uaddr, futex_op, static_cast<int>(val), timeout, nullptr, static_cast<int>(mask));
|
||||
|
||||
@@ -33,7 +33,7 @@ public:
|
||||
std::lock_guard lock(mutex);
|
||||
if (std::shared_ptr<void> new_val = std::invoke(func); new_val)
|
||||
{
|
||||
storage.push_back(std::move(new_val));
|
||||
storage.push_back(new_val);
|
||||
}
|
||||
delete_unused();
|
||||
}
|
||||
|
||||
@@ -24,27 +24,29 @@ namespace utils
|
||||
return (m_hi << 24) | (m_mid << 16) | (m_lo << 8) | ((uint(m_type) & 0xf) << 4) | (m_type_index & 0xf);
|
||||
}
|
||||
|
||||
std::string version::to_string(bool simple) const
|
||||
std::string version::to_string() const
|
||||
{
|
||||
std::string version = fmt::format("%d.%d", hi(), mid());
|
||||
std::string version = std::to_string(hi()) + "." + std::to_string(mid());
|
||||
|
||||
if (lo())
|
||||
{
|
||||
fmt::append(version, ".%d", lo());
|
||||
version += '.';
|
||||
version += std::to_string(lo());
|
||||
}
|
||||
|
||||
if (!simple && type() != version_type::release)
|
||||
if (type() != version_type::release)
|
||||
{
|
||||
if (!postfix().empty())
|
||||
{
|
||||
fmt::append(version, "-%s", postfix());
|
||||
version += "-" + postfix();
|
||||
}
|
||||
|
||||
fmt::append(version, " %s", utils::to_string(type()));
|
||||
version += ' ';
|
||||
version += utils::to_string(type());
|
||||
|
||||
if (type_index() > 1)
|
||||
{
|
||||
fmt::append(version, " %d", type_index());
|
||||
version += " " + std::to_string(type_index());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -55,8 +57,7 @@ namespace utils
|
||||
int compare_versions(const std::string& v1, const std::string& v2, bool& ok)
|
||||
{
|
||||
// Check if both version strings are valid
|
||||
static const std::regex comp = std::regex("[0-9.]*");
|
||||
ok = std::regex_match(v1, comp) && std::regex_match(v2, comp);
|
||||
ok = std::regex_match(v1, std::regex("[0-9.]*")) && std::regex_match(v2, std::regex("[0-9.]*"));
|
||||
|
||||
if (!ok)
|
||||
{
|
||||
|
||||
@@ -23,10 +23,10 @@ namespace utils
|
||||
uint m_lo;
|
||||
version_type m_type = version_type::release;
|
||||
uint m_type_index = 1;
|
||||
std::string_view m_postfix;
|
||||
const char* m_postfix;
|
||||
|
||||
public:
|
||||
constexpr version(uint hi, uint mid, uint lo, version_type type, uint type_index, std::string_view postfix)
|
||||
constexpr version(uint hi, uint mid, uint lo, version_type type, uint type_index, const char* postfix)
|
||||
: m_hi(hi)
|
||||
, m_mid(mid)
|
||||
, m_lo(lo)
|
||||
@@ -56,7 +56,7 @@ namespace utils
|
||||
return m_type;
|
||||
}
|
||||
|
||||
std::string_view postfix() const
|
||||
std::string postfix() const
|
||||
{
|
||||
return m_postfix;
|
||||
}
|
||||
@@ -67,7 +67,7 @@ namespace utils
|
||||
}
|
||||
|
||||
uint to_hex() const;
|
||||
std::string to_string(bool simple = false) const;
|
||||
std::string to_string() const;
|
||||
};
|
||||
|
||||
// Generic version comparison (e.g. 0.0.5 vs 1.3)
|
||||
|
||||
@@ -208,16 +208,6 @@ QComboBox {
|
||||
padding-bottom: 0.2em;
|
||||
padding-left: 0.4em;
|
||||
}
|
||||
QComboBox QAbstractItemView {
|
||||
background-color: #323232;
|
||||
color: #fff;
|
||||
border: 0.05em solid #1e1e1e;
|
||||
}
|
||||
QComboBox QAbstractItemView::item:selected,
|
||||
QComboBox QAbstractItemView::item:hover {
|
||||
background-color: #444444;
|
||||
color: #fff;
|
||||
}
|
||||
QComboBox::disabled {
|
||||
background-color: #828790;
|
||||
color: #fff;
|
||||
|
||||
@@ -349,24 +349,24 @@ QPushButton:disabled {
|
||||
}
|
||||
|
||||
|
||||
QDialog QDialogButtonBox QPushButton:default {
|
||||
QDialog QDialogButtonBox QPushButton {
|
||||
color: #000000;
|
||||
background-color: #4CC2FF;
|
||||
border-color: #5AC7FF;
|
||||
}
|
||||
|
||||
QDialog QDialogButtonBox QPushButton:default:hover {
|
||||
QDialog QDialogButtonBox QPushButton:hover {
|
||||
background-color: #48B2E9;
|
||||
border-color: #56B8EB;
|
||||
}
|
||||
|
||||
QDialog QDialogButtonBox QPushButton:default:pressed {
|
||||
QDialog QDialogButtonBox QPushButton:pressed {
|
||||
color: #22526A;
|
||||
background-color: #45A4D5;
|
||||
border-color: #45A4D5;
|
||||
}
|
||||
|
||||
QDialog QDialogButtonBox QPushButton:default:disabled {
|
||||
QDialog QDialogButtonBox QPushButton:disabled {
|
||||
color: #ABABAB;
|
||||
background-color: #4C4C4C;
|
||||
border-color: #4C4C4C;
|
||||
@@ -614,15 +614,10 @@ QComboBox QAbstractItemView {
|
||||
QComboBox QAbstractItemView::item {
|
||||
color: #FFFFFF;
|
||||
padding: 4px 6px;
|
||||
margin: 2px 0px;
|
||||
background-color: transparent;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
QComboBox QAbstractItemView::item:hover {
|
||||
background-color: #383838;
|
||||
}
|
||||
|
||||
QComboBox QAbstractItemView::item:selected {
|
||||
background-color: #383838;
|
||||
}
|
||||
@@ -647,7 +642,7 @@ QDoubleSpinBox::up-button, QDoubleSpinBox::down-button {
|
||||
border-radius: 4px;
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
padding: 3px 4px;
|
||||
padding: 3px 4px;
|
||||
}
|
||||
|
||||
QSpinBox::up-button:hover, QSpinBox::down-button:hover,
|
||||
@@ -714,16 +709,6 @@ QSlider::handle:horizontal:disabled {
|
||||
image: url("GuiConfigs/dark/slider-handle-disabled.svg");
|
||||
}
|
||||
|
||||
QSlider::sub-page:horizontal {
|
||||
background-color: #4CC2FF;
|
||||
border-radius: 2px;
|
||||
height: 4px;
|
||||
}
|
||||
|
||||
QSlider::sub-page:horizontal:disabled {
|
||||
background-color: #767A7D;
|
||||
}
|
||||
|
||||
|
||||
/* LINE EDIT */
|
||||
QLineEdit {
|
||||
@@ -806,7 +791,7 @@ QMenuBar::item:pressed {
|
||||
|
||||
QMenu {
|
||||
background-color: #2C2C2C;
|
||||
border: 1px solid #3E3E3E;
|
||||
border: 1px solid #131313;
|
||||
padding: 4px 0px;
|
||||
}
|
||||
|
||||
@@ -814,12 +799,12 @@ QMenu::item {
|
||||
color: #FFFFFF;
|
||||
background-color: transparent;
|
||||
border-radius: 4px;
|
||||
padding: 4px 20px;
|
||||
padding: 8px 20px;
|
||||
margin: 0px 4px;
|
||||
}
|
||||
|
||||
QMenu::item:selected {
|
||||
background-color: #353535;
|
||||
background-color: #383838;
|
||||
}
|
||||
|
||||
QMenu::item:disabled {
|
||||
@@ -829,8 +814,8 @@ QMenu::item:disabled {
|
||||
|
||||
QMenu::separator {
|
||||
height: 1px;
|
||||
background: #3E3E3E;
|
||||
margin: 4px 8px;
|
||||
background: #131313;
|
||||
margin: 4px 0px;
|
||||
}
|
||||
|
||||
QMenu::indicator, QMenu::right-arrow {
|
||||
|
||||
@@ -349,24 +349,24 @@ QPushButton:disabled {
|
||||
}
|
||||
|
||||
|
||||
QDialog QDialogButtonBox QPushButton:default {
|
||||
QDialog QDialogButtonBox QPushButton {
|
||||
color: #FFFFFF;
|
||||
background-color: #0067C0;
|
||||
border-color: #1473C5;
|
||||
}
|
||||
|
||||
QDialog QDialogButtonBox QPushButton:default:hover {
|
||||
QDialog QDialogButtonBox QPushButton:hover {
|
||||
background-color: #1A76C6;
|
||||
border-color: #2C80CA;
|
||||
}
|
||||
|
||||
QDialog QDialogButtonBox QPushButton:default:pressed {
|
||||
QDialog QDialogButtonBox QPushButton:pressed {
|
||||
color: #C2DAEF;
|
||||
background-color: #3284CB;
|
||||
border-color: #3284CB;
|
||||
}
|
||||
|
||||
QDialog QDialogButtonBox QPushButton:default:disabled {
|
||||
QDialog QDialogButtonBox QPushButton:disabled {
|
||||
color: #FFFFFF;
|
||||
background-color: #C5C5C5;
|
||||
border-color: #C5C5C5;
|
||||
@@ -614,15 +614,10 @@ QComboBox QAbstractItemView {
|
||||
QComboBox QAbstractItemView::item {
|
||||
color: #1B1B1B;
|
||||
padding: 4px 6px;
|
||||
margin: 2px 0px;
|
||||
background-color: transparent;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
QComboBox QAbstractItemView::item:hover {
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
|
||||
QComboBox QAbstractItemView::item:selected {
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
@@ -647,7 +642,7 @@ QDoubleSpinBox::up-button, QDoubleSpinBox::down-button {
|
||||
border-radius: 4px;
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
padding: 3px 4px;
|
||||
padding: 3px 4px;
|
||||
}
|
||||
|
||||
QSpinBox::up-button:hover, QSpinBox::down-button:hover,
|
||||
@@ -714,16 +709,6 @@ QSlider::handle:horizontal:disabled {
|
||||
image: url("GuiConfigs/light/slider-handle-disabled.svg");
|
||||
}
|
||||
|
||||
QSlider::sub-page:horizontal {
|
||||
background-color: #1A76C6;
|
||||
border-radius: 2px;
|
||||
height: 4px;
|
||||
}
|
||||
|
||||
QSlider::sub-page:horizontal:disabled {
|
||||
background-color: #868788;
|
||||
}
|
||||
|
||||
|
||||
/* LINE EDIT */
|
||||
QLineEdit {
|
||||
@@ -806,7 +791,7 @@ QMenuBar::item:pressed {
|
||||
|
||||
QMenu {
|
||||
background-color: #F9F9F9;
|
||||
border: 1px solid #E5E5E5;
|
||||
border: 1px solid #EEEEEE;
|
||||
padding: 4px 0px;
|
||||
}
|
||||
|
||||
@@ -814,7 +799,7 @@ QMenu::item {
|
||||
color: #1B1B1B;
|
||||
background-color: transparent;
|
||||
border-radius: 4px;
|
||||
padding: 4px 20px;
|
||||
padding: 8px 20px;
|
||||
margin: 0px 4px;
|
||||
}
|
||||
|
||||
@@ -829,8 +814,8 @@ QMenu::item:disabled {
|
||||
|
||||
QMenu::separator {
|
||||
height: 1px;
|
||||
background: #E5E5E5;
|
||||
margin: 4px 8px;
|
||||
background: #EEEEEE;
|
||||
margin: 4px 0px;
|
||||
}
|
||||
|
||||
QMenu::indicator, QMenu::right-arrow {
|
||||
|
||||
|
Before Width: | Height: | Size: 999 B After Width: | Height: | Size: 5.3 KiB |
|
Before Width: | Height: | Size: 484 B After Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 504 B After Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 503 B After Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 399 B After Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 477 B After Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 380 B After Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 4.2 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 3.5 KiB |