Skip to content

Commit

Permalink
Update OS X build
Browse files Browse the repository at this point in the history
  • Loading branch information
antonsviridenko committed May 22, 2021
1 parent 4ca8b0a commit 1345dbc
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 47 deletions.
20 changes: 20 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -470,3 +470,23 @@ if TARGET_WINDOWS
$(WINDRES) -i $< -o $@

endif

if TARGET_DARWIN
deploy: bluecherry-client
$(MKDIR_P) BluecherryClient.app/Contents/Resources/translations
$(MKDIR_P) BluecherryClient.app/Contents/MacOS
$(MKDIR_P) BluecherryClient.app/Contents/Frameworks
cp mac/Info.plist BluecherryClient.app/Contents/
cp $(abs_top_srcdir)/res/bluecherry.icns BluecherryClient.app/Contents/Resources/
cp translations/*.qm BluecherryClient.app/Contents/Resources/translations/
cp bluecherry-client BluecherryClient.app/Contents/MacOS/
cp $(prefix)/lib/libssl.1.1.dylib BluecherryClient.app/Contents/Frameworks/
cp $(prefix)/lib/libcrypto.1.1.dylib BluecherryClient.app/Contents/Frameworks/
macdeployqt BluecherryClient.app
macdeployqt BluecherryClient.app
mac/replacepath.py --old @rpath --new @executable_path/../Frameworks/ --file BluecherryClient.app/Contents/MacOS/bluecherry-client
hdiutil create -srcfolder BluecherryClient.app BluecherryClient.dmg
hdiutil internet-enable -yes BluecherryClient.dmg
mv BluecherryClient.dmg BluecherryClient_$(VERSION).dmg
endif

2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,6 @@ VERSION=$PACKAGE_VERSION
AC_SUBST([VERSION])
AM_CONDITIONAL([TARGET_WINDOWS], [test x$TARGET_OS = xwindows])
AM_CONDITIONAL([TARGET_DARWIN], [test x$TARGET_OS = xdarwin])
AC_CONFIG_FILES([Makefile win/installer32.nsi win/installer64.nsi])
AC_CONFIG_FILES([Makefile win/installer32.nsi win/installer64.nsi mac/Info.plist])
AC_OUTPUT

34 changes: 34 additions & 0 deletions mac/Info.plist.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>bluecherry-client</string>
<key>CFBundleGetInfoString</key>
<string>Bluecherry Client</string>
<key>CFBundleIconFile</key>
<string>bluecherry.icns</string>
<key>CFBundleIdentifier</key>
<string>Bluecherry Client</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleLongVersionString</key>
<string>@VERSION@</string>
<key>CFBundleName</key>
<string>Bluecherry Client</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>@VERSION@</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>@VERSION@</string>
<key>CSResourcesFileMapped</key>
<true/>
<key>NSHumanReadableCopyright</key>
<string>Copyright 2010-2021 Bluecherry</string>
</dict>
</plist>
6 changes: 0 additions & 6 deletions src/core/BluecherryApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -448,14 +448,8 @@ void BluecherryApp::releaseLive()
}
}*/

#ifdef Q_OS_MAC
void resetSystemActivity(); // PlatformOSX.mm
#endif

void BluecherryApp::resetSystemActivity()
{
#ifdef Q_OS_MAC
::resetSystemActivity();
#endif
}

36 changes: 0 additions & 36 deletions src/ui/StatusBandwidthWidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@

#include <QtGlobal>

#ifndef Q_OS_MAC
#include <QToolButton>

class StatusBandwidthWidget : public QToolButton
Expand All @@ -35,40 +34,5 @@ private slots:
void rateUpdated(unsigned currentRate);
};

#else /* Q_OS_MAC */

#include <QMacCocoaViewContainer>

#ifndef Q_FORWARD_DECLARE_OBJC_CLASS
# ifdef __OBJC__
# define Q_FORWARD_DECLARE_OBJC_CLASS(classname) @class classname
# else
# define Q_FORWARD_DECLARE_OBJC_CLASS(classname) typedef struct objc_object classname
# endif
#endif

Q_FORWARD_DECLARE_OBJC_CLASS(NSPopUpButton);

class QMenu;
class QAction;

class StatusBandwidthWidget : public QMacCocoaViewContainer
{
Q_OBJECT

public:
explicit StatusBandwidthWidget(QWidget *parent);

private slots:
void bandwidthModeChanged(int value);
void rateUpdated(unsigned currentRate);

private:
NSPopUpButton *m_button;
QMenu *m_menu;
QAction *m_titleAction;
};

#endif

#endif // STATUSBANDWIDTHWIDGET_H
4 changes: 0 additions & 4 deletions src/ui/liveview/LiveViewWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,6 @@
#include <QMimeData>


#ifdef Q_OS_MAC
#include <QMacStyle>
#endif

bool LiveViewWindow::m_isSessionRestoring = false;
QWidget *LiveViewWindow::m_topWidget = NULL;

Expand Down

0 comments on commit 1345dbc

Please sign in to comment.