From 3b4d2206988dc7887e295d06c59e1e5d38d279ee Mon Sep 17 00:00:00 2001 From: Mark Kidder <83427558+mark-sil@users.noreply.github.com> Date: Tue, 14 Jan 2025 08:10:13 -0500 Subject: [PATCH 1/2] Fix problems with using local palaso and chorus (#246) - Use .net framework 462 for palaso and chorus - For Chorus, modify the versions for the specific package names instead of everything that begins with SIL.Chorus. This prevents modifying the version of SIL.Chorus.l10ns A remaining task is to either remove the line containing "SIL.Core" version="8.1.0-beta0035" from packages.config, or modify the sed command so that it does not change this version number. --- Build/buildLocalLibraries.sh | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/Build/buildLocalLibraries.sh b/Build/buildLocalLibraries.sh index 61b8219796..dd77514556 100755 --- a/Build/buildLocalLibraries.sh +++ b/Build/buildLocalLibraries.sh @@ -5,6 +5,9 @@ libpalaso_dir="" liblcm_dir="" chorus_dir="" +libpalaso_net_ver="net462" +liblcm_net_ver="net461" +chorus_net_ver="net462" mkall_targets_file="mkall.targets" packages_dir="../packages" @@ -43,7 +46,7 @@ function delete_and_pack_liblcm { (cd "$liblcm_dir/artifacts" && rm *nupkg) echo "Running 'dotnet pack' in the liblcm directory: $liblcm_dir" - pack_output=$(cd "$liblcm_dir" && dotnet pack -c Debug -p:TargetFrameworks=net461) + pack_output=$(cd "$liblcm_dir" && dotnet pack -c Debug -p:TargetFrameworks=$liblcm_net_ver) # Extract version number using regex if [[ $pack_output =~ $version_regex ]]; then @@ -53,7 +56,7 @@ function delete_and_pack_liblcm { echo "Error: Unable to extract version number from dotnet pack output. (Maybe build failure or nothing needed building?)" exit 1 fi - copy_pdb_files "$liblcm_dir/artifacts/Debug/net461" + copy_pdb_files "$liblcm_dir/artifacts/Debug/$liblcm_net_ver" fi # Update LcmNugetVersion in mkall.targets @@ -74,20 +77,21 @@ function delete_and_pack_chorus { echo "Error: The specified packages directory does not exist: $packages_dir" exit 1 fi - + prefixes=("SIL.Chorus.App" "SIL.Chorus.LibChorus") if [ "$use_manual_version" == true ]; then version_number="$manual_version" else - prefix="SIL.Chorus" echo "Deleting files starting with specified prefix in $packages_dir" - find "$packages_dir" -name "${prefix}*" -exec rm -f -r {} \; + for prefix in "${prefixes[@]}"; do + find "$packages_dir" -name "${prefix}*" -exec rm -f -r {} \; + done echo "Removing chorus output packages so that dotnet pack will run and output the version" (cd "$chorus_dir/output" && rm *nupkg) echo "Running 'dotnet pack' in the chorus directory: $chorus_dir" - pack_output=$(cd "$chorus_dir" && dotnet pack -c Debug -p:TargetFrameworks=net461) + pack_output=$(cd "$chorus_dir" && dotnet pack -c Debug -p:TargetFrameworks=$chorus_net_ver) # Extract version number using regex if [[ $pack_output =~ $version_regex ]]; then @@ -97,13 +101,15 @@ function delete_and_pack_chorus { echo "Error: Unable to extract version number from dotnet pack output." exit 1 fi - copy_pdb_files "$chorus_dir/Output/Debug/net461" + copy_pdb_files "$chorus_dir/Output/Debug/$chorus_net_ver" fi # Update ChorusNugetVersion in mkall.targets update_mkall_targets "ChorusNugetVersion" "$version_number" # Update packages.config with extracted version - update_packages_config "SIL.Chorus" "$version_number" + for prefix in "${prefixes[@]}"; do + update_packages_config "$prefix" "$version_number" + done fi } @@ -130,7 +136,7 @@ function delete_and_pack_libpalaso { (cd "$libpalaso_dir/output" && rm *nupkg) echo "Running 'dotnet pack' in the libpalaso directory: $libpalaso_dir" - pack_output=$(cd "$libpalaso_dir" && dotnet pack -c Debug -p:TargetFrameworks=net461) + pack_output=$(cd "$libpalaso_dir" && dotnet pack -c Debug -p:TargetFrameworks=$libpalaso_net_ver) # Extract version number using regex if [[ $pack_output =~ $version_regex ]]; then @@ -140,7 +146,7 @@ function delete_and_pack_libpalaso { echo "Error: Unable to extract version number from dotnet pack output." exit 1 fi - copy_pdb_files "$libpalaso_dir/output/Debug/net461" + copy_pdb_files "$libpalaso_dir/output/Debug/$libpalaso_net_ver" fi # Update PalasoNugetVersion in mkall.targets From 9cb20de15dd86879aba70f63b0b085a35dce060c Mon Sep 17 00:00:00 2001 From: Mark Kidder <83427558+mark-sil@users.noreply.github.com> Date: Thu, 16 Jan 2025 12:00:46 -0500 Subject: [PATCH 2/2] Word Export: prevent cross-thread exception (#184) * Word Export: prevent cross-thread exception Use InvokeRequired and Invoke to re-execute the TextForReal call. Notes: - XHTML export is also calling this from a different thread but we were not seeing this error because the text string was the same as the current value so no change was made. - The exception was only happening when there were reversals and it seemed to only/mostly happen in debug builds. --- Src/Common/Controls/FwControls/StatusBarTextBox.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Src/Common/Controls/FwControls/StatusBarTextBox.cs b/Src/Common/Controls/FwControls/StatusBarTextBox.cs index b6f690e5ac..b4071a64bb 100644 --- a/Src/Common/Controls/FwControls/StatusBarTextBox.cs +++ b/Src/Common/Controls/FwControls/StatusBarTextBox.cs @@ -135,6 +135,12 @@ public string TextForReal { CheckDisposed(); + if (m_bar.InvokeRequired) + { + m_bar.Invoke((Action)(s => this.TextForReal = s), value); + return; + } + m_text = value; // But we still need to set the Text property to get autosizing to work. this.Text = m_text;