-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathenv.mingw64
38 lines (34 loc) · 1.08 KB
/
env.mingw64
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# MINGW64
# source env.mingw64 && install_packages
function install_packages ()
{
echo y | pacman -S mingw-w64-x86_64-gcc mingw-w64-x86_64-binutils mingw-w64-x86_64-cmake mingw-w64-x86_64-gdb mingw-w64-x86_64-jansson
echo y | pacman -S jansson-devel
}
# @brief copy
# @desc copy_dir_files targetdir sourcedir [+ sourcefiles]
function copy_dir_files ()
{
local destdir=$1
shift
local srcdir=$1
shift
local arr=("$@")
for i in "${arr[@]}"; do
cp -f $srcdir/$i $destdir
done
}
# @brief redist
# @desc redist binaries to run wo mingw environment
function redist ()
{
if [ $OSTYPE = "msys" ]; then
mingw_bin_dll=(libgcc_s_seh-1.dll libstdc++-6.dll libwinpthread-1.dll)
mingw_bin_dll+=(libcurl-4.dll libnghttp2-14.dll libpsl-5.dll libbrotlicommon.dll libbrotlidec.dll)
mingw_bin_dll+=(libidn2-0.dll libssh2-1.dll libintl-?.dll libiconv-?.dll libunistring-?.dll liblzma-?.dll)
mingw_bin_dll+=(zlib1.dll)
cd ${HOTPLACE_HOME}
mkdir -p redist
copy_dir_files ${HOTPLACE_HOME}/redist/ ${MSYSTEM_PREFIX}/bin ${mingw_bin_dll[@]}
fi
}