Skip to content

Commit

Permalink
Post 3.2.2.5 - MSYS2 Script Improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
hamlibdk committed Oct 16, 2022
1 parent fba135c commit 34f7fb9
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 31 deletions.
61 changes: 33 additions & 28 deletions tools/msys64/usr/local/bin/build-hamlib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
################################################################################
#
# Title ........: build-hamlib.sh
# Version ......: 3.2.2.5.1
# Version ......: 3.2.2.5
# Description ..: Build Hamlib from GIT-distributed Hamlib Integration Branches
# Base Project .: https://github.com/KI7MT/jtsdk64-tools-scripts.git
# Project URL ..: https://sourceforge.net/projects/hamlib-sdk/files/Windows/JTSDK-3.2-Stream
Expand Down Expand Up @@ -391,8 +391,13 @@ function Run-Config () {
echo -e " --> Build Type: "${C_G}$STSHMSG${C_NC}' built '${C_G}$LIBUSBMSG${C_NC}${C_NC}' LibUSB'${C_NC}
echo ''

# echo "CPPFLAGS: ${libusb_dir_f}/include"
# echo "ORIGINAL: ${libusb_dir_f}/MinGW64/dll"
# echo "NEW.....: ${libusb_dir_f}${libusb_dll}"
# read -p "Press ENTER to continue"

# New options to match that in (hamlib-src)/scripts/build-w64.sh - creates cleaner configuration results
# Implemented Steve VK3SIR 9-9-2021 [ Pruned 16-09-2022 ]
# Implemented Steve VK3SIR 9-9-2021
# Setup so maybe can fully implement -shared / -static command line options

# ../src/configure --host=${HOST_ARCH} \
Expand All @@ -404,6 +409,9 @@ function Run-Config () {
$LIBUSBVAR \
CPPFLAGS="-I${libusb_dir_f}/include" \
LDFLAGS="-L${libusb_dir_f}${libusb_dll}"
#LDFLAGS="-L${libusb_dir_f}/MinGW64/dll"
# CPPFLAGS="-I${libusb_dir_f}/include -I/usr/include" \
# LDFLAGS="-L${libusb_dir_f}/MinGW64/dll -L/usr/lib"
else
echo '* Option -nc set to disable executing configure script'
fi
Expand Down Expand Up @@ -535,32 +543,20 @@ function Copy-DLLs {
# These lines may need ongoing manual maintenance as Hamlib and MSYS2 Evolves
# A better technique to identify Support DLL's needed by Hamlib is needed.

if [ $STATICBUILD = "No" ];
if [ -f "$GCCPATH/libwinpthread-1.dll" ];
then
if [ $SHAREDBUILD = "Yes" ];
then
files=(${GCCPATH}/libgcc_**)
if [ -e "${files[0]}" ];
then
echo " --> $GCCPATH/libgcc_*.dll"
cp -u ${GCCPATH}/libgcc_*.dll ${PREFIX}/bin
fi
if [ -f "$GCCPATH/libwinpthread-1.dll" ];
then
echo " --> $GCCPATH/libwinpthread-1.dll"
cp -u "$GCCPATH/libwinpthread-1.dll" "$PREFIX/bin"
fi
if [ -f "$GCCPATH/libtermcap-0.dll" ];
then
echo " --> $GCCPATH/libtermcap-0.dll"
cp -u "$GCCPATH/libtermcap-0.dll" "$PREFIX/bin"
fi
if [ -f "$GCCPATH/libreadline8.dll" ];
then
echo " --> $GCCPATH/libreadline8.dll"
cp -u "$GCCPATH/libreadline8.dll" "$PREFIX/bin"
fi
fi
echo " --> $GCCPATH/libwinpthread-1.dll"
cp -u "$GCCPATH/libwinpthread-1.dll" "$PREFIX/bin"
fi
if [ -f "$GCCPATH/libtermcap-0.dll" ];
then
echo " --> $GCCPATH/libtermcap-0.dll"
cp -u "$GCCPATH/libtermcap-0.dll" "$PREFIX/bin"
fi
if [ -f "$GCCPATH/libreadline8.dll" ];
then
echo " --> $GCCPATH/libreadline8.dll"
cp -u "$GCCPATH/libreadline8.dll" "$PREFIX/bin"
fi

# -- Special Cleanup for Dynamic Builds ---------------------------------------
Expand All @@ -573,6 +569,12 @@ function Copy-DLLs {
then
if [ $SHAREDBUILD = "Yes" ];
then
files=(${GCCPATH}/libgcc_**)
if [ -e "${files[0]}" ];
then
echo " --> $GCCPATH/libgcc_*.dll"
cp -u ${GCCPATH}/libgcc_*.dll ${PREFIX}/bin
fi
echo " --> (Temporary): Removing Static Hamlib libraries/fragments that could cause issues with Dynamic Builds"
if [ -f "$PREFIX/lib/libhamlib.a" ];
then
Expand All @@ -587,9 +589,12 @@ function Copy-DLLs {
fi
fi

# -- Special Cleanup for Static Builds -----------------------------------
# -- Special Cleanup for Static Builds -----------------------------------
# Note: This may NOT be required in the future when configure option --disable-dynamic works

# echo "PREFIX: $PREFIX"
# read -p "Press any key to resume ..."

if [ $SHAREDBUILD = "No" ];
then
if [ $STATICBUILD = "Yes" ];
Expand Down
10 changes: 7 additions & 3 deletions tools/msys64/usr/local/bin/jtsdk_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
################################################################################
#
# Title ........: jtsdk_setup.sh
# Version ......: 3.2.2.1
# Version ......: 3.2.2.6
# Description ..: Setup the MSYS2 Environ for the JTSDK64
# Project URL ..: https://sourceforge.net/projects/hamlib-sdk/files/Windows/JTSDK-3.2-Stream
#
Expand Down Expand Up @@ -339,12 +339,16 @@ function menu () {
done
}

# Display Main Menu
function greeting_message (){
# Display Main Menu
printf '\033[8;40;100t'
clear ||:
echo ''
echo -e ${C_C}"$JTSDK64_NAME ($MSYSTEM) using QT v$QTV"${C_NC}
echo -ne ${C_C}"$JTSDK64_NAME (${C_Y}$MSYSTEM${C_C})"
if [ $UNIXTOOLS != "Disabled" ]; then
echo -ne " using ${C_Y}Qt v$QTV"
fi
echo -e ${C_NC}
echo ''
echo -e "For main menu, type ..: ${C_C}menu${C_NC}"
echo -e "For Help Menu, type ..: ${C_C}jthelp${C_NC}"
Expand Down

0 comments on commit 34f7fb9

Please sign in to comment.