diff --git a/CMakeLists.txt b/CMakeLists.txt
index 09a9376..4c5ea40 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -304,19 +304,22 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang
 endif()
 
 if(APPLE)
-    set(MAC_BUNDLE_PATH "${CMAKE_INSTALL_PREFIX}/QMPlay2.app")
+    set(MAC_BUNDLE_PATH "${BUNDLE_INSTALL_DIR}/QMPlay2.app")
 
     # set paths to Bundle
     set(CMAKE_INSTALL_DATAROOTDIR "${MAC_BUNDLE_PATH}/Contents/share")
     set(CMAKE_INSTALL_LIBDIR      "${MAC_BUNDLE_PATH}/Contents/MacOS")
+    if(NOT APPLE_STANDALONE_BUNDLE)
+        include(GNUInstallDirs)
+    endif()
 elseif(NOT WIN32)
     include(GNUInstallDirs)
 endif()
 
-if(NOT APPLE)
+# if(NOT APPLE)
     set(INSTALL_PATH_ICONS "${CMAKE_INSTALL_DATAROOTDIR}/icons")
     set(INSTALL_PATH_MIME "${CMAKE_INSTALL_DATAROOTDIR}/mime")
-endif()
+# endif()
 
 if(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" AND CMAKE_INSTALL_PREFIX STREQUAL "/usr/local")
     set(INSTALL_PATH_MAN "man") # exception for FreeBSD
@@ -350,7 +353,7 @@ else()
     install(FILES AUTHORS ChangeLog LICENSE TODO README.md DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/qmplay2")
 endif()
 
-if(NOT APPLE AND NOT WIN32)
+# if(NOT APPLE AND NOT WIN32)
     # uninstall target
     configure_file(
         "${CMAKE_CURRENT_SOURCE_DIR}/src/cmake/Uninstall.cmake.in"
@@ -359,7 +362,7 @@ if(NOT APPLE AND NOT WIN32)
 
     add_custom_target(uninstall
         COMMAND ${CMAKE_COMMAND} -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake")
-endif()
+# endif()
 
 # Detect QtSvg and show warning if it doesn't exist
 if(NOT SVG_MODULE_FOUND)
diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt
index 5853dc9..9b0ba01 100644
--- a/src/gui/CMakeLists.txt
+++ b/src/gui/CMakeLists.txt
@@ -213,39 +213,45 @@ endif()
 if(WIN32)
     install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/)
 elseif(APPLE)
-    install(TARGETS ${PROJECT_NAME} BUNDLE DESTINATION ${CMAKE_INSTALL_PREFIX})
+    install(TARGETS ${PROJECT_NAME} BUNDLE DESTINATION ${BUNDLE_INSTALL_DIR})
 
     set(QT_LIBS_DIR "${Qt5Widgets_DIR}/../..")
     set(QT_PLUGINS_DIR "${QT_LIBS_DIR}/../plugins")
-    install(FILES
-        "${QT_PLUGINS_DIR}/platforms/libqcocoa.dylib"
-        DESTINATION "${MAC_BUNDLE_PATH}/Contents/plugins/platforms")
-    install(FILES
-        "${QT_PLUGINS_DIR}/iconengines/libqsvgicon.dylib"
-        DESTINATION "${MAC_BUNDLE_PATH}/Contents/plugins/iconengines")
-    install(DIRECTORY
-        "${QT_PLUGINS_DIR}/imageformats"
-        DESTINATION "${MAC_BUNDLE_PATH}/Contents/plugins"
-        PATTERN "*_debug.dylib" EXCLUDE
-        PATTERN "*.dSYM" EXCLUDE)
-    install(DIRECTORY
-        "${QT_LIBS_DIR}/../translations"
-        DESTINATION "${MAC_BUNDLE_PATH}/Contents"
-        FILES_MATCHING
-        PATTERN "qtbase_*.qm")
-    install(CODE "
-        include(BundleUtilities)
-        set(BU_CHMOD_BUNDLE_ITEMS ON)
-        list(APPEND DIRS /usr/local/lib ${QT_LIBS_DIR})
-        file(GLOB_RECURSE QMPLAY2_MODULES_AND_QT_PLUGINS
-            \"${MAC_BUNDLE_PATH}/Contents/MacOS/modules/*\"
-            \"${MAC_BUNDLE_PATH}/Contents/plugins/*.dylib\")
-        file(WRITE \"${MAC_BUNDLE_PATH}/Contents/Resources/qt.conf\")
-        fixup_bundle(${MAC_BUNDLE_PATH} \"\${QMPLAY2_MODULES_AND_QT_PLUGINS}\" \"\${DIRS}\")
-    ")
+    if(APPLE_STANDALONE_BUNDLE)
+        install(FILES
+            "${QT_PLUGINS_DIR}/platforms/libqcocoa.dylib"
+            DESTINATION "${MAC_BUNDLE_PATH}/Contents/plugins/platforms")
+        install(FILES
+            "${QT_PLUGINS_DIR}/iconengines/libqsvgicon.dylib"
+            DESTINATION "${MAC_BUNDLE_PATH}/Contents/plugins/iconengines")
+        install(DIRECTORY
+            "${QT_PLUGINS_DIR}/imageformats"
+            DESTINATION "${MAC_BUNDLE_PATH}/Contents/plugins"
+            PATTERN "*_debug.dylib" EXCLUDE
+            PATTERN "*.dSYM" EXCLUDE)
+        install(DIRECTORY
+            "${QT_LIBS_DIR}/../translations"
+            DESTINATION "${MAC_BUNDLE_PATH}/Contents"
+            FILES_MATCHING
+            PATTERN "qtbase_*.qm")
+        install(CODE "
+            include(BundleUtilities)
+            set(BU_CHMOD_BUNDLE_ITEMS ON)
+            list(APPEND DIRS /usr/local/lib ${QT_LIBS_DIR})
+            file(GLOB_RECURSE QMPLAY2_MODULES_AND_QT_PLUGINS
+                \"${MAC_BUNDLE_PATH}/Contents/MacOS/modules/*\"
+                \"${MAC_BUNDLE_PATH}/Contents/plugins/*.dylib\")
+            file(WRITE \"${MAC_BUNDLE_PATH}/Contents/Resources/qt.conf\")
+            fixup_bundle(${MAC_BUNDLE_PATH} \"\${QMPLAY2_MODULES_AND_QT_PLUGINS}\" \"\${DIRS}\")
+        ")
+    endif()
 else()
     # executable
-    install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
+    if(APPLE)
+        install(TARGETS ${PROJECT_NAME} BUNDLE DESTINATION ${BUNDLE_INSTALL_DIR})
+    else()
+        install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
+    endif()
 
     # desktop files
     file(GLOB DESKTOP_FILES Unix/QMPlay2*.desktop)
diff --git a/src/gui/MainWidget.cpp b/src/gui/MainWidget.cpp
index b591041..75d9cf3 100644
--- a/src/gui/MainWidget.cpp
+++ b/src/gui/MainWidget.cpp
@@ -94,7 +94,7 @@ public:
 };
 #endif
 
-#ifndef Q_OS_MAC
+// #ifndef Q_OS_MAC
 static void copyMenu(QMenu *dest, QMenu *src, QMenu *dontCopy = nullptr)
 {
 	QMenu *newMenu = new QMenu(src->title(), dest);
@@ -110,7 +110,7 @@ static void copyMenu(QMenu *dest, QMenu *src, QMenu *dontCopy = nullptr)
 	}
 	dest->addMenu(newMenu);
 }
-#endif
+// #endif
 
 /* MainWidget */
 MainWidget::MainWidget(QPair<QStringList, QStringList> &arguments)
@@ -164,7 +164,7 @@ MainWidget::MainWidget(QPair<QStringList, QStringList> &arguments)
 
 	QMPlay2GUI.menuBar = new MenuBar;
 
-#if !defined Q_OS_MAC && !defined Q_OS_ANDROID
+#if /*!defined Q_OS_MAC &&*/ !defined Q_OS_ANDROID
 	tray = new QSystemTrayIcon(this);
 	tray->setIcon(QMPlay2Core.getIconFromTheme("QMPlay2-panel", QMPlay2Core.getQMPlay2Icon()));
 	tray->setVisible(settings.getBool("TrayVisible", true));
@@ -328,7 +328,7 @@ MainWidget::MainWidget(QPair<QStringList, QStringList> &arguments)
 	if (settings.getBool("MainWidget/TabPositionNorth"))
 		setTabPosition(Qt::AllDockWidgetAreas, QTabWidget::North);
 
-#if !defined Q_OS_MAC && !defined Q_OS_ANDROID
+#if /*!defined Q_OS_MAC &&*/ !defined Q_OS_ANDROID
 	const bool menuHidden = settings.getBool("MainWidget/MenuHidden", false);
 	menuBar->setVisible(!menuHidden);
 	hideMenuAct = new QAction(tr("&Hide menu bar"), menuBar);
@@ -367,7 +367,7 @@ MainWidget::MainWidget(QPair<QStringList, QStringList> &arguments)
 		QMPlay2GUI.videoAdjustment->restoreValues();
 
 	fullScreenDockWidgetState = settings.getByteArray("MainWidget/FullScreenDockWidgetState");
-#if defined Q_OS_MAC || defined Q_OS_ANDROID
+#if /*defined Q_OS_MAC ||*/ defined Q_OS_ANDROID
 	show();
 #else
 	setVisible(settings.getBool("MainWidget/isVisible", true) ? true : !isTrayVisible());
@@ -848,7 +848,7 @@ void MainWidget::createMenuBar()
 	setMenuBar(menuBar);
 
 	QMenu *secondMenu = new QMenu(this);
-#ifndef Q_OS_MAC
+// #ifndef Q_OS_MAC
 	copyMenu(secondMenu, menuBar->window);
 	secondMenu->addMenu(menuBar->widgets);
 	copyMenu(secondMenu, menuBar->playlist, menuBar->playlist->extensions);
@@ -858,32 +858,32 @@ void MainWidget::createMenuBar()
 	copyMenu(secondMenu, menuBar->help);
 	if (tray)
 		tray->setContextMenu(secondMenu);
-#else //On OS X add only the most important menu actions to dock menu
-	secondMenu->addAction(menuBar->player->togglePlay);
-	secondMenu->addAction(menuBar->player->stop);
-	secondMenu->addAction(menuBar->player->next);
-	secondMenu->addAction(menuBar->player->prev);
-	secondMenu->addSeparator();
-	secondMenu->addAction(menuBar->player->toggleMute);
-	secondMenu->addSeparator();
-	// Copy action, because PreferencesRole doesn't show in dock menu.
-	QAction *settings = new QAction(menuBar->options->settings->icon(), menuBar->options->settings->text(), menuBar->options->settings->parent());
-	connect(settings, &QAction::triggered, menuBar->options->settings, &QAction::trigger);
-	secondMenu->addAction(settings);
-
-	QAction *newInstanceAct = new QAction(tr("New window"), secondMenu);
-	connect(newInstanceAct, &QAction::triggered, [] {
-		QProcess::startDetached(QCoreApplication::applicationFilePath(), {"-noplay"}, QCoreApplication::applicationDirPath());
-	});
-	secondMenu->addSeparator();
-	secondMenu->addAction(newInstanceAct);
-
-	qt_mac_set_dock_menu(secondMenu);
-#endif
+// #else //On OS X add only the most important menu actions to dock menu
+// 	secondMenu->addAction(menuBar->player->togglePlay);
+// 	secondMenu->addAction(menuBar->player->stop);
+// 	secondMenu->addAction(menuBar->player->next);
+// 	secondMenu->addAction(menuBar->player->prev);
+// 	secondMenu->addSeparator();
+// 	secondMenu->addAction(menuBar->player->toggleMute);
+// 	secondMenu->addSeparator();
+// 	// Copy action, because PreferencesRole doesn't show in dock menu.
+// 	QAction *settings = new QAction(menuBar->options->settings->icon(), menuBar->options->settings->text(), menuBar->options->settings->parent());
+// 	connect(settings, &QAction::triggered, menuBar->options->settings, &QAction::trigger);
+// 	secondMenu->addAction(settings);
+// 
+// 	QAction *newInstanceAct = new QAction(tr("New window"), secondMenu);
+// 	connect(newInstanceAct, &QAction::triggered, [] {
+// 		QProcess::startDetached(QCoreApplication::applicationFilePath(), {"-noplay"}, QCoreApplication::applicationDirPath());
+// 	});
+// 	secondMenu->addSeparator();
+// 	secondMenu->addAction(newInstanceAct);
+// 
+// 	qt_mac_set_dock_menu(secondMenu);
+// #endif
 }
 void MainWidget::trayIconClicked(QSystemTrayIcon::ActivationReason reason)
 {
-#if !defined Q_OS_MAC && !defined Q_OS_ANDROID
+#if /*!defined Q_OS_MAC &&*/ !defined Q_OS_ANDROID
 	switch (reason)
 	{
 		case QSystemTrayIcon::Trigger:
@@ -908,7 +908,7 @@ void MainWidget::toggleCompactView()
 
 		hideAllExtensions();
 
-#if !defined Q_OS_MAC && !defined Q_OS_ANDROID
+#if /*!defined Q_OS_MAC &&*/ !defined Q_OS_ANDROID
 		menuBar->hide();
 #endif
 		mainTB->hide();
@@ -931,7 +931,7 @@ void MainWidget::toggleCompactView()
 
 		videoDock->fullScreen(false);
 
-#if !defined Q_OS_MAC && !defined Q_OS_ANDROID
+#if /*!defined Q_OS_MAC &&*/ !defined Q_OS_ANDROID
 		menuBar->setVisible(!hideMenuAct->isChecked());
 #endif
 
@@ -968,7 +968,7 @@ void MainWidget::toggleFullScreen()
 		dockWidgetState = saveState();
 #endif // Q_OS_ANDROID
 
-#if !defined Q_OS_MAC && !defined Q_OS_ANDROID
+#if /*!defined Q_OS_MAC &&*/ !defined Q_OS_ANDROID
 		menuBar->hide();
 #endif
 		statusBar->hide();
@@ -997,9 +997,9 @@ void MainWidget::toggleFullScreen()
 		videoDock->fullScreen(true);
 		videoDock->show();
 
-#ifdef Q_OS_MAC
+// #ifdef Q_OS_MAC
 		menuBar->window->toggleVisibility->setEnabled(false);
-#endif
+// #endif
 		menuBar->window->toggleCompactView->setEnabled(false);
 		menuBar->window->toggleFullScreen->setShortcuts(QList<QKeySequence>() << menuBar->window->toggleFullScreen->shortcut() << QKeySequence("ESC"));
 		fullScreen = true;
@@ -1011,9 +1011,9 @@ void MainWidget::toggleFullScreen()
 	}
 	else
 	{
-#ifdef Q_OS_MAC
+// #ifdef Q_OS_MAC
 		menuBar->window->toggleVisibility->setEnabled(true);
-#endif
+// #endif
 		menuBar->window->toggleCompactView->setEnabled(true);
 		menuBar->window->toggleFullScreen->setShortcuts(QList<QKeySequence>() << menuBar->window->toggleFullScreen->shortcut());
 
@@ -1046,9 +1046,9 @@ void MainWidget::toggleFullScreen()
 			if (QDockWidget *dw = QMPlay2Ext->getDockWidget())
 				dw->setFeatures(QDockWidget::AllDockWidgetFeatures);
 
-#if !defined Q_OS_MAC && !defined Q_OS_ANDROID
+// #if !defined Q_OS_MAC && !defined Q_OS_ANDROID
 		menuBar->setVisible(!hideMenuAct->isChecked());
-#endif
+// #endif
 		statusBar->show();
 
 		mainTB->setMovable(tb_movable);
@@ -1239,7 +1239,7 @@ void MainWidget::about()
 	}
 }
 
-#if !defined Q_OS_MAC && !defined Q_OS_ANDROID
+// #if !defined Q_OS_MAC && !defined Q_OS_ANDROID
 void MainWidget::hideMenu(bool h)
 {
 	if (fullScreen || isCompactView)
@@ -1250,7 +1250,7 @@ void MainWidget::hideMenu(bool h)
 		QMPlay2Core.getSettings().set("MainWidget/MenuHidden", h);
 	}
 }
-#endif
+// #endif
 void MainWidget::lockWidgets(bool l)
 {
 	if (fullScreen || isCompactView)
@@ -1321,11 +1321,11 @@ QMenu *MainWidget::createPopupMenu()
 	QMenu *popupMenu = QMainWindow::createPopupMenu();
 	if (!fullScreen && !isCompactView)
 	{
-#if !defined Q_OS_MAC && !defined Q_OS_ANDROID
+// #if !defined Q_OS_MAC && !defined Q_OS_ANDROID
 		popupMenu->insertAction(popupMenu->actions().value(0), hideMenuAct);
 		popupMenu->insertSeparator(popupMenu->actions().value(1));
 		popupMenu->addSeparator();
-#endif
+// #endif
 		popupMenu->addAction(lockWidgetsAct);
 	}
 	for (QAction *act : popupMenu->actions())
@@ -1485,9 +1485,9 @@ void MainWidget::closeEvent(QCloseEvent *e)
 	else
 		settings.set("MainWidget/DockWidgetState", dockWidgetState);
 	settings.set("MainWidget/FullScreenDockWidgetState", fullScreenDockWidgetState);
-#ifndef Q_OS_MAC
+// #ifndef Q_OS_MAC
 	settings.set("MainWidget/isVisible", isVisible());
-#endif
+// #endif
 	if (tray)
 		settings.set("TrayVisible", tray->isVisible());
 	settings.set("VolumeL", volW->volumeL());
diff --git a/src/gui/MainWidget.hpp b/src/gui/MainWidget.hpp
index c0ab81e..3348418 100644
--- a/src/gui/MainWidget.hpp
+++ b/src/gui/MainWidget.hpp
@@ -101,11 +101,11 @@ private slots:
 
 	void about();
 
-#if !defined Q_OS_MAC && !defined Q_OS_ANDROID
+// #if !defined Q_OS_MAC && !defined Q_OS_ANDROID
 	void hideMenu(bool);
-#else
-	void hideMenu(bool) {} //To avoid incorrect CPP file generated by MOC on Android
-#endif
+// #else
+// 	void hideMenu(bool) {} //To avoid incorrect CPP file generated by MOC on Android
+// #endif
 	void lockWidgets(bool);
 
 	void hideDocksSlot();
@@ -170,9 +170,9 @@ private:
 	AboutWidget *aboutW;
 	bool isCompactView, wasShow, fullScreen, seekSFocus;
 
-#if !defined Q_OS_MAC && !defined Q_OS_ANDROID
+// #if !defined Q_OS_MAC && !defined Q_OS_ANDROID
 	QAction *hideMenuAct;
-#endif
+// #endif
 	QAction *lockWidgetsAct;
 
 	Updater updater;
diff --git a/src/gui/SettingsWidget.cpp b/src/gui/SettingsWidget.cpp
index 6a3e351..fbb7f90 100644
--- a/src/gui/SettingsWidget.cpp
+++ b/src/gui/SettingsWidget.cpp
@@ -63,7 +63,7 @@
 #include "ui_SettingsPlayback.h"
 #include "ui_SettingsPlaybackModulesList.h"
 
-#if !defined(Q_OS_WIN) && !defined(Q_OS_MAC) && !defined(Q_OS_ANDROID)
+#if !defined(Q_OS_WIN) /*&& !defined(Q_OS_MAC)*/ && !defined(Q_OS_ANDROID)
 	#define ICONS_FROM_THEME
 #endif
 
diff --git a/src/qmplay2/CMakeLists.txt b/src/qmplay2/CMakeLists.txt
index 9d7c6e1..65bd006 100644
--- a/src/qmplay2/CMakeLists.txt
+++ b/src/qmplay2/CMakeLists.txt
@@ -225,7 +225,7 @@ if(WIN32)
     install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX})
 else()
     install(TARGETS ${PROJECT_NAME} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
-    if(NOT APPLE)
+    if(NOT APPLE_STANDALONE_BUNDLE)
         install(FILES ${QMPLAY2_HDR} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/QMPlay2")
     endif()
 
