mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 01:40:05 +00:00
Use debug conan profiles for debug configurations
This commit is contained in:
parent
76c6ac2ccd
commit
f684d62cb1
3 changed files with 74 additions and 30 deletions
|
|
@ -33,8 +33,24 @@ pip install --upgrade -r "%script_dir%\..\requirements.txt"
|
|||
|
||||
:: Install Conan profiles
|
||||
@for /L %%i in (0,1,!last_profile!) do @(
|
||||
:: Install the base profile
|
||||
set "profile_name=!conan_profile[%%i]!"
|
||||
conan config install "%script_dir%\conan\profiles\!profile_name!" -tf profiles
|
||||
set "profile_path=%script_dir%\conan\profiles\!profile_name!"
|
||||
conan config install "!profile_path!" -tf profiles
|
||||
|
||||
:: Create debug profile in temp directory
|
||||
set "debug_profile_name=!profile_name!-debug"
|
||||
set "debug_profile_path=%TEMP%\!debug_profile_name!"
|
||||
copy "!profile_path!" "!debug_profile_path!" >nul
|
||||
|
||||
:: Replace build_type=Release with build_type=Debug
|
||||
powershell -Command "(Get-Content '!debug_profile_path!') -replace 'build_type=Release', 'build_type=Debug' | Set-Content '!debug_profile_path!'"
|
||||
|
||||
:: Install the debug profile
|
||||
conan config install "!debug_profile_path!" -tf profiles
|
||||
|
||||
:: Remove temporary debug profile
|
||||
del "!debug_profile_path!"
|
||||
)
|
||||
|
||||
:: Deactivate Python Virtual Environment
|
||||
|
|
|
|||
|
|
@ -71,7 +71,25 @@ fi
|
|||
|
||||
# Install Conan profiles
|
||||
for profile_name in "${conan_profiles[@]}"; do
|
||||
# Install original profile
|
||||
conan config install "${script_dir}/conan/profiles/${profile_name}" -tf profiles
|
||||
|
||||
# Create debug profile in temp directory
|
||||
debug_profile="/tmp/${profile_name}-debug"
|
||||
cp "${script_dir}/conan/profiles/${profile_name}" "${debug_profile}"
|
||||
|
||||
# Replace build_type=Release with build_type=Debug
|
||||
if [[ "$(uname)" == "Darwin" ]]; then
|
||||
sed -i '' 's/build_type=Release/build_type=Debug/g' "${debug_profile}"
|
||||
else
|
||||
sed -i 's/build_type=Release/build_type=Debug/g' "${debug_profile}"
|
||||
fi
|
||||
|
||||
# Install the debug profile
|
||||
conan config install "${debug_profile}" -tf profiles
|
||||
|
||||
# Remove temporary debug profile
|
||||
rm "${debug_profile}"
|
||||
done
|
||||
|
||||
# Deactivate Python Virtual Environment
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue