diff --git a/README.md b/README.md index 682bcc8..e10026c 100644 --- a/README.md +++ b/README.md @@ -225,7 +225,7 @@ By default, commands will be sent to the first mix effect block (M/E). To send Where `$i` can be 1, 2, 3, or 4 depending on the capability of your ATEM switcher -Feedback: Enabled for '/atem/usk/$i/on-air', '/atem/usk/$i/tie', '/atem/usk/$i/source/\*', '/atem/usk/$i/luma/\*', and '/atem/usk/$i/chroma/\*' +Feedback: Enabled ### Downstream Keyers diff --git a/atemOSC/FeedbackMonitors.h b/atemOSC/FeedbackMonitors.h index 7469bad..862884e 100644 --- a/atemOSC/FeedbackMonitors.h +++ b/atemOSC/FeedbackMonitors.h @@ -146,6 +146,28 @@ class UpstreamKeyerLumaParametersMonitor : public GenericMonitor, public SendStatusInterface +{ +public: + UpstreamKeyerFlyParametersMonitor(Switcher *switcher, int me) : GenericMonitor(switcher), me_(me) { } + HRESULT Notify(BMDSwitcherKeyFlyParametersEventType eventType, BMDSwitcherFlyKeyFrame keyFrame); + float sendStatus() const; + +protected: + virtual ~UpstreamKeyerFlyParametersMonitor() { } + +private: + void updateUSKFlyedParameter() const; + void updateUSKCanFlyParameter() const; + void updateUSKFlyRateParameter() const; + void updateUSKFlySizeXParameter() const; + void updateUSKFlySizeYParameter() const; + void updateUSKFlyPositionXParameter() const; + void updateUSKFlyPositionYParameter() const; + void updateUSKFlyRotationParameter() const; + int me_; +}; + class UpstreamKeyerChromaParametersMonitor : public GenericMonitor, public SendStatusInterface { public: @@ -165,6 +187,27 @@ class UpstreamKeyerChromaParametersMonitor : public GenericMonitor, public SendStatusInterface +{ +public: + UpstreamKeyerPatternParametersMonitor(Switcher *switcher, int me) : GenericMonitor(switcher), me_(me) { } + HRESULT Notify (BMDSwitcherKeyPatternParametersEventType eventType); + float sendStatus() const; + +protected: + virtual ~UpstreamKeyerPatternParametersMonitor() { } + +private: + void updateUSKPatternStyleParameter() const; + void updateUSKPatternSizeParameter() const; + void updateUSKPatternSymmetryParameter() const; + void updateUSKPatternInverseParameter() const; + void updateUSKPatternSoftnessParameter() const; + void updateUSKPatternHorizontalOffsetParameter() const; + void updateUSKPatternVerticalOffsetParameter() const; + int me_; +}; + class TransitionParametersMonitor : public GenericMonitor, public SendStatusInterface { public: diff --git a/atemOSC/FeedbackMonitors.mm b/atemOSC/FeedbackMonitors.mm index ddf0e69..5eb59e6 100644 --- a/atemOSC/FeedbackMonitors.mm +++ b/atemOSC/FeedbackMonitors.mm @@ -578,6 +578,174 @@ return 0.4; } +HRESULT UpstreamKeyerFlyParametersMonitor::Notify(BMDSwitcherKeyFlyParametersEventType eventType, BMDSwitcherFlyKeyFrame keyFrame) +{ + switch (eventType) + { + case bmdSwitcherKeyFlyParametersEventTypeFlyChanged: + updateUSKFlyedParameter(); + break; + case bmdSwitcherKeyFlyParametersEventTypeCanFlyChanged: + updateUSKCanFlyParameter(); + break; + case bmdSwitcherKeyFlyParametersEventTypeRateChanged: + updateUSKFlyRateParameter(); + break; + case bmdSwitcherKeyFlyParametersEventTypeSizeXChanged: + updateUSKFlySizeXParameter(); + break; + case bmdSwitcherKeyFlyParametersEventTypeSizeYChanged: + updateUSKFlySizeYParameter(); + break; + case bmdSwitcherKeyFlyParametersEventTypePositionXChanged: + updateUSKFlyPositionXParameter(); + break; + case bmdSwitcherKeyFlyParametersEventTypePositionYChanged: + updateUSKFlyPositionYParameter(); + break; + case bmdSwitcherKeyFlyParametersEventTypeRotationChanged: + updateUSKFlyRotationParameter(); + break; + default: + // ignore other property changes not used for this app + break; + } + return S_OK; +} + +void UpstreamKeyerFlyParametersMonitor::updateUSKFlyedParameter() const +{ + std::vector keyers = [switcher keyers][me_]; + for (int i = 0; i < keyers.size(); i++) + { + IBMDSwitcherKeyFlyParameters* flyParams; + if (SUCCEEDED(keyers[i]->QueryInterface(IID_IBMDSwitcherKeyFlyParameters, (void**)&flyParams))) + { + bool isFlyKey; + flyParams->GetFly(&isFlyKey); + + sendFeedbackMessage(switcher, [NSString stringWithFormat:@"/usk/%d/fly/enabled",i+1], [OSCValue createWithBool:isFlyKey], me_); + } + } +} +void UpstreamKeyerFlyParametersMonitor::updateUSKCanFlyParameter() const +{ + std::vector keyers = [switcher keyers][me_]; + for (int i = 0; i < keyers.size(); i++) + { + IBMDSwitcherKeyFlyParameters* flyParams; + if (SUCCEEDED(keyers[i]->QueryInterface(IID_IBMDSwitcherKeyFlyParameters, (void**)&flyParams))) + { + bool canFly; + flyParams->GetCanFly(&canFly); + + sendFeedbackMessage(switcher, [NSString stringWithFormat:@"/usk/%d/fly/can",i+1], [OSCValue createWithBool:canFly], me_); + } + } +} +void UpstreamKeyerFlyParametersMonitor::updateUSKFlyRateParameter() const +{ + std::vector keyers = [switcher keyers][me_]; + for (int i = 0; i < keyers.size(); i++) + { + IBMDSwitcherKeyFlyParameters* flyParams; + if (SUCCEEDED(keyers[i]->QueryInterface(IID_IBMDSwitcherKeyFlyParameters, (void**)&flyParams))) + { + uint32_t frames; + flyParams->GetRate(&frames); + + sendFeedbackMessage(switcher, [NSString stringWithFormat:@"/usk/%d/fly/rate",i+1], [OSCValue createWithInt:frames], me_); + } + } +} +void UpstreamKeyerFlyParametersMonitor::updateUSKFlySizeXParameter() const +{ + std::vector keyers = [switcher keyers][me_]; + for (int i = 0; i < keyers.size(); i++) + { + IBMDSwitcherKeyFlyParameters* flyParams; + if (SUCCEEDED(keyers[i]->QueryInterface(IID_IBMDSwitcherKeyFlyParameters, (void**)&flyParams))) + { + double multiplierX; + flyParams->GetSizeX(&multiplierX); + + sendFeedbackMessage(switcher, [NSString stringWithFormat:@"/usk/%d/fly/size-x",i+1], [OSCValue createWithFloat:multiplierX], me_); + } + } +} +void UpstreamKeyerFlyParametersMonitor::updateUSKFlySizeYParameter() const +{ + std::vector keyers = [switcher keyers][me_]; + for (int i = 0; i < keyers.size(); i++) + { + IBMDSwitcherKeyFlyParameters* flyParams; + if (SUCCEEDED(keyers[i]->QueryInterface(IID_IBMDSwitcherKeyFlyParameters, (void**)&flyParams))) + { + double multiplierY; + flyParams->GetSizeY(&multiplierY); + + sendFeedbackMessage(switcher, [NSString stringWithFormat:@"/usk/%d/fly/size-y",i+1], [OSCValue createWithFloat:multiplierY], me_); + } + } +} +void UpstreamKeyerFlyParametersMonitor::updateUSKFlyPositionXParameter() const +{ + std::vector keyers = [switcher keyers][me_]; + for (int i = 0; i < keyers.size(); i++) + { + IBMDSwitcherKeyFlyParameters* flyParams; + if (SUCCEEDED(keyers[i]->QueryInterface(IID_IBMDSwitcherKeyFlyParameters, (void**)&flyParams))) + { + double offsetX; + flyParams->GetPositionX(&offsetX); + + sendFeedbackMessage(switcher, [NSString stringWithFormat:@"/usk/%d/fly/position-x",i+1], [OSCValue createWithFloat:offsetX], me_); + } + } +} +void UpstreamKeyerFlyParametersMonitor::updateUSKFlyPositionYParameter() const +{ + std::vector keyers = [switcher keyers][me_]; + for (int i = 0; i < keyers.size(); i++) + { + IBMDSwitcherKeyFlyParameters* flyParams; + if (SUCCEEDED(keyers[i]->QueryInterface(IID_IBMDSwitcherKeyFlyParameters, (void**)&flyParams))) + { + double offsetY; + flyParams->GetPositionY(&offsetY); + + sendFeedbackMessage(switcher, [NSString stringWithFormat:@"/usk/%d/fly/position-y",i+1], [OSCValue createWithFloat:offsetY], me_); + } + } +} +void UpstreamKeyerFlyParametersMonitor::updateUSKFlyRotationParameter() const +{ + std::vector keyers = [switcher keyers][me_]; + for (int i = 0; i < keyers.size(); i++) + { + IBMDSwitcherKeyFlyParameters* flyParams; + if (SUCCEEDED(keyers[i]->QueryInterface(IID_IBMDSwitcherKeyFlyParameters, (void**)&flyParams))) + { + double frames; + flyParams->GetRotation(&frames); + + sendFeedbackMessage(switcher, [NSString stringWithFormat:@"/usk/%d/fly/rotation",i+1], [OSCValue createWithFloat:frames], me_); + } + } +} + +float UpstreamKeyerFlyParametersMonitor::sendStatus() const +{ + updateUSKFlyRateParameter(); + updateUSKFlySizeXParameter(); + updateUSKFlySizeYParameter(); + updateUSKFlyPositionXParameter(); + updateUSKFlyPositionYParameter(); + updateUSKFlyRotationParameter(); + + return 0.4; +} + HRESULT UpstreamKeyerChromaParametersMonitor::Notify(BMDSwitcherKeyChromaParametersEventType eventType) { switch (eventType) @@ -691,6 +859,199 @@ return 0.4; } +HRESULT UpstreamKeyerPatternParametersMonitor::Notify(BMDSwitcherKeyPatternParametersEventType eventType) +{ + switch (eventType) + { + case bmdSwitcherKeyPatternParametersEventTypePatternChanged: + updateUSKPatternStyleParameter(); + break; + case bmdSwitcherKeyPatternParametersEventTypeSizeChanged: + updateUSKPatternSizeParameter(); + break; + case bmdSwitcherKeyPatternParametersEventTypeSymmetryChanged: + updateUSKPatternSymmetryParameter(); + break; + case bmdSwitcherKeyPatternParametersEventTypeSoftnessChanged: + updateUSKPatternSoftnessParameter(); + break; + case bmdSwitcherKeyPatternParametersEventTypeInverseChanged: + updateUSKPatternInverseParameter(); + break; + case bmdSwitcherKeyPatternParametersEventTypeHorizontalOffsetChanged: + updateUSKPatternHorizontalOffsetParameter(); + break; + case bmdSwitcherKeyPatternParametersEventTypeVerticalOffsetChanged: + updateUSKPatternVerticalOffsetParameter(); + break; + default: + // ignore other property changes not used for this app + break; + } + return S_OK; +} + +void UpstreamKeyerPatternParametersMonitor::updateUSKPatternStyleParameter() const +{ + std::vector keyers = [switcher keyers][me_]; + for (int i = 0; i < keyers.size(); i++) + { + IBMDSwitcherKeyPatternParameters* patternParams; + if (SUCCEEDED(keyers[i]->QueryInterface(IID_IBMDSwitcherKeyPatternParameters, (void**)&patternParams))) + { + BMDSwitcherPatternStyle pattern; + patternParams->GetPattern(&pattern); + + NSString *styleStr; + if (pattern == bmdSwitcherPatternStyleLeftToRightBar) + styleStr = @"bar_left2right"; + if (pattern == bmdSwitcherPatternStyleTopToBottomBar) + styleStr = @"bar_top2bottom"; + if (pattern == bmdSwitcherPatternStyleHorizontalBarnDoor) + styleStr = @"barndoor_horizontal"; + if (pattern == bmdSwitcherPatternStyleVerticalBarnDoor) + styleStr = @"barndoor_vertical"; + if (pattern == bmdSwitcherPatternStyleCornersInFourBox) + styleStr = @"corners"; + if (pattern == bmdSwitcherPatternStyleRectangleIris) + styleStr = @"iris_rectangle"; + if (pattern == bmdSwitcherPatternStyleDiamondIris) + styleStr = @"iris_diamond"; + if (pattern == bmdSwitcherPatternStyleCircleIris) + styleStr = @"iris_circle"; + if (pattern == bmdSwitcherPatternStyleTopLeftBox) + styleStr = @"box_topleft"; + if (pattern == bmdSwitcherPatternStyleTopRightBox) + styleStr = @"box_topright"; + if (pattern == bmdSwitcherPatternStyleBottomRightBox) + styleStr = @"box_bottomright"; + if (pattern == bmdSwitcherPatternStyleBottomLeftBox) + styleStr = @"box_bottomleft"; + if (pattern == bmdSwitcherPatternStyleTopCentreBox) + styleStr = @"box_topcenter"; + if (pattern == bmdSwitcherPatternStyleRightCentreBox) + styleStr = @"box_centerright"; + if (pattern == bmdSwitcherPatternStyleBottomCentreBox) + styleStr = @"box_centerbottom"; + if (pattern == bmdSwitcherPatternStyleLeftCentreBox) + styleStr = @"box_centerleft"; + if (pattern == bmdSwitcherPatternStyleTopLeftDiagonal) + styleStr = @"diagonal_topleft"; + if (pattern == bmdSwitcherPatternStyleTopRightDiagonal) + styleStr = @"diagonal_topright"; + + sendFeedbackMessage(switcher, [NSString stringWithFormat:@"/usk/%d/pattern/style",i+1], [OSCValue createWithString:styleStr], me_); + + // Support for legacy clients like TouchOSC + sendFeedbackMessage(switcher, [NSString stringWithFormat:@"/usk/%d/pattern/style/%@",i+1, styleStr], [OSCValue createWithFloat:1.0], me_); + } + } +} + +void UpstreamKeyerPatternParametersMonitor::updateUSKPatternSizeParameter() const +{ + std::vector keyers = [switcher keyers][me_]; + for (int i = 0; i < keyers.size(); i++) + { + IBMDSwitcherKeyPatternParameters* patternParams; + if (SUCCEEDED(keyers[i]->QueryInterface(IID_IBMDSwitcherKeyPatternParameters, (void**)&patternParams))) + { + double size; + patternParams->GetSize(&size); + + sendFeedbackMessage(switcher, [NSString stringWithFormat:@"/usk/%d/pattern/size",i+1], [OSCValue createWithFloat:size], me_); + } + } +} +void UpstreamKeyerPatternParametersMonitor::updateUSKPatternSymmetryParameter() const +{ + std::vector keyers = [switcher keyers][me_]; + for (int i = 0; i < keyers.size(); i++) + { + IBMDSwitcherKeyPatternParameters* patternParams; + if (SUCCEEDED(keyers[i]->QueryInterface(IID_IBMDSwitcherKeyPatternParameters, (void**)&patternParams))) + { + double symmetry; + patternParams->GetSymmetry(&symmetry); + + sendFeedbackMessage(switcher, [NSString stringWithFormat:@"/usk/%d/pattern/symmetry",i+1], [OSCValue createWithFloat:symmetry], me_); + } + } +} +void UpstreamKeyerPatternParametersMonitor::updateUSKPatternSoftnessParameter() const +{ + std::vector keyers = [switcher keyers][me_]; + for (int i = 0; i < keyers.size(); i++) + { + IBMDSwitcherKeyPatternParameters* patternParams; + if (SUCCEEDED(keyers[i]->QueryInterface(IID_IBMDSwitcherKeyPatternParameters, (void**)&patternParams))) + { + double softness; + patternParams->GetSoftness(&softness); + + sendFeedbackMessage(switcher, [NSString stringWithFormat:@"/usk/%d/pattern/softness",i+1], [OSCValue createWithFloat:softness], me_); + } + } +} +void UpstreamKeyerPatternParametersMonitor::updateUSKPatternHorizontalOffsetParameter() const +{ + std::vector keyers = [switcher keyers][me_]; + for (int i = 0; i < keyers.size(); i++) + { + IBMDSwitcherKeyPatternParameters* patternParams; + if (SUCCEEDED(keyers[i]->QueryInterface(IID_IBMDSwitcherKeyPatternParameters, (void**)&patternParams))) + { + double positionX; + patternParams->GetHorizontalOffset(&positionX); + + sendFeedbackMessage(switcher, [NSString stringWithFormat:@"/usk/%d/pattern/position-x",i+1], [OSCValue createWithFloat:positionX], me_); + } + } +} +void UpstreamKeyerPatternParametersMonitor::updateUSKPatternVerticalOffsetParameter() const +{ + std::vector keyers = [switcher keyers][me_]; + for (int i = 0; i < keyers.size(); i++) + { + IBMDSwitcherKeyPatternParameters* patternParams; + if (SUCCEEDED(keyers[i]->QueryInterface(IID_IBMDSwitcherKeyPatternParameters, (void**)&patternParams))) + { + double positionY; + patternParams->GetVerticalOffset(&positionY); + + sendFeedbackMessage(switcher, [NSString stringWithFormat:@"/usk/%d/pattern/position-y",i+1], [OSCValue createWithFloat:positionY], me_); + } + } +} +void UpstreamKeyerPatternParametersMonitor::updateUSKPatternInverseParameter() const +{ + std::vector keyers = [switcher keyers][me_]; + for (int i = 0; i < keyers.size(); i++) + { + IBMDSwitcherKeyPatternParameters* patternParams; + if (SUCCEEDED(keyers[i]->QueryInterface(IID_IBMDSwitcherKeyPatternParameters, (void**)&patternParams))) + { + bool inverse; + patternParams->GetInverse(&inverse); + + sendFeedbackMessage(switcher, [NSString stringWithFormat:@"/usk/%d/pattern/inverse",i+1], [OSCValue createWithBool:inverse], me_); + } + } +} + +float UpstreamKeyerPatternParametersMonitor::sendStatus() const +{ + updateUSKPatternInverseParameter(); + updateUSKPatternSizeParameter(); + updateUSKPatternStyleParameter(); + updateUSKPatternSoftnessParameter(); + updateUSKPatternSymmetryParameter(); + updateUSKPatternHorizontalOffsetParameter(); + updateUSKPatternVerticalOffsetParameter(); + + return 0.4; +} + HRESULT TransitionParametersMonitor::Notify(BMDSwitcherTransitionParametersEventType eventType) { diff --git a/atemOSC/Switcher.h b/atemOSC/Switcher.h index 072d999..7d49378 100644 --- a/atemOSC/Switcher.h +++ b/atemOSC/Switcher.h @@ -26,6 +26,8 @@ NS_ASSUME_NONNULL_BEGIN std::map mUpstreamKeyerMonitors; std::map mUpstreamKeyerLumaParametersMonitors; std::map mUpstreamKeyerChromaParametersMonitors; + std::map mUpstreamKeyerFlyParametersMonitors; + std::map mUpstreamKeyerPatternParametersMonitors; std::map mTransitionParametersMonitors; MacroPoolMonitor* mMacroPoolMonitor; MacroControlMonitor* mMacroControlMonitor; diff --git a/atemOSC/Switcher.mm b/atemOSC/Switcher.mm index 993dd21..c8c2509 100644 --- a/atemOSC/Switcher.mm +++ b/atemOSC/Switcher.mm @@ -311,6 +311,22 @@ - (void)switcherConnected mMonitors.push_back(chromaMonitor); mUpstreamKeyerChromaParametersMonitors.insert(std::make_pair(meIndex, chromaMonitor)); } + IBMDSwitcherKeyFlyParameters* flyParams; + if (SUCCEEDED(key->QueryInterface(IID_IBMDSwitcherKeyFlyParameters, (void**)&flyParams))) + { + UpstreamKeyerFlyParametersMonitor *flyMonitor = new UpstreamKeyerFlyParametersMonitor(self, meIndex); + flyParams->AddCallback(flyMonitor); + mMonitors.push_back(flyMonitor); + mUpstreamKeyerFlyParametersMonitors.insert(std::make_pair(meIndex, flyMonitor)); + } + IBMDSwitcherKeyPatternParameters* patternParams; + if (SUCCEEDED(key->QueryInterface(IID_IBMDSwitcherKeyPatternParameters, (void**)&patternParams))) + { + UpstreamKeyerPatternParametersMonitor *patternMonitor = new UpstreamKeyerPatternParametersMonitor(self, meIndex); + patternParams->AddCallback(patternMonitor); + mMonitors.push_back(patternMonitor); + mUpstreamKeyerPatternParametersMonitors.insert(std::make_pair(meIndex, patternMonitor)); + } } keyIterator->Release(); keyIterator = NULL; @@ -717,6 +733,16 @@ - (void)cleanUpConnection keyers[me].back()->QueryInterface(IID_IBMDSwitcherKeyChromaParameters, (void**)&chromaParams); if (chromaParams != nil) chromaParams->RemoveCallback(mUpstreamKeyerChromaParametersMonitors[me]); + + IBMDSwitcherKeyFlyParameters* flyParams = nil; + keyers[me].back()->QueryInterface(IID_IBMDSwitcherKeyFlyParameters, (void**)&flyParams); + if (flyParams != nil) + flyParams->RemoveCallback(mUpstreamKeyerFlyParametersMonitors[me]); + + IBMDSwitcherKeyPatternParameters* patternParams = nil; + keyers[me].back()->QueryInterface(IID_IBMDSwitcherKeyPatternParameters, (void**)&patternParams); + if (patternParams != nil) + patternParams->RemoveCallback(mUpstreamKeyerPatternParametersMonitors[me]); keyers[me].pop_back(); } @@ -729,6 +755,8 @@ - (void)cleanUpConnection mUpstreamKeyerMonitors.clear(); mUpstreamKeyerLumaParametersMonitors.clear(); mUpstreamKeyerChromaParametersMonitors.clear(); + mUpstreamKeyerFlyParametersMonitors.clear(); + mUpstreamKeyerPatternParametersMonitors.clear(); for (auto const& it : mInputs) { diff --git a/atemOSC/atemOSC.xcodeproj/project.pbxproj b/atemOSC/atemOSC.xcodeproj/project.pbxproj index 2defa7c..47ca790 100644 --- a/atemOSC/atemOSC.xcodeproj/project.pbxproj +++ b/atemOSC/atemOSC.xcodeproj/project.pbxproj @@ -28,11 +28,12 @@ A9A9AA932594255A00890134 /* VVBasics.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = A9A9A9452594209100890134 /* VVBasics.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; A9A9AA942594255A00890134 /* VVOSC.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = A9A9A9472594209100890134 /* VVOSC.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; A9D0B4DF259FCE5D00FF0733 /* LogView.mm in Sources */ = {isa = PBXBuildFile; fileRef = A9D0B4DE259FCE5D00FF0733 /* LogView.mm */; }; + A9EFFF1B2742A70700EA8FCE /* Bugsnag.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A9F4DDB62711276E007E64DE /* Bugsnag.framework */; }; + A9EFFF1C2742A70700EA8FCE /* Bugsnag.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = A9F4DDB62711276E007E64DE /* Bugsnag.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; A9F4DDB927112779007E64DE /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A9F4DDB827112779007E64DE /* SystemConfiguration.framework */; }; A9F4DDBB27112788007E64DE /* libc++.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = A9F4DDBA27112788007E64DE /* libc++.tbd */; }; A9F4DDBD2711278F007E64DE /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = A9F4DDBC2711278F007E64DE /* libz.tbd */; }; A9F4DDC027112835007E64DE /* BugsnagExceptionHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = A9F4DDBF27112835007E64DE /* BugsnagExceptionHandler.m */; }; - A9F4DDC827112C69007E64DE /* Bugsnag.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A9F4DDB62711276E007E64DE /* Bugsnag.framework */; }; A9F7906A1F89B83D003ACBCF /* OSCReceiver.mm in Sources */ = {isa = PBXBuildFile; fileRef = A9F790691F89B83C003ACBCF /* OSCReceiver.mm */; }; A9FB8B5A25943693003B4581 /* VVBasics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A9A9A9452594209100890134 /* VVBasics.framework */; }; A9FB8B5B25943693003B4581 /* VVOSC.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A9A9A9472594209100890134 /* VVOSC.framework */; }; @@ -47,6 +48,7 @@ files = ( A9A9AA932594255A00890134 /* VVBasics.framework in CopyFiles */, A9A9AA942594255A00890134 /* VVOSC.framework in CopyFiles */, + A9EFFF1C2742A70700EA8FCE /* Bugsnag.framework in CopyFiles */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -107,12 +109,12 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - A9F4DDC827112C69007E64DE /* Bugsnag.framework in Frameworks */, A9F4DDBD2711278F007E64DE /* libz.tbd in Frameworks */, A9F4DDBB27112788007E64DE /* libc++.tbd in Frameworks */, A9F4DDB927112779007E64DE /* SystemConfiguration.framework in Frameworks */, A9FB8B5A25943693003B4581 /* VVBasics.framework in Frameworks */, A9FB8B5B25943693003B4581 /* VVOSC.framework in Frameworks */, + A9EFFF1B2742A70700EA8FCE /* Bugsnag.framework in Frameworks */, 333E3045161395CF0002287B /* IOKit.framework in Frameworks */, 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */, ); @@ -278,7 +280,7 @@ LastUpgradeCheck = 1230; TargetAttributes = { 8D1107260486CEB800E47090 = { - DevelopmentTeam = LRNWZB2D4D; + DevelopmentTeam = 97DY652VJL; LastSwiftMigration = 1230; ProvisioningStyle = Automatic; }; @@ -367,11 +369,12 @@ CLANG_ENABLE_OBJC_WEAK = YES; CODE_SIGN_ENTITLEMENTS = AtemOSC/atemOSC.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; + "CODE_SIGN_IDENTITY[sdk=macosx*]" = "-"; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = NO; CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = LRNWZB2D4D; + DEVELOPMENT_TEAM = 97DY652VJL; ENABLE_HARDENED_RUNTIME = YES; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", @@ -388,7 +391,7 @@ LD_RUNPATH_SEARCH_PATHS = "@loader_path/../Frameworks @executable_path/../Frameworks"; MACH_O_TYPE = mh_execute; MACOSX_DEPLOYMENT_TARGET = 10.9; - MARKETING_VERSION = 4.2; + MARKETING_VERSION = 4.2.0; PRODUCT_BUNDLE_IDENTIFIER = com.atemosc.atemOSC; PRODUCT_NAME = atemOSC; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -410,11 +413,12 @@ CLANG_ENABLE_OBJC_WEAK = YES; CODE_SIGN_ENTITLEMENTS = AtemOSC/atemOSC.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; + "CODE_SIGN_IDENTITY[sdk=macosx*]" = "-"; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; CURRENT_PROJECT_VERSION = 1; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DEVELOPMENT_TEAM = LRNWZB2D4D; + DEVELOPMENT_TEAM = 97DY652VJL; ENABLE_HARDENED_RUNTIME = YES; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", @@ -429,7 +433,7 @@ LD_RUNPATH_SEARCH_PATHS = "@loader_path/../Frameworks @executable_path/../Frameworks"; MACH_O_TYPE = mh_execute; MACOSX_DEPLOYMENT_TARGET = 10.9; - MARKETING_VERSION = 4.2; + MARKETING_VERSION = 4.2.0; PRODUCT_BUNDLE_IDENTIFIER = com.atemosc.atemOSC; PRODUCT_NAME = atemOSC; PROVISIONING_PROFILE_SPECIFIER = ""; diff --git a/generate-release.sh b/generate-release.sh index 99129f6..0fce788 100755 --- a/generate-release.sh +++ b/generate-release.sh @@ -17,6 +17,14 @@ RED_COLOR="\033[0;31m" GREY_COLOR="\033[0;37m" NO_COLOR="\033[0m" +# +# Check arguments +# +if [[ -z $1 ]] ; then + echo -e "Pass in the path to the notarized atemOSC.app file as the first argument" + exit 1 +fi + # # Check if Github auth token exists # @@ -112,12 +120,6 @@ if [[ $? != 0 ]] ; then exit 1 fi -# Create tag if needed -if [ $(git tag -l "v$VERSION" | wc -l | xargs) -eq 0 ]; then - git tag -a "v$VERSION" -m "v$VERSION" - git push --tags -fi - # # Creating directory to work in # @@ -125,10 +127,6 @@ rm -rf temp_output mkdir -p temp_output cd temp_output -if [[ -z $1 ]] ; then - echo -e "Pass in the path to the notarized atemOSC.app file as the first argument" - exit 1 -fi cp -R "$1" . # @@ -146,6 +144,14 @@ FILENAME=$(find atemOSC_*.dmg) NEXT_RELEASE=$(echo $FILENAME | sed -E 's/atemOSC_(.*).dmg/\1/') echo -e "Generated: ${GREY_COLOR}${FILENAME}${NO_COLOR}" +# +# Create tag if needed +# +if [ $(git tag -l "v$NEXT_RELEASE" | wc -l | xargs) -eq 0 ]; then + git tag -a "v$NEXT_RELEASE" -m "v$NEXT_RELEASE" + git push --tags +fi + # # Notarize installer #