-
Notifications
You must be signed in to change notification settings - Fork 733
Description
Description of the bug
Some commits seem to break installation for macOS 10.13. I don't know c++ nor Xcode development but have managed to revert the offending parts of certain files, resulting in a successful install. I will list the errors, files, commits, and my fix in the sections below Versions. They are listed in the order I encountered them.
Apologies for improper github etiquette and not using pull requests. It's been years since I've fiddled with any software project. I hope the owner can implement a better fix than mine to maintain support for macOS 10.13.
Steps to reproduce
- Download the project.
- Follow manual installation instructions.
- Get some errors and fail to install.
Versions
- Background Music: 0.4.3
- macOS: 10.13.6
- Xcode: 10.1 (10B61)
Errors from Installing XPC Helper
VirtualMainVolume Errors
This is a set of 5 errors arising from BGMAudioDevice.cpp, Lines:
Error Message
/{...}/BackgroundMusic-master/BGMApp/BGMApp/BGMAudioDevice.cpp:84:9: error: use of undeclared identifier
'kAudioHardwareServiceDeviceProperty_VirtualMainVolume'; did you mean 'kAudioHardwareServiceDeviceProperty_VirtualMasterVolume'?
kAudioHardwareServiceDeviceProperty_VirtualMainVolume,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
kAudioHardwareServiceDeviceProperty_VirtualMasterVolume
In file included from /{...}/BackgroundMusic-master/BGMApp/BGMApp/BGMAudioDevice.cpp:30:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/AudioToolbox.framework/Headers/AudioServices.h:22:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/AudioToolbox.framework/Headers/AudioHardwareService.h:66:5: note:
'kAudioHardwareServiceDeviceProperty_VirtualMasterVolume' declared here
kAudioHardwareServiceDeviceProperty_VirtualMasterVolume = 'vmvc',
^
The are 5 total error messages similar to the above.
Relevant Commit
My Fix
Change all instances of Main to Master in those 5 lines.
BGMStatusBarItem Error
Error Message
/{...}/BackgroundMusic-master/BGMApp/BGMApp/BGMStatusBarItem.mm:
129:42: error: no known class method for selector
'imageWithSystemSymbolName:accessibilityDescription:'
volumeIcon0SoundWaves = [NSImage imageWithSystemSymbolName:@"speaker.fill" accessibilityDescription:nil];
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
There are 4 total error messages similar to the above.
Relevant Commit
My Fix
Ignore that commit by rolling back its changes:
- Delete Lines 128 to 133 and Line 138.
- De-indent the remaining four lines.
Error from Installing Background Music.app to /Applications
BGMAppDelegate Error
Error Message
/{...}/BackgroundMusic-master/BGMApp/BGMApp/BGMAppDelegate.mm:
238:32: error: unused parameter
'menu' [-Werror,-Wunused-parameter]
- (void) menuWillOpen:(NSMenu*)menu {
^
Relevant Commit
My Fix
Remove Lines 238 to 298.