11# -----------------------------------------------------------------------------::
22# Name .........: jtsdk64.ps1
33# Project ......: Part of the JTSDK64 Tools Project
4- # Version ......: 4.0.0
4+ # Version ......: 4.1.0a
55# Description ..: Main Development Environment Script
66# Sets environment variables for development and MSYS2
77# Original URL .: https://github.com/KI7MT/jtsdk64-tools.git
3636# : Major enhancements and removal of "Fudges" to hopefully support Qt 6.7 and MinGW 13.1 18-9-2024 Steve I VK3VM
3737# : Minor legacy bugfix with JTSDK_MSYS2_F fixed 18-9-2024 Steve I VK3VM
3838# : (Non-ideal) Support for "extras" folder 2024-10-2 coordinated by Steve I VK3VM
39- # : Bump to Version 4.0 coordinated by Steve I VK3VM
39+ # : Bump to Version 4.0 and minor tweaks coordinated by Steve I VK3VM
40+ # : Prefix changed to toss all builds of Hamlib into x:\JTSDK64-Tools\tools\hamlib rather than Qt version specific directory
41+ # --> as Qt specific versioning now redundant since Qt completely built under MinGW/MSYS2 2025-05-24 Coordinated by Steve I VK3VM
42+ # : Move $env:HLREPO into Versions.ini 2025-05-25 coordinated by Steve I VK3VM
4043#
4144# -----------------------------------------------------------------------------::
4245
@@ -330,6 +333,7 @@ function SetQtEnvVariables ([ref]$QTBASE_ff, [ref]$QTD_ff, [ref]$GCCD_ff, [ref]$
330333
331334function CheckBoostCorrectQtmingwDirVersion ($boostDir ) {
332335 $retval = " Not Found"
336+ $env: B_MINGW = " Not Found"
333337
334338 $listBoostDeploy = Get-ChildItem - Path " $boostDir \lib" - EA SilentlyContinue
335339
@@ -339,20 +343,24 @@ function CheckBoostCorrectQtmingwDirVersion($boostDir) {
339343 # More than Likely GCC13.1 >= Qt 6.7.0 with MinGW 13.1 or later
340344 # Needs a better method
341345 $retval = " mingw_64" # As found in x:\JTSDK64-Tools\tools\Qt\6.7.x
346+ $env: B_MINGW = " mingw1310_64"
342347 break
343348 }
344349 if ($subPathBoost.Name -like ' *-mgw11-*' ) {
345350 # More than Likely GCC11 and >= Qt 6.2.2 with MinGW 11.2.0 or later
346351 # Needs a better method # As found in x:\JTSDK64-Tools\tools\Qt\6.2.2 or later
347352 $retval = " mingw_64"
353+ $env: B_MINGW = " mingw112_64"
348354 break
349355 }
350356 if ($subPathBoost.Name -like ' *-mgw8-*' ) {
351357 $retval = " mingw81_64"
358+ $env: B_MINGW = $retval
352359 break
353360 }
354361 if ($subPathBoost.Name -like ' *-mgw7-*' ) {
355362 $retval = " mingw73_64"
363+ $env: B_MINGW = $retval
356364 break
357365 }
358366 }
@@ -418,20 +426,31 @@ function SetHamlibDirs {
418426 return ($env: hamlib_base ).replace(" \" , " /" )
419427}
420428
421- # --- SET HAMLIB REPO SOURCE --------------------------------------------------
429+ # --- SET HAMLIB VARIABLES -- --------------------------------------------------
422430
423431function SetHamlibRepo {
424432 Write-Host - NoNewLine " * Hamlib Repository Source: "
425433
426- # This logic works - assuming only one marker...
427- $env: HLREPO = " NONE"
428- if (Test-Path " $env: JTSDK_CONFIG \hlmaster" ) { $env: HLREPO = " MASTER" }
429- # The next repo has been deprecated. It is here as an example - but it may not work.
430- if (Test-Path " $env: JTSDK_CONFIG \hlw9mdb" ) { $env: HLREPO = " W9MDB" }
431- Write-Host " $env: HLREPO "
432- if ($env: HLREPO -eq " NONE" ) {
433- Write-Host " --> Please set a repository source marker in $env: JTSDK_CONFIG "
434- }
434+ # # This logic works - assuming only one marker...
435+ # $env:HLREPO = "NONE"
436+ # if (Test-Path "$env:JTSDK_CONFIG\hlmaster") { $env:HLREPO = "MASTER" }
437+ # # The next repo has been deprecated. It is here as an example - but it may not work.
438+ # if (Test-Path "$env:JTSDK_CONFIG\hlw9mdb") { $env:HLREPO = "W9MDB" }
439+ # Write-Host "$env:HLREPO"
440+ # if ($env:HLREPO -eq "NONE") {
441+ # Write-Host " --> Please set a repository source marker in $env:JTSDK_CONFIG"
442+ # }
443+
444+ # Env var HLREPO now set from a key inside Versions.ini
445+ $env: HLREPO = $configTable.Get_Item (" hlrepo" )
446+ $env: HLREPO = $env: HLREPO.ToUpper ()
447+ $validValues = " NONE" , " MASTER"
448+ if ($validValues -contains $env: HLREPO ) {
449+ Write-Host " $env: HLREPO "
450+ } else {
451+ Write-Host " Invalid key value for hlrepo in Versions.ini"
452+ GenerateError(" Invalid key value for hlrepo in Versions.ini" )
453+ }
435454}
436455
437456# --- PortAudio Dirs ----------------------------------------------------------
@@ -484,7 +503,7 @@ function GenerateToolChain ($qtbaseff, $qtdff, $gccdff, $rubyff, $fftw3fff, $pal
484503 Add-Content $of " SET (LUSB $lusbff )"
485504 Add-Content $of " "
486505 Add-Content $of " # Hamlib"
487- Add-Content $of " SET (HLIB $hamlibff /qt/ $ env: QTV )"
506+ Add-Content $of " SET (HLIB $hamlibff )"
488507 Add-Content $of " "
489508 Add-Content $of " # Subversion"
490509 Add-Content $of " SET (SVND $svnff )"
@@ -537,37 +556,37 @@ function InvokeInteractiveEnvironment {
537556 New-Alias mingw32 "$env:JTSDK_TOOLS\msys64\mingw32.exe"
538557 New-Alias mingw64 "$env:JTSDK_TOOLS\msys64\mingw64.exe"
539558 Clear-Host
559+ Write-Host " JTSDK x64 Tools $env:JTSDK64_VERSION"
540560 Write-Host "--------------------------------------------------"
541- Write-Host " JTSDK x64 Tools $env:JTSDK64_VERSION "
561+ Write-Host "Package Version/Status "
542562 Write-Host "--------------------------------------------------"
543- Write-Host ""
544- Write-Host "Config: $env:JTSDK_VC"
545- Write-Host ""
546- Write-Host -NoNewLine "MSYS2 Path: "
563+ Write-Host -NoNewLine "MSYS2 Path..: "
547564 if ( $env:UNIXTOOLS -eq "enabled") {
548565 Write-Host "$env:JTSDK_MSYS2"
549566 } else {
550567 Write-Host "$env:UNIXTOOLS"
551568 }
552- Write-Host ""
553- Write-Host "Package Version/Status"
554- Write-Host "--------------------------------------------------"
555569 Write-Host "Source .....: $env:JT_SRC"
556570 if ((Test-Path "$env:JTSDK_TOOLS\qt\$env:qtv")) {
557571 Write-Host "Qt .........: $env:QTV/$env:VER_MINGW_GCC, Tools/$env:GCC_MINGW "
558572 } else {
559573 Write-Host "Qt .........: $env:QTV Missing"
560574 }
561575 Write-Host -NoNewLine "Hamlib .....: "
562- if ((Test-Path "$env:hamlib_base\qt\$env:QTV ")) {
563- if (Test-Path "$env:hamlib_base\qt\$env:QTV\ lib\libhamlib.dll.a") {
564- Write-Host "Dynamic"
576+ if ((Test-Path "$env:hamlib_base")) {
577+ if (Test-Path "$env:hamlib_base\lib\libhamlib.dll.a") {
578+ Write-Host -n "Dynamic"
565579 } else {
566- Write-Host "Static"
580+ if (Test-Path "$env:hamlib_base\lib") {
581+ Write-Host -n "Static"
582+ } else {
583+ Write-Host -n "Missing"
584+ }
567585 }
568586 } else {
569- Write-Host "Missing"
587+ Write-Host -n "Missing"
570588 }
589+ Write-Host " [Git: $env:HLREPO]"
571590 if ((Test-Path "$env:fftw3f_dir")) {
572591 Write-Host "FFTW .......: $env:fftwv"
573592 } else {
@@ -609,16 +628,16 @@ function InvokeInteractiveEnvironment {
609628 }
610629 }
611630 if ((Test-Path "$env:boost_dir")) {
612- Write-Host "Boost ......: $env:boostv $env:BOOST_STATUS for $env:GCC_MINGW "
631+ Write-Host "Boost ......: $env:boostv $env:BOOST_STATUS [ $env:B_MINGW] "
613632 } else {
614633 Write-Host "Boost ......: $env:boostv Missing"
615634 }
616635
617636 Write-Host "--------------------------------------------------"
618637 Write-Host ""
619- Write-Host " Build Boost .......: Deploy-Boost"
620- Write-Host " MSYS2 Environment .: mingw64"
621- Write-Host " Build JTware ......: jtbuild `[option`]"
638+ Write-Host "Build Boost .......: Deploy-Boost"
639+ Write-Host "MSYS2 Environ..... .: mingw64"
640+ Write-Host "Build JTware ......: jtbuild `[option`]"
622641 Write-Host ""
623642 }'
624643}
@@ -733,8 +752,8 @@ SetPortAudioDirs -pa_dir_ff ([ref]$pa_dir_ff)
733752# --- SET FINAL ENVIRONMENT PATHS and CONSOLE TITLE ---------------------------
734753
735754$env: PATH += $env: JTSDK_PATH
736- $env: PATH += " ;" + $pwd.drive.name + " :\JTSDK64-Tools\tools\hamlib\qt\ " + $ env: QTV + " \ bin" # -- Always Find HAMLIB in search path
737- $env: PATH += " ;" + $pwd.drive.name + " :\JTSDK64-Tools\tools\hamlib\qt\ " + $ env: QTV + " \ lib" # -- Always Find HAMLIB Library Dir in search path
755+ $env: PATH += " ;" + $pwd.drive.name + " :\JTSDK64-Tools\tools\hamlib\bin" # -- Always Find HAMLIB in search path
756+ $env: PATH += " ;" + $pwd.drive.name + " :\JTSDK64-Tools\tools\hamlib\lib" # -- Always Find HAMLIB Library Dir in search path
738757
739758# The next line is a FUDGE for an issue with JTDX packaging. Not Happy with this - but is necessary !
740759$env: PATH += " ;" + $env: windir + " \SysWOW64\downlevel;" + $env: windir + " \System32\downlevel"
0 commit comments