Browse Source

Fixing makeReleaseMac.sh

pull/226/head
Asher 5 years ago
parent
commit
761f6b237a
  1. 48
      makeReleaseMac.sh

48
makeReleaseMac.sh

@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
KMD_DIR=verus-cli DIST_DIR=verus-cli
mkdir ${KMD_DIR} mkdir ${DIST_DIR}
cp src/fiat/verus \ cp src/fiat/verus \
src/verusd \ src/verusd \
@ -9,33 +9,33 @@ cp src/fiat/verus \
zcutil/fetch-params.sh \ zcutil/fetch-params.sh \
verus-cli verus-cli
mv verus-cli/fetch-params.sh verus-cli/fetch-params mv verus-cli/fetch-params.sh verus-cli/fetch-params
chmod +x ${KMD_DIR}/fetch-params chmod +x ${DIST_DIR}/fetch-params
chmod +x ${KMD_DIR}/verus chmod +x ${DIST_DIR}/verus
chmod +x ${KMD_DIR}/verusd chmod +x ${DIST_DIR}/verusd
binaries=("komodo-cli" "komodod") binaries=("verus" "verusd")
alllibs=() alllibs=()
for binary in "${binaries[@]}"; for binary in "${binaries[@]}";
do do
# do the work in the destination directory # do the work in the destination directory
cp src/${binary} ${KMD_DIR} cp src/${binary} ${DIST_DIR}
# find the dylibs to copy for komodod # find the dylibs to copy for verusd
DYLIBS=`otool -L ${KMD_DIR}/${binary} | grep "/usr/local" | awk -F' ' '{ print $1 }'` DYLIBS=`otool -L ${DIST_DIR}/${binary} | grep "/usr/local" | awk -F' ' '{ print $1 }'`
DYLIBS+=" /usr/local/opt/libidn2/lib/libidn2.0.dylib" DYLIBS+=" /usr/local/opt/libidn2/lib/libidn2.0.dylib"
echo "copying ${DYLIBS} to ${KMD_DIR}" echo "copying ${DYLIBS} to ${DIST_DIR}"
# copy the dylibs to the srcdir # copy the dylibs to the srcdir
for dylib in ${DYLIBS}; do cp -rf ${dylib} ${KMD_DIR}; done for dylib in ${DYLIBS}; do cp -rf ${dylib} ${DIST_DIR}; done
done done
libraries=("libgcc_s.1.dylib" "libgomp.1.dylib" "libidn2.0.dylib" "libstdc++.6.dylib") libraries=("libgcc_s.1.dylib" "libgomp.1.dylib" "libidn2.0.dylib" "libstdc++.6.dylib")
for binary in "${libraries[@]}"; for binary in "${libraries[@]}";
do do
# find the dylibs to copy for komodod # find the dylibs to copy for verusd
DYLIBS=`otool -L ${KMD_DIR}/${binary} | grep "/usr/local" | awk -F' ' '{ print $1 }'` DYLIBS=`otool -L ${DIST_DIR}/${binary} | grep "/usr/local" | awk -F' ' '{ print $1 }'`
echo "copying ${DYLIBS} to ${KMD_DIR}" echo "copying ${DYLIBS} to ${DIST_DIR}"
# copy the dylibs to the srcdir # copy the dylibs to the srcdir
for dylib in ${DYLIBS}; do cp -rf ${dylib} ${KMD_DIR}; alllibs+=(${dylib}); done for dylib in ${DYLIBS}; do cp -rf ${dylib} ${DIST_DIR}; alllibs+=(${dylib}); done
done done
indirectlibraries=("libintl.8.dylib" "libunistring.2.dylib") indirectlibraries=("libintl.8.dylib" "libunistring.2.dylib")
@ -43,24 +43,24 @@ indirectlibraries=("libintl.8.dylib" "libunistring.2.dylib")
for binary in "${indirectlibraries[@]}"; for binary in "${indirectlibraries[@]}";
do do
# Need to undo this for the dylibs when we are done # Need to undo this for the dylibs when we are done
chmod 755 ${KMD_DIR}/${binary} chmod 755 ${DIST_DIR}/${binary}
# find the dylibs to copy for komodod # find the dylibs to copy for verusd
DYLIBS=`otool -L ${KMD_DIR}/${binary} | grep "/usr/local" | awk -F' ' '{ print $1 }'` DYLIBS=`otool -L ${DIST_DIR}/${binary} | grep "/usr/local" | awk -F' ' '{ print $1 }'`
echo "copying indirect ${DYLIBS} to ${KMD_DIR}" echo "copying indirect ${DYLIBS} to ${DIST_DIR}"
# copy the dylibs to the dest dir # copy the dylibs to the dest dir
for dylib in ${DYLIBS}; do cp -rf ${dylib} ${KMD_DIR}; alllibs+=(${dylib}); done for dylib in ${DYLIBS}; do cp -rf ${dylib} ${DIST_DIR}; alllibs+=(${dylib}); done
done done
for binary in "${binaries[@]}"; for binary in "${binaries[@]}";
do do
# modify komodod to point to dylibs # modify verusd to point to dylibs
echo "modifying ${binary} to use local libraries" echo "modifying ${binary} to use local libraries"
for dylib in "${alllibs[@]}" for dylib in "${alllibs[@]}"
do do
echo "Next lib is ${dylib} " echo "Next lib is ${dylib} "
install_name_tool -change ${dylib} @executable_path/`basename ${dylib}` ${KMD_DIR}/${binary} install_name_tool -change ${dylib} @executable_path/`basename ${dylib}` ${DIST_DIR}/${binary}
done done
chmod +x ${KMD_DIR}/${binary} chmod +x ${DIST_DIR}/${binary}
done done
for binary in "${libraries[@]}"; for binary in "${libraries[@]}";
@ -70,7 +70,7 @@ do
for dylib in "${alllibs[@]}" for dylib in "${alllibs[@]}"
do do
echo "Next lib is ${dylib} " echo "Next lib is ${dylib} "
install_name_tool -change ${dylib} @executable_path/`basename ${dylib}` ${KMD_DIR}/${binary} install_name_tool -change ${dylib} @executable_path/`basename ${dylib}` ${DIST_DIR}/${binary}
done done
done done

Loading…
Cancel
Save