1
0
forked from cheng/wallet
wallet/winConfigure.sh

72 lines
3.9 KiB
Bash
Raw Normal View History

#!/bin/bash
set -e
set -x
git config --local include.path ../.gitconfig
git submodule update --init --recursive
git submodule foreach --recursive 'git reset --hard'
git submodule foreach --recursive 'git clean -xdf'
set +e
set +x
rm -r x64
set -e
src=libsodium/libsodium.vcxproj
dest=libsodium/libsodium.vcxproj
wxwin=wxWidgets
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
chmod 755 docs/mkdocs.sh
chmod 755 docs/check_html.sh
chmod 755 mpir/devel/regen
chmod 755 mpir/devel/setversion
chmod 755 mpir/tune/aligntest
chmod 755 mpir/devel/benchmpn
chmod 755 wxWidgets/build/tools/*.sh
chmod 755 wxWidgets/distrib/autopackage/makeautopackage
chmod 755 wxWidgets/docs/doxygen/*.sh
chmod 755 wxWidgets/interface/*.sh
chmod 755 wxWidgets/lib/*.sh
chmod 755 wxWidgets/misc/scripts/*.sh
chmod 755 wxWidgets/misc/scripts/check_unused_headers
chmod 755 wxWidgets/src/expat/*.sh
chmod 755 wxWidgets/src/*/contrib/oss-fuzz/*.sh
chmod 755 wxWidgets/tests/fuzz/*.sh
chmod 755 wxWidgets/utils/ifacecheck/*.sh
fi
cat $src | sed 's/<CharacterSet>MultiByte/<CharacterSet>Unicode/g' | sed 's/<RuntimeLibrary>MultiThreadedDebug</<RuntimeLibrary>MultiThreadedDebugDLL</g' | sed 's/<RuntimeLibrary>MultiThreaded</<RuntimeLibrary>MultiThreadedDLL</g'> tempx
unix2dos tempx
mv -v tempx $dest
src=libsodium/test/default/wintest.bat
cat $src | sed 's/SET[[:blank:]]\+CFLAGS=%CFLAGS%[[:blank:]]\(.*\)\/MT\(.*\)DSODIUM_STATIC[[:blank:]]\+\/DSODIUM_EXPORT/SET CFLAGS=%CFLAGS% \1\/MD\2DSODIUM_STATIC \/DSODIUM_EXPORT/g'> tempx
unix2dos tempx
mv -v tempx $src
src=mpir/msvc/vs19/lib_mpir_gc/lib_mpir_gc.vcxproj
dest=$src
cat $src | grep -v RuntimeLibrary | sed 's/^\(.*\)<PreprocessorDefinitions>NDEBUG\(.*\)$/\1<PreprocessorDefinitions>NDEBUG\2\
<RuntimeLibrary>MultiThreadedDLL<\/RuntimeLibrary>/g' | sed 's/<PlatformToolset>v[[:digit:]]\{3\}/<PlatformToolset>v143/g' | sed 's/^\(.*\)<PreprocessorDefinitions>_DEBUG\(.*\)$/\1<PreprocessorDefinitions>_DEBUG\2\
<RuntimeLibrary>MultiThreadedDebugDLL<\/RuntimeLibrary>/g' > tempx
unix2dos tempx
mv -v tempx $dest
src=mpir/msvc/vs19/dll_mpir_gc/dll_mpir_gc.vcxproj
dest=$src
cat $src | grep -v RuntimeLibrary | sed 's/^\(.*\)<PreprocessorDefinitions>NDEBUG\(.*\)$/\1<PreprocessorDefinitions>NDEBUG\2\
<RuntimeLibrary>MultiThreadedDLL<\/RuntimeLibrary>/g' | sed 's/<PlatformToolset>v[[:digit:]]\{3\}/<PlatformToolset>v143/g' | sed 's/^\(.*\)<PreprocessorDefinitions>_DEBUG\(.*\)$/\1<PreprocessorDefinitions>_DEBUG\2\
<RuntimeLibrary>MultiThreadedDebugDLL<\/RuntimeLibrary>/g' > tempx
unix2dos tempx
mv -v tempx $dest
src=mpir/msvc/vs19/lib_mpir_cxx/lib_mpir_cxx.vcxproj
dest=$src
cat $src | grep -v RuntimeLibrary | sed 's/^\(.*\)<PreprocessorDefinitions>NDEBUG\(.*\)$/\1<PreprocessorDefinitions>NDEBUG\2\
<RuntimeLibrary>MultiThreadedDLL<\/RuntimeLibrary>/g' | sed 's/<PlatformToolset>v[[:digit:]]\{3\}/<PlatformToolset>v143/g' | sed 's/^\(.*\)<PreprocessorDefinitions>_DEBUG\(.*\)$/\1<PreprocessorDefinitions>_DEBUG\2\
<RuntimeLibrary>MultiThreadedDebugDLL<\/RuntimeLibrary>/g' > tempx
unix2dos tempx
mv -v tempx $dest
src=$wxwin/include/wx/msw/setup.h
cat $src | sed 's/^#define\([[:blank:]]\+\)wxUSE_IPV6\([[:blank:]]\+\).*$/#define\1wxUSE_IPV6\21/g'| sed 's/^#define\([[:blank:]]\+\)WXWIN_COMPATIBILITY_3_0\([[:blank:]]\+\).*$/#define\1WXWIN_COMPATIBILITY_3_0\20/g'| sed 's/^#define\([[:blank:]]\+\)wxUSE_COMPILER_TLS\([[:blank:]]\+\).*$/#define\1wxUSE_COMPILER_TLS\22/g'| sed 's/^#define\([[:blank:]]\+\)wxUSE_STD_CONTAINERS\([[:blank:]]\+\).*$/#define\1wxUSE_STD_CONTAINERS\21/g'| sed 's/^#define\([[:blank:]]\+\)wxUSE_DIALUP_MANAGER\([[:blank:]]\+\).*$/#define\1wxUSE_DIALUP_MANAGER\20/g'| sed 's/^#define\([[:blank:]]\+\)WXWIN_COMPATIBILITY_3_0\([[:blank:]]\+\).*$/#define\1WXWIN_COMPATIBILITY_3_0\20/g'| sed 's/^#define\([[:blank:]]\+\)wxUSE_STD_STRING_CONV_IN_WXSTRING\([[:blank:]]\+\).*$/#define\1wxUSE_STD_STRING_CONV_IN_WXSTRING\21/g'> tempx
mv tempx $src
docs/mkdocs.sh