Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Various fixes, plus first steps towards additional IBU methods #825

Merged
merged 4 commits into from
Sep 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CHANGES.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,13 @@ happens, so I'm now setting it to a slightly arbitrary time early in the morning
Minor bug fixes for the 4.0.3 release (ie bugs in 4.0.3 are fixed in this 4.0.4 release).

### New Features
* None
* Improve equality tests [824](https://github.com/Brewtarget/brewtarget/issues/824)

### Bug Fixes
* Crash editing Target Boil Size [817](https://github.com/Brewtarget/brewtarget/issues/817)
* Crash when exporting recipe [821](https://github.com/Brewtarget/brewtarget/issues/821)
* Inventory not displaying (further fixes) [814](https://github.com/Brewtarget/brewtarget/issues/814)
* Edit Boil and Edit Fermentation buttons not working [826](https://github.com/Brewtarget/brewtarget/issues/826)

### Release Timestamp
Wed, 28 Aug 2024 04:00:04 +0100
Expand Down
1 change: 1 addition & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -793,6 +793,7 @@ commonSourceFiles = files([
'src/utils/EnumStringMapping.cpp',
'src/utils/FileSystemHelpers.cpp',
'src/utils/Fonts.cpp',
'src/utils/FuzzyCompare.cpp',
'src/utils/ImportRecordCount.cpp',
'src/utils/MetaTypes.cpp',
'src/utils/OStreamWriterForQFile.cpp',
Expand Down
34 changes: 32 additions & 2 deletions scripts/buildTool.py
Original file line number Diff line number Diff line change
Expand Up @@ -897,8 +897,27 @@ def installDependencies():
# 'xerces-c'
]
for packageToInstall in installListBrew:
log.debug('Installing ' + packageToInstall + ' via Homebrew')
btUtils.abortOnRunFail(subprocess.run(['brew', 'install', packageToInstall]))
#
# If we try to install a Homebrew package that is already installed, we'll get a warning. This isn't
# horrendous, but it looks a bit bad on the GitHub automated builds (because a lot of things are already
# installed by the time this script runs). As explained at
# https://apple.stackexchange.com/questions/284379/with-homebrew-how-to-check-if-a-software-package-is-installed,
# the simplest (albeit perhaps not the most elegant) way to check whether a package is already installed is
# to run `brew list`, throw away the output, and look at the return code, which will be 0 if the package is
# already installed and 1 if it is not. In the shell, we can use the magic of short-circuit evaluation
# (https://en.wikipedia.org/wiki/Short-circuit_evaluation) to, at a small legibility cost, do the whole
# check-and-install, in a single line. But in Python, it's easier to do it in two steps.
#
log.debug('Checking ' + packageToInstall)
brewListResult = subprocess.run(['brew', 'list', packageToInstall],
stdout = subprocess.DEVNULL,
stderr = subprocess.DEVNULL,
capture_output = False)
if (brewListResult.returncode == 0):
log.debug('Homebrew reports ' + packageToInstall + ' already installed')
else:
log.debug('Installing ' + packageToInstall + ' via Homebrew')
btUtils.abortOnRunFail(subprocess.run(['brew', 'install', packageToInstall]))
#
# By default, even once Qt5 is installed, Meson will not find it
#
Expand Down Expand Up @@ -1428,6 +1447,8 @@ def doPackage():
#
# Copy the Debian Binary package control file to where it belongs
#
# The meson build will have generated this file from packaging/linux/control.in
#
log.debug('Copying deb package control file')
copyWithoutCommentsOrFolds(dir_build.joinpath('control').as_posix(),
dir_packages_deb_control.joinpath('control').as_posix())
Expand Down Expand Up @@ -2022,6 +2043,8 @@ def doPackage():
# [projectName]_[versionNumber].app
# └── Contents
# ├── Info.plist ❇ <── "Information property list" file = required configuration information (in XML)
# │ This includes things such as Bundle ID. It is generated by the Meson build
# │ from packaging/darwin/Info.plist.in
# ├── Frameworks <── Contains any private shared libraries and frameworks used by the executable
# │ ├── QtCore.framework * NB: Directory and its contents * 🟢
# │ ├── [Other Qt .framework directories and their contents] 🟢
Expand Down Expand Up @@ -2311,6 +2334,13 @@ def doPackage():
# a lot simpler to let macdeployqt create the disk image, and we currently don't think we need to do further
# fix-up work after it's run. A custom icon on the disk image would be nice, but is far from essential.
#
# .:TBD:. Ideally we would sign our application here using the `-codesign=<ident>` command line option to
# macdeployqt. For the GitHub builds, we would have to import a code signing certificate using
# https://github.com/Apple-Actions/import-codesign-certs.
#
# However, getting an identity and certificate with which to sign is a bit complicated. For a start,
# Apple pretty much require you to sign up to their $99/year developer program.
#
log.debug('Running macdeployqt')
os.chdir(dir_packages_platform)
btUtils.abortOnRunFail(
Expand Down
1 change: 1 addition & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ set(filesToCompile_cpp
${repoDir}/src/utils/EnumStringMapping.cpp
${repoDir}/src/utils/FileSystemHelpers.cpp
${repoDir}/src/utils/Fonts.cpp
${repoDir}/src/utils/FuzzyCompare.cpp
${repoDir}/src/utils/ImportRecordCount.cpp
${repoDir}/src/utils/MetaTypes.cpp
${repoDir}/src/utils/OStreamWriterForQFile.cpp
Expand Down
4 changes: 4 additions & 0 deletions src/Logging.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -524,6 +524,10 @@ void Logging::terminateLogging() {
}

QString Logging::getStackTrace() {
//
// TBD: Once all our compilers have full C++23 support, we should look at switching to <stacktrace> in the standard
// library.
//
std::ostringstream stacktrace;
stacktrace << boost::stacktrace::stacktrace();
QString returnValue;
Expand Down
Loading
Loading