From 34afc62be27186b7b61e7f95756a6528b4a546ec Mon Sep 17 00:00:00 2001
From: fowlerdm <fowlerdm@gmail.com>
Date: Wed, 10 Jul 2024 04:17:36 -0600
Subject: panel_edit_wearable cleanup

remove more unneeded unneeded background panels
---
 indra/newview/skins/default/xui/en/panel_edit_eyes.xml     | 10 +++++-----
 indra/newview/skins/default/xui/en/panel_edit_wearable.xml |  4 ++--
 2 files changed, 7 insertions(+), 7 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/skins/default/xui/en/panel_edit_eyes.xml b/indra/newview/skins/default/xui/en/panel_edit_eyes.xml
index f1b2653340..89fa69bcef 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_eyes.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_eyes.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8" standalone="yes"?>
  <panel
-     background_visible="true"
+     background_visible="false"
 	 follows="all"
 	 height="400"
 	 layout="topleft"
@@ -12,8 +12,8 @@
 	  border="false"
       bg_alpha_color="DkGray2"
       bg_opaque_color="DkGray2"
-      background_visible="true"
-      background_opaque="true"
+      background_visible="false"
+      background_opaque="false"
 	  follows="top|left|right"
 	  height="90" 
 	  left="10" 
@@ -41,8 +41,8 @@
          border="false"
          bg_alpha_color="DkGray2"
          bg_opaque_color="DkGray2"
-         background_visible="true"
-         background_opaque="true"
+         background_visible="false"
+         background_opaque="false"
          follows="all"
          height="300"
          layout="topleft"
diff --git a/indra/newview/skins/default/xui/en/panel_edit_wearable.xml b/indra/newview/skins/default/xui/en/panel_edit_wearable.xml
index c18bfa3fad..df67f6ad46 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_wearable.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_wearable.xml
@@ -178,8 +178,8 @@
      use_ellipses="true"
      width="274" />
     <panel
-     background_opaque="true"
-     background_visible="true"
+     background_opaque="false"
+     background_visible="false"
      bg_alpha_color="DkGray2"
      bg_opaque_color="DkGray2"
      border="false"
-- 
cgit v1.2.3


From 05c26d2e074f8210f205a674d7fb374e5f96e176 Mon Sep 17 00:00:00 2001
From: fowlerdm <fowlerdm@gmail.com>
Date: Wed, 10 Jul 2024 05:09:59 -0600
Subject: more panel_edit cleanup

Remove unneeded backgrounds
---
 indra/newview/skins/default/xui/en/panel_edit_alpha.xml      |  6 +++---
 indra/newview/skins/default/xui/en/panel_edit_gloves.xml     |  6 +++---
 indra/newview/skins/default/xui/en/panel_edit_hair.xml       | 10 +++++-----
 indra/newview/skins/default/xui/en/panel_edit_jacket.xml     |  6 +++---
 indra/newview/skins/default/xui/en/panel_edit_pants.xml      |  6 +++---
 indra/newview/skins/default/xui/en/panel_edit_physics.xml    |  6 +++---
 indra/newview/skins/default/xui/en/panel_edit_shirt.xml      |  6 +++---
 indra/newview/skins/default/xui/en/panel_edit_shoes.xml      |  6 +++---
 indra/newview/skins/default/xui/en/panel_edit_skin.xml       |  6 +++---
 indra/newview/skins/default/xui/en/panel_edit_skirt.xml      |  6 +++---
 indra/newview/skins/default/xui/en/panel_edit_socks.xml      |  6 +++---
 indra/newview/skins/default/xui/en/panel_edit_tattoo.xml     |  6 +++---
 indra/newview/skins/default/xui/en/panel_edit_underpants.xml |  6 +++---
 indra/newview/skins/default/xui/en/panel_edit_undershirt.xml |  6 +++---
 indra/newview/skins/default/xui/en/panel_edit_universal.xml  |  6 +++---
 15 files changed, 47 insertions(+), 47 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/skins/default/xui/en/panel_edit_alpha.xml b/indra/newview/skins/default/xui/en/panel_edit_alpha.xml
index 30fee7361f..7bce8d9bca 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_alpha.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_alpha.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8" standalone="yes"?>
  <panel
-     background_visible="true"
+     background_visible="false"
 	 follows="all"
 	 height="400"
 	 layout="topleft"
@@ -23,8 +23,8 @@
       border="false"
       bg_alpha_color="DkGray2"
       bg_opaque_color="DkGray2"
-      background_visible="true"
-      background_opaque="true"
+      background_visible="false"
+      background_opaque="false"
       follows="top|left|right"
       height="400" 
       left="0" 
diff --git a/indra/newview/skins/default/xui/en/panel_edit_gloves.xml b/indra/newview/skins/default/xui/en/panel_edit_gloves.xml
index 6ae21e1273..14b20c7ba1 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_gloves.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_gloves.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8" standalone="yes"?>
  <panel
-     background_visible="true"
+     background_visible="false"
 	 follows="all"
 	 height="400"
 	 layout="topleft"
@@ -12,8 +12,8 @@
 	  border="false"
       bg_alpha_color="DkGray2"
       bg_opaque_color="DkGray2"
-      background_visible="true"
-      background_opaque="true"
+      background_visible="false"
+      background_opaque="false"
 	  follows="top|left|right"
 	  height="90" 
 	  left="10" 
diff --git a/indra/newview/skins/default/xui/en/panel_edit_hair.xml b/indra/newview/skins/default/xui/en/panel_edit_hair.xml
index 25f7d8a572..9eec1120e3 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_hair.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_hair.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8" standalone="yes"?>
  <panel
-     background_visible="true"
+     background_visible="false"
 	 follows="all"
 	 height="400"
 	 layout="topleft"
@@ -12,8 +12,8 @@
 	  border="false"
       bg_alpha_color="DkGray2"
       bg_opaque_color="DkGray2"
-      background_visible="true"
-      background_opaque="true"
+      background_visible="false"
+      background_opaque="false"
 	  follows="top|left|right"
 	  height="90" 
 	  left="10" 
@@ -41,8 +41,8 @@
          border="false"
          bg_alpha_color="DkGray2"
          bg_opaque_color="DkGray2"
-         background_visible="true"
-         background_opaque="true"
+         background_visible="false"
+         background_opaque="false"
          follows="all"
          height="300"
          layout="topleft"
diff --git a/indra/newview/skins/default/xui/en/panel_edit_jacket.xml b/indra/newview/skins/default/xui/en/panel_edit_jacket.xml
index 62ee69b43c..c76a04ccf0 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_jacket.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_jacket.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8" standalone="yes"?>
  <panel
-     background_visible="true"
+     background_visible="false"
 	 follows="all"
 	 height="400"
 	 layout="topleft"
@@ -12,8 +12,8 @@
 	  border="false"
       bg_alpha_color="DkGray2"
       bg_opaque_color="DkGray2"
-      background_visible="true"
-      background_opaque="true"
+      background_visible="false"
+      background_opaque="false"
 	  follows="top|left|right"
 	  height="90" 
 	  left="10" 
diff --git a/indra/newview/skins/default/xui/en/panel_edit_pants.xml b/indra/newview/skins/default/xui/en/panel_edit_pants.xml
index d2ba71f905..2f4d47f334 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_pants.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_pants.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8" standalone="yes"?>
  <panel
-     background_visible="true"
+     background_visible="false"
 	 follows="all"
 	 height="400"
 	 layout="topleft"
@@ -12,8 +12,8 @@
 	  border="false"
       bg_alpha_color="DkGray2"
       bg_opaque_color="DkGray2"
-      background_visible="true"
-      background_opaque="true"
+      background_visible="false"
+      background_opaque="false"
 	  follows="top|left|right"
 	  height="90" 
 	  left="10" 
diff --git a/indra/newview/skins/default/xui/en/panel_edit_physics.xml b/indra/newview/skins/default/xui/en/panel_edit_physics.xml
index 837fb83b64..235025b1ef 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_physics.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_physics.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8" standalone="yes"?>
  <panel
-     background_visible="true"
+     background_visible="false"
 	 follows="all"
 	 height="400"
 	 layout="topleft"
@@ -12,8 +12,8 @@
          border="false"
          bg_alpha_color="DkGray2"
          bg_opaque_color="DkGray2"
-         background_visible="true"
-         background_opaque="true"
+         background_visible="false"
+         background_opaque="false"
          follows="all"
          height="388"
          label=""
diff --git a/indra/newview/skins/default/xui/en/panel_edit_shirt.xml b/indra/newview/skins/default/xui/en/panel_edit_shirt.xml
index 059103e233..faca0ab2e7 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_shirt.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_shirt.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8" standalone="yes"?>
  <panel
-     background_visible="true"
+     background_visible="false"
 	 follows="all"
 	 height="400"
 	 layout="topleft"
@@ -12,8 +12,8 @@
 	  border="false"
       bg_alpha_color="DkGray2"
       bg_opaque_color="DkGray2"
-      background_visible="true"
-      background_opaque="true"
+      background_visible="false"
+      background_opaque="false"
 	  follows="top|left|right"
 	  height="90" 
 	  left="10" 
diff --git a/indra/newview/skins/default/xui/en/panel_edit_shoes.xml b/indra/newview/skins/default/xui/en/panel_edit_shoes.xml
index 199b143719..2068f48327 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_shoes.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_shoes.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8" standalone="yes"?>
  <panel
-     background_visible="true"
+     background_visible="false"
 	 follows="all"
 	 height="400"
 	 layout="topleft"
@@ -12,8 +12,8 @@
       border="false"
       bg_alpha_color="DkGray2"
       bg_opaque_color="DkGray2"
-      background_visible="true"
-      background_opaque="true"
+      background_visible="false"
+      background_opaque="false"
       follows="top|left|right"
       height="90" 
       left="10" 
diff --git a/indra/newview/skins/default/xui/en/panel_edit_skin.xml b/indra/newview/skins/default/xui/en/panel_edit_skin.xml
index f3a5791ef8..8e80283bbb 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_skin.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_skin.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8" standalone="yes"?>
  <panel
-     background_visible="true"
+     background_visible="false"
 	 follows="all"
 	 height="400"
 	 layout="topleft"
@@ -12,8 +12,8 @@
 	  border="false"
       bg_alpha_color="DkGray2"
       bg_opaque_color="DkGray2"
-      background_visible="true"
-      background_opaque="true"
+      background_visible="false"
+      background_opaque="false"
 	  follows="top|left|right"
 	  height="90" 
 	  left="10" 
diff --git a/indra/newview/skins/default/xui/en/panel_edit_skirt.xml b/indra/newview/skins/default/xui/en/panel_edit_skirt.xml
index adb7632e0a..ef93c8d8d2 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_skirt.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_skirt.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8" standalone="yes"?>
  <panel
-     background_visible="true"
+     background_visible="false"
 	 follows="all"
 	 height="400"
 	 layout="topleft"
@@ -12,8 +12,8 @@
       border="false"
       bg_alpha_color="DkGray2"
       bg_opaque_color="DkGray2"
-      background_visible="true"
-      background_opaque="true"
+      background_visible="false"
+      background_opaque="false"
       follows="top|left|right"
       height="90" 
       left="10" 
diff --git a/indra/newview/skins/default/xui/en/panel_edit_socks.xml b/indra/newview/skins/default/xui/en/panel_edit_socks.xml
index 1658e5707b..8fb19c34bb 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_socks.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_socks.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8" standalone="yes"?>
  <panel
-     background_visible="true"
+     background_visible="false"
 	 follows="all"
 	 height="400"
 	 layout="topleft"
@@ -12,8 +12,8 @@
 	  border="false"
       bg_alpha_color="DkGray2"
       bg_opaque_color="DkGray2"
-      background_visible="true"
-      background_opaque="true"
+      background_visible="false"
+      background_opaque="false"
 	  follows="top|left|right"
 	  height="90" 
 	  left="10" 
diff --git a/indra/newview/skins/default/xui/en/panel_edit_tattoo.xml b/indra/newview/skins/default/xui/en/panel_edit_tattoo.xml
index b4f09e262f..9cb2157896 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_tattoo.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_tattoo.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
-    background_visible="true"
+    background_visible="false"
   follows="all"
   height="400"
   layout="topleft"
@@ -22,8 +22,8 @@
      border="false"
        bg_alpha_color="DkGray2"
        bg_opaque_color="DkGray2"
-       background_visible="true"
-       background_opaque="true"
+       background_visible="false"
+       background_opaque="false"
      follows="all"
      height="800"
      left="10"
diff --git a/indra/newview/skins/default/xui/en/panel_edit_underpants.xml b/indra/newview/skins/default/xui/en/panel_edit_underpants.xml
index 9ca67ed562..6376787b3c 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_underpants.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_underpants.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8" standalone="yes"?>
  <panel
-     background_visible="true"
+     background_visible="false"
 	 follows="all"
 	 height="400"
 	 layout="topleft"
@@ -12,8 +12,8 @@
       border="false"
       bg_alpha_color="DkGray2"
       bg_opaque_color="DkGray2"
-      background_visible="true"
-      background_opaque="true"
+      background_visible="false"
+      background_opaque="false"
       follows="top|left|right"
       height="90" 
       left="10" 
diff --git a/indra/newview/skins/default/xui/en/panel_edit_undershirt.xml b/indra/newview/skins/default/xui/en/panel_edit_undershirt.xml
index 4a340fe340..88e1d9bc3b 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_undershirt.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_undershirt.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8" standalone="yes"?>
  <panel
-     background_visible="true"
+     background_visible="false"
 	 follows="all"
 	 height="400"
 	 layout="topleft"
@@ -12,8 +12,8 @@
 	  border="false"
       bg_alpha_color="DkGray2"
       bg_opaque_color="DkGray2"
-      background_visible="true"
-      background_opaque="true"
+      background_visible="false"
+      background_opaque="false"
 	  follows="top|left|right"
 	  height="90" 
 	  left="10" 
diff --git a/indra/newview/skins/default/xui/en/panel_edit_universal.xml b/indra/newview/skins/default/xui/en/panel_edit_universal.xml
index a71f6c6c2e..3a84f1733f 100644
--- a/indra/newview/skins/default/xui/en/panel_edit_universal.xml
+++ b/indra/newview/skins/default/xui/en/panel_edit_universal.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <panel
-    background_visible="true"
+    background_visible="false"
   follows="all"
   height="400"
   layout="topleft"
@@ -22,8 +22,8 @@
      border="false"
        bg_alpha_color="DkGray2"
        bg_opaque_color="DkGray2"
-       background_visible="true"
-       background_opaque="true"
+       background_visible="false"
+       background_opaque="false"
      follows="all"
      height="800"
      left="10"
-- 
cgit v1.2.3


From 15db83830b3016993489e55c314bf867eb30a128 Mon Sep 17 00:00:00 2001
From: fowlerdm <fowlerdm@gmail.com>
Date: Wed, 10 Jul 2024 06:16:42 -0600
Subject: toolbars.xml tweak

Modify default layout to hopefully be more tidy and useful
---
 indra/newview/app_settings/toolbars.xml | 15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/app_settings/toolbars.xml b/indra/newview/app_settings/toolbars.xml
index a1c9d6d9ee..2e57a67e7d 100644
--- a/indra/newview/app_settings/toolbars.xml
+++ b/indra/newview/app_settings/toolbars.xml
@@ -4,27 +4,24 @@
     button_display_mode="icons_with_text">
     <command name="chat"/>
     <command name="speak"/>
-    <command name="destinations"/>
     <command name="people"/>
     <command name="profile"/>
-    <command name="map"/>
-    <command name="move"/>
     <command name="view"/>
-    <command name="howto"/>
+    <command name="appearance"/>
+    <command name="inventory"/>
   </bottom_toolbar>
   <left_toolbar
     button_display_mode="icons_only">
-    <command name="avatar"/>
-    <command name="appearance"/>
-    <command name="inventory"/>
     <command name="search"/>
+    <command name="map"/>
     <command name="places"/>
-    <command name="voice"/>
     <command name="minimap"/>
     <command name="snapshot"/>
-    <command name="performance"/>
+    <command name="aboutland"/>
   </left_toolbar>
   <right_toolbar
     button_display_mode="icons_only">
+    <command name="performance"/>
+    <command name="howto"/>
   </right_toolbar>
 </toolbars>
-- 
cgit v1.2.3


From 4390609584487896c58e3a9e79d2a56116336322 Mon Sep 17 00:00:00 2001
From: Erik Kundiman <erik@megapahit.org>
Date: Wed, 10 Jul 2024 21:50:00 +0800
Subject: `cpack -G Bundle` instead of `make install` on Mac

Root project finally renamed to Megapahit, which has a nice effect of
CPack: - Run preinstall target for: Megapahit
CPack: - Install project: Megapahit []
but it's really because CPack Bundle file couldn't be renamed via
CPACK_PACKAGE_NAME like on DEB, RPM, and FREEBSD.
CPack determines its own destination root folder, which is Resources
(I didn't find a way to set it to Contents).
fixup_bundle is now run on the .app deep inside CPack staging folders
so that the dependency copies will be included in the DMG.
---
 indra/CMakeLists.txt                               |  2 +-
 indra/llplugin/slplugin/CMakeLists.txt             |  2 +-
 indra/media_plugins/cef/CMakeLists.txt             |  2 +-
 indra/media_plugins/libvlc/CMakeLists.txt          |  2 +-
 indra/newview/CMakeLists.txt                       | 29 ++++++++-
 indra/newview/FixBundle.cmake.in                   | 68 +++++++++++-----------
 indra/newview/ViewerInstall.cmake                  | 15 +++--
 .../installers/darwin/dmg-cleanup.applescript      | 45 +++++++++-----
 8 files changed, 102 insertions(+), 63 deletions(-)

(limited to 'indra')

diff --git a/indra/CMakeLists.txt b/indra/CMakeLists.txt
index 154d83a640..d37bd7f4b9 100644
--- a/indra/CMakeLists.txt
+++ b/indra/CMakeLists.txt
@@ -12,7 +12,7 @@
 #    "if(${CMAKE_VERSION} VERSION_LESS "3.20.0")" that can also be removed
 cmake_minimum_required(VERSION 3.16.0 FATAL_ERROR)
 
-set(ROOT_PROJECT_NAME "SecondLife" CACHE STRING
+set(ROOT_PROJECT_NAME "Megapahit" CACHE STRING
     "The root project/makefile/solution name. Defaults to SecondLife.")
 project(${ROOT_PROJECT_NAME})
 
diff --git a/indra/llplugin/slplugin/CMakeLists.txt b/indra/llplugin/slplugin/CMakeLists.txt
index 46e63e473c..3ad6d10336 100644
--- a/indra/llplugin/slplugin/CMakeLists.txt
+++ b/indra/llplugin/slplugin/CMakeLists.txt
@@ -67,7 +67,7 @@ endif ()
 
 if (INSTALL)
   if (DARWIN)
-    install(TARGETS ${PROJECT_NAME} DESTINATION Resources)
+    install(TARGETS ${PROJECT_NAME} DESTINATION .)
   else (DARWIN)
     install(TARGETS ${PROJECT_NAME} DESTINATION libexec/${VIEWER_BINARY_NAME})
   endif (DARWIN)
diff --git a/indra/media_plugins/cef/CMakeLists.txt b/indra/media_plugins/cef/CMakeLists.txt
index b739017a9b..87c39f9c34 100644
--- a/indra/media_plugins/cef/CMakeLists.txt
+++ b/indra/media_plugins/cef/CMakeLists.txt
@@ -115,7 +115,7 @@ endif (DARWIN)
 
 if (INSTALL)
     if (DARWIN)
-        set(_LIB Resources/llplugin)
+        set(_LIB llplugin)
     elseif (EXISTS ${CMAKE_SYSROOT}/usr/lib/${ARCH}-linux-gnu)
         set(_LIB lib/${ARCH}-linux-gnu)
     elseif (EXISTS /lib64)
diff --git a/indra/media_plugins/libvlc/CMakeLists.txt b/indra/media_plugins/libvlc/CMakeLists.txt
index 795920ebfc..22eba11cf2 100644
--- a/indra/media_plugins/libvlc/CMakeLists.txt
+++ b/indra/media_plugins/libvlc/CMakeLists.txt
@@ -88,7 +88,7 @@ endif (DARWIN)
 
 if (INSTALL)
     if (DARWIN)
-        set(_LIB Resources/llplugin)
+        set(_LIB llplugin)
     elseif (EXISTS ${CMAKE_SYSROOT}/usr/lib/${ARCH}-linux-gnu)
         set(_LIB lib/${ARCH}-linux-gnu)
     elseif (EXISTS /lib64)
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index f86e2cb2fb..3076724a05 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -2133,7 +2133,7 @@ if (DARWIN)
   set(product "${VIEWER_CHANNEL}")
   set(MACOSX_EXECUTABLE_NAME "${VIEWER_CHANNEL}")
   set(MACOSX_BUNDLE_INFO_STRING "${VIEWER_CHANNEL}")
-  set(MACOSX_BUNDLE_ICON_FILE "secondlife.icns")
+  set(MACOSX_BUNDLE_ICON_FILE "${VIEWER_CHANNEL}.icns")
   set(MACOSX_BUNDLE_GUI_IDENTIFIER "net.megapahit.viewer")
   set(MACOSX_BUNDLE_LONG_VERSION_STRING "${VIEWER_CHANNEL} ${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION}")
   set(MACOSX_BUNDLE_BUNDLE_NAME "Megapahit")
@@ -2169,7 +2169,9 @@ if (DARWIN)
      "${VIEWER_APP_BUNDLE}/Contents/Info.plist"
     )
 
-  if (NOT INSTALL)
+  if (INSTALL)
+    install(PROGRAMS ${VIEWER_APP_EXE} DESTINATION ../MacOS)
+  else (INSTALL)
   add_custom_command(
     TARGET ${VIEWER_BINARY_NAME} POST_BUILD
     COMMAND ${PYTHON_EXECUTABLE}
@@ -2194,7 +2196,7 @@ if (DARWIN)
       ${VIEWER_BINARY_NAME}
       ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
     )
-  endif (NOT INSTALL)
+  endif (INSTALL)
 
   if (ENABLE_MEDIA_PLUGINS)
   add_dependencies(${VIEWER_BINARY_NAME} SLPlugin media_plugin_libvlc media_plugin_cef)
@@ -2209,6 +2211,26 @@ if (DARWIN)
   endif (ENABLE_SIGNING)
 
   if (PACKAGE)
+    if (USESYSTEMLIBS)
+      set(CPACK_DMG_VOLUME_NAME "${product} Installer"
+        CACHE STRING "Disk image volume name.")
+      set(CPACK_DMG_FORMAT UDRW CACHE STRING "Disk image format.")
+      set(CPACK_DMG_DS_STORE
+        ${CMAKE_CURRENT_SOURCE_DIR}/installers/darwin/release-dmg/_DS_Store
+        CACHE STRING "Disk image .DS_Store file.")
+      set(CPACK_DMG_DS_STORE_SETUP_SCRIPT
+        ${CMAKE_CURRENT_SOURCE_DIR}/installers/darwin/dmg-cleanup.applescript
+        CACHE STRING "Disk image AppleScript file.")
+      set(CPACK_DMG_BACKGROUND_IMAGE
+        ${CMAKE_CURRENT_SOURCE_DIR}/installers/darwin/release-dmg/background.jpg
+        CACHE STRING "Disk image background image.")
+      set(CPACK_BUNDLE_NAME ${product} CACHE STRING "Bundle name.")
+      set(CPACK_BUNDLE_PLIST ${VIEWER_APP_BUNDLE}/Contents/Info.plist
+        CACHE STRING "Bundle Property List file.")
+      set(CPACK_BUNDLE_ICON ${CMAKE_CURRENT_SOURCE_DIR}/secondlife.icns
+        CACHE STRING "Bundle icon file.")
+
+    else (USESYSTEMLIBS)
       add_custom_target(llpackage ALL DEPENDS ${VIEWER_BINARY_NAME})
 
       add_custom_command(
@@ -2234,6 +2256,7 @@ if (DARWIN)
         DEPENDS
           ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
       )
+    endif (USESYSTEMLIBS)
   endif (PACKAGE)
 endif (DARWIN)
 
diff --git a/indra/newview/FixBundle.cmake.in b/indra/newview/FixBundle.cmake.in
index b2957cd9b5..81cb0d50fc 100644
--- a/indra/newview/FixBundle.cmake.in
+++ b/indra/newview/FixBundle.cmake.in
@@ -4,158 +4,158 @@ set(dirs
     /opt/local/lib
    )
 
-fixup_bundle(${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app "" "${dirs}")
+fixup_bundle(${CMAKE_CACHEFILE_DIR}/_CPack_Packages/${CMAKE_SYSTEM_NAME}/Bundle/${CPACK_BUNDLE_NAME}-${CPACK_PACKAGE_VERSION}-${CMAKE_SYSTEM_NAME}/${CPACK_BUNDLE_NAME}.app/Contents/MacOS/${CPACK_BUNDLE_NAME} "" "${dirs}")
 
 file(CREATE_LINK
     "../../../../Frameworks/libnghttp2.14.dylib"
-    "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libnghttp2.14.dylib"
+    "${CMAKE_CACHEFILE_DIR}/_CPack_Packages/${CMAKE_SYSTEM_NAME}/Bundle/${CPACK_BUNDLE_NAME}-${CPACK_PACKAGE_VERSION}-${CMAKE_SYSTEM_NAME}/${CPACK_BUNDLE_NAME}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libnghttp2.14.dylib"
     SYMBOLIC
     )
 file(CREATE_LINK
     "../../../../Frameworks/libxmlrpc-epi.0.dylib"
-    "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libxmlrpc-epi.0.dylib"
+    "${CMAKE_CACHEFILE_DIR}/_CPack_Packages/${CMAKE_SYSTEM_NAME}/Bundle/${CPACK_BUNDLE_NAME}-${CPACK_PACKAGE_VERSION}-${CMAKE_SYSTEM_NAME}/${CPACK_BUNDLE_NAME}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libxmlrpc-epi.0.dylib"
     SYMBOLIC
     )
 file(CREATE_LINK
     "../../../../Frameworks/libopenjp2.7.dylib"
-    "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libopenjp2.7.dylib"
+    "${CMAKE_CACHEFILE_DIR}/_CPack_Packages/${CMAKE_SYSTEM_NAME}/Bundle/${CPACK_BUNDLE_NAME}-${CPACK_PACKAGE_VERSION}-${CMAKE_SYSTEM_NAME}/${CPACK_BUNDLE_NAME}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libopenjp2.7.dylib"
     SYMBOLIC
     )
 file(CREATE_LINK
     "../../../../Frameworks/libpng16.16.dylib"
-    "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libpng16.16.dylib"
+    "${CMAKE_CACHEFILE_DIR}/_CPack_Packages/${CMAKE_SYSTEM_NAME}/Bundle/${CPACK_BUNDLE_NAME}-${CPACK_PACKAGE_VERSION}-${CMAKE_SYSTEM_NAME}/${CPACK_BUNDLE_NAME}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libpng16.16.dylib"
     SYMBOLIC
     )
 file(CREATE_LINK
     "../../../../Frameworks/libjpeg.8.dylib"
-    "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libjpeg.8.dylib"
+    "${CMAKE_CACHEFILE_DIR}/_CPack_Packages/${CMAKE_SYSTEM_NAME}/Bundle/${CPACK_BUNDLE_NAME}-${CPACK_PACKAGE_VERSION}-${CMAKE_SYSTEM_NAME}/${CPACK_BUNDLE_NAME}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libjpeg.8.dylib"
     SYMBOLIC
     )
 file(CREATE_LINK
     "../../../../Frameworks/libmeshoptimizer.dylib"
-    "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libmeshoptimizer.dylib"
+    "${CMAKE_CACHEFILE_DIR}/_CPack_Packages/${CMAKE_SYSTEM_NAME}/Bundle/${CPACK_BUNDLE_NAME}-${CPACK_PACKAGE_VERSION}-${CMAKE_SYSTEM_NAME}/${CPACK_BUNDLE_NAME}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libmeshoptimizer.dylib"
     SYMBOLIC
     )
 file(CREATE_LINK
     "../../../../Frameworks/libaprutil-1.0.dylib"
-    "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libaprutil-1.0.dylib"
+    "${CMAKE_CACHEFILE_DIR}/_CPack_Packages/${CMAKE_SYSTEM_NAME}/Bundle/${CPACK_BUNDLE_NAME}-${CPACK_PACKAGE_VERSION}-${CMAKE_SYSTEM_NAME}/${CPACK_BUNDLE_NAME}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libaprutil-1.0.dylib"
     SYMBOLIC
     )
 file(CREATE_LINK
     "../../../../Frameworks/libiconv.2.dylib"
-    "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libiconv.2.dylib"
+    "${CMAKE_CACHEFILE_DIR}/_CPack_Packages/${CMAKE_SYSTEM_NAME}/Bundle/${CPACK_BUNDLE_NAME}-${CPACK_PACKAGE_VERSION}-${CMAKE_SYSTEM_NAME}/${CPACK_BUNDLE_NAME}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libiconv.2.dylib"
     SYMBOLIC
     )
 file(CREATE_LINK
     "../../../../Frameworks/libapr-1.0.dylib"
-    "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libapr-1.0.dylib"
+    "${CMAKE_CACHEFILE_DIR}/_CPack_Packages/${CMAKE_SYSTEM_NAME}/Bundle/${CPACK_BUNDLE_NAME}-${CPACK_PACKAGE_VERSION}-${CMAKE_SYSTEM_NAME}/${CPACK_BUNDLE_NAME}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libapr-1.0.dylib"
     SYMBOLIC
     )
 file(CREATE_LINK
     "../../../../Frameworks/libjsoncpp.25.dylib"
-    "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libjsoncpp.25.dylib"
+    "${CMAKE_CACHEFILE_DIR}/_CPack_Packages/${CMAKE_SYSTEM_NAME}/Bundle/${CPACK_BUNDLE_NAME}-${CPACK_PACKAGE_VERSION}-${CMAKE_SYSTEM_NAME}/${CPACK_BUNDLE_NAME}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libjsoncpp.25.dylib"
     SYMBOLIC
     )
 file(CREATE_LINK
     "../../../../Frameworks/libz.1.dylib"
-    "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libz.1.dylib"
+    "${CMAKE_CACHEFILE_DIR}/_CPack_Packages/${CMAKE_SYSTEM_NAME}/Bundle/${CPACK_BUNDLE_NAME}-${CPACK_PACKAGE_VERSION}-${CMAKE_SYSTEM_NAME}/${CPACK_BUNDLE_NAME}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libz.1.dylib"
     SYMBOLIC
     )
 file(CREATE_LINK
     "../../../../Frameworks/libboost_context-mt.dylib"
-    "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libboost_context-mt.dylib"
+    "${CMAKE_CACHEFILE_DIR}/_CPack_Packages/${CMAKE_SYSTEM_NAME}/Bundle/${CPACK_BUNDLE_NAME}-${CPACK_PACKAGE_VERSION}-${CMAKE_SYSTEM_NAME}/${CPACK_BUNDLE_NAME}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libboost_context-mt.dylib"
     SYMBOLIC
     )
 file(CREATE_LINK
     "../../../../Frameworks/libboost_fiber-mt.dylib"
-    "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libboost_fiber-mt.dylib"
+    "${CMAKE_CACHEFILE_DIR}/_CPack_Packages/${CMAKE_SYSTEM_NAME}/Bundle/${CPACK_BUNDLE_NAME}-${CPACK_PACKAGE_VERSION}-${CMAKE_SYSTEM_NAME}/${CPACK_BUNDLE_NAME}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libboost_fiber-mt.dylib"
     SYMBOLIC
     )
 file(CREATE_LINK
     "../../../../Frameworks/libboost_filesystem-mt.dylib"
-    "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libboost_filesystem-mt.dylib"
+    "${CMAKE_CACHEFILE_DIR}/_CPack_Packages/${CMAKE_SYSTEM_NAME}/Bundle/${CPACK_BUNDLE_NAME}-${CPACK_PACKAGE_VERSION}-${CMAKE_SYSTEM_NAME}/${CPACK_BUNDLE_NAME}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libboost_filesystem-mt.dylib"
     SYMBOLIC
     )
 file(CREATE_LINK
     "../../../../Frameworks/libboost_program_options-mt.dylib"
-    "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libboost_program_options-mt.dylib"
+    "${CMAKE_CACHEFILE_DIR}/_CPack_Packages/${CMAKE_SYSTEM_NAME}/Bundle/${CPACK_BUNDLE_NAME}-${CPACK_PACKAGE_VERSION}-${CMAKE_SYSTEM_NAME}/${CPACK_BUNDLE_NAME}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libboost_program_options-mt.dylib"
     SYMBOLIC
     )
 file(CREATE_LINK
     "../../../../Frameworks/libboost_regex-mt.dylib"
-    "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libboost_regex-mt.dylib"
+    "${CMAKE_CACHEFILE_DIR}/_CPack_Packages/${CMAKE_SYSTEM_NAME}/Bundle/${CPACK_BUNDLE_NAME}-${CPACK_PACKAGE_VERSION}-${CMAKE_SYSTEM_NAME}/${CPACK_BUNDLE_NAME}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libboost_regex-mt.dylib"
     SYMBOLIC
     )
 file(CREATE_LINK
     "../../../../Frameworks/libboost_system-mt.dylib"
-    "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libboost_system-mt.dylib"
+    "${CMAKE_CACHEFILE_DIR}/_CPack_Packages/${CMAKE_SYSTEM_NAME}/Bundle/${CPACK_BUNDLE_NAME}-${CPACK_PACKAGE_VERSION}-${CMAKE_SYSTEM_NAME}/${CPACK_BUNDLE_NAME}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libboost_system-mt.dylib"
     SYMBOLIC
     )
 file(CREATE_LINK
     "../../../../Frameworks/libboost_thread-mt.dylib"
-    "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libboost_thread-mt.dylib"
+    "${CMAKE_CACHEFILE_DIR}/_CPack_Packages/${CMAKE_SYSTEM_NAME}/Bundle/${CPACK_BUNDLE_NAME}-${CPACK_PACKAGE_VERSION}-${CMAKE_SYSTEM_NAME}/${CPACK_BUNDLE_NAME}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libboost_thread-mt.dylib"
     SYMBOLIC
     )
 file(CREATE_LINK
     "../../../../Frameworks/liburiparser.1.dylib"
-    "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/liburiparser.1.dylib"
+    "${CMAKE_CACHEFILE_DIR}/_CPack_Packages/${CMAKE_SYSTEM_NAME}/Bundle/${CPACK_BUNDLE_NAME}-${CPACK_PACKAGE_VERSION}-${CMAKE_SYSTEM_NAME}/${CPACK_BUNDLE_NAME}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/liburiparser.1.dylib"
     SYMBOLIC
     )
 file(CREATE_LINK
     "../../../../Frameworks/libexpat.1.dylib"
-    "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libexpat.1.dylib"
+    "${CMAKE_CACHEFILE_DIR}/_CPack_Packages/${CMAKE_SYSTEM_NAME}/Bundle/${CPACK_BUNDLE_NAME}-${CPACK_PACKAGE_VERSION}-${CMAKE_SYSTEM_NAME}/${CPACK_BUNDLE_NAME}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libexpat.1.dylib"
     SYMBOLIC
     )
 file(CREATE_LINK
     "../../../../Frameworks/libfreetype.6.dylib"
-    "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libfreetype.6.dylib"
+    "${CMAKE_CACHEFILE_DIR}/_CPack_Packages/${CMAKE_SYSTEM_NAME}/Bundle/${CPACK_BUNDLE_NAME}-${CPACK_PACKAGE_VERSION}-${CMAKE_SYSTEM_NAME}/${CPACK_BUNDLE_NAME}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libfreetype.6.dylib"
     SYMBOLIC
     )
 file(CREATE_LINK
     "../../../../Frameworks/libicudata.74.dylib"
-    "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libicudata.74.dylib"
+    "${CMAKE_CACHEFILE_DIR}/_CPack_Packages/${CMAKE_SYSTEM_NAME}/Bundle/${CPACK_BUNDLE_NAME}-${CPACK_PACKAGE_VERSION}-${CMAKE_SYSTEM_NAME}/${CPACK_BUNDLE_NAME}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libicudata.74.dylib"
     SYMBOLIC
     )
 file(CREATE_LINK
     "../../../../Frameworks/libicui18n.74.dylib"
-    "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libicui18n.74.dylib"
+    "${CMAKE_CACHEFILE_DIR}/_CPack_Packages/${CMAKE_SYSTEM_NAME}/Bundle/${CPACK_BUNDLE_NAME}-${CPACK_PACKAGE_VERSION}-${CMAKE_SYSTEM_NAME}/${CPACK_BUNDLE_NAME}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libicui18n.74.dylib"
     SYMBOLIC
     )
 file(CREATE_LINK
     "../../../../Frameworks/libicuuc.74.dylib"
-    "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libicuuc.74.dylib"
+    "${CMAKE_CACHEFILE_DIR}/_CPack_Packages/${CMAKE_SYSTEM_NAME}/Bundle/${CPACK_BUNDLE_NAME}-${CPACK_PACKAGE_VERSION}-${CMAKE_SYSTEM_NAME}/${CPACK_BUNDLE_NAME}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libicuuc.74.dylib"
     SYMBOLIC
     )
 file(CREATE_LINK
     "../../../../Frameworks/libbz2.1.0.dylib"
-    "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libbz2.1.0.dylib"
+    "${CMAKE_CACHEFILE_DIR}/_CPack_Packages/${CMAKE_SYSTEM_NAME}/Bundle/${CPACK_BUNDLE_NAME}-${CPACK_PACKAGE_VERSION}-${CMAKE_SYSTEM_NAME}/${CPACK_BUNDLE_NAME}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libbz2.1.0.dylib"
     SYMBOLIC
     )
 file(CREATE_LINK
     "../../../../Frameworks/libbrotlidec.1.1.0.dylib"
-    "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libbrotlidec.1.1.0.dylib"
+    "${CMAKE_CACHEFILE_DIR}/_CPack_Packages/${CMAKE_SYSTEM_NAME}/Bundle/${CPACK_BUNDLE_NAME}-${CPACK_PACKAGE_VERSION}-${CMAKE_SYSTEM_NAME}/${CPACK_BUNDLE_NAME}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libbrotlidec.1.1.0.dylib"
     SYMBOLIC
     )
 file(CREATE_LINK
     "../../../../Frameworks/libbrotlidec.1.dylib"
-    "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libbrotlidec.1.dylib"
+    "${CMAKE_CACHEFILE_DIR}/_CPack_Packages/${CMAKE_SYSTEM_NAME}/Bundle/${CPACK_BUNDLE_NAME}-${CPACK_PACKAGE_VERSION}-${CMAKE_SYSTEM_NAME}/${CPACK_BUNDLE_NAME}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libbrotlidec.1.dylib"
     SYMBOLIC
     )
 file(CREATE_LINK
     "../../../../Frameworks/libbrotlicommon.1.dylib"
-    "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libbrotlicommon.1.dylib"
+    "${CMAKE_CACHEFILE_DIR}/_CPack_Packages/${CMAKE_SYSTEM_NAME}/Bundle/${CPACK_BUNDLE_NAME}-${CPACK_PACKAGE_VERSION}-${CMAKE_SYSTEM_NAME}/${CPACK_BUNDLE_NAME}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libbrotlicommon.1.dylib"
     SYMBOLIC
     )
 file(CREATE_LINK
     "../../../../Frameworks/Chromium Embedded Framework.framework"
-    "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/Chromium Embedded Framework.framework"
+    "${CMAKE_CACHEFILE_DIR}/_CPack_Packages/${CMAKE_SYSTEM_NAME}/Bundle/${CPACK_BUNDLE_NAME}-${CPACK_PACKAGE_VERSION}-${CMAKE_SYSTEM_NAME}/${CPACK_BUNDLE_NAME}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/Chromium Embedded Framework.framework"
     SYMBOLIC
     )
 
 file(CHMOD
-    "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/DullahanHelper.app/Contents/MacOS/DullahanHelper"
-    "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/DullahanHelper (GPU).app/Contents/MacOS/DullahanHelper (GPU)"
-    "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/DullahanHelper (Plugin).app/Contents/MacOS/DullahanHelper (Plugin)"
-    "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/DullahanHelper (Renderer).app/Contents/MacOS/DullahanHelper (Renderer)"
+    "${CMAKE_CACHEFILE_DIR}/_CPack_Packages/${CMAKE_SYSTEM_NAME}/Bundle/${CPACK_BUNDLE_NAME}-${CPACK_PACKAGE_VERSION}-${CMAKE_SYSTEM_NAME}/${CPACK_BUNDLE_NAME}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/DullahanHelper.app/Contents/MacOS/DullahanHelper"
+    "${CMAKE_CACHEFILE_DIR}/_CPack_Packages/${CMAKE_SYSTEM_NAME}/Bundle/${CPACK_BUNDLE_NAME}-${CPACK_PACKAGE_VERSION}-${CMAKE_SYSTEM_NAME}/${CPACK_BUNDLE_NAME}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/DullahanHelper (GPU).app/Contents/MacOS/DullahanHelper (GPU)"
+    "${CMAKE_CACHEFILE_DIR}/_CPack_Packages/${CMAKE_SYSTEM_NAME}/Bundle/${CPACK_BUNDLE_NAME}-${CPACK_PACKAGE_VERSION}-${CMAKE_SYSTEM_NAME}/${CPACK_BUNDLE_NAME}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/DullahanHelper (Plugin).app/Contents/MacOS/DullahanHelper (Plugin)"
+    "${CMAKE_CACHEFILE_DIR}/_CPack_Packages/${CMAKE_SYSTEM_NAME}/Bundle/${CPACK_BUNDLE_NAME}-${CPACK_PACKAGE_VERSION}-${CMAKE_SYSTEM_NAME}/${CPACK_BUNDLE_NAME}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/DullahanHelper (Renderer).app/Contents/MacOS/DullahanHelper (Renderer)"
     PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
     )
diff --git a/indra/newview/ViewerInstall.cmake b/indra/newview/ViewerInstall.cmake
index b6e670d09b..9d828bfd85 100644
--- a/indra/newview/ViewerInstall.cmake
+++ b/indra/newview/ViewerInstall.cmake
@@ -22,7 +22,7 @@ if (DARWIN)
         skins
         tr.lproj
         zh-Hans.lproj
-        DESTINATION Resources
+        DESTINATION .
         )
 
     install(FILES
@@ -30,25 +30,24 @@ if (DARWIN)
         ${AUTOBUILD_INSTALL_DIR}/ca-bundle.crt
         cube.dae
         featuretable_mac.txt
-        secondlife.icns
-        DESTINATION Resources
+        DESTINATION .
         )
 
     install(FILES
         licenses-mac.txt
         RENAME licenses.txt
-        DESTINATION Resources
+        DESTINATION .
         )
 
     install(FILES
         ${SCRIPTS_DIR}/messages/message_template.msg
         ${SCRIPTS_DIR}/../etc/message.xml
-        DESTINATION Resources/app_settings
+        DESTINATION app_settings
         )
 
     install(DIRECTORY
         "${AUTOBUILD_INSTALL_DIR}/lib/release/Chromium Embedded Framework.framework"
-        DESTINATION Frameworks
+        DESTINATION ../Frameworks
         )
 
     install(DIRECTORY
@@ -56,13 +55,13 @@ if (DARWIN)
         "${AUTOBUILD_INSTALL_DIR}/lib/release/DullahanHelper (GPU).app"
         "${AUTOBUILD_INSTALL_DIR}/lib/release/DullahanHelper (Plugin).app"
         "${AUTOBUILD_INSTALL_DIR}/lib/release/DullahanHelper (Renderer).app"
-        DESTINATION Resources/SLPlugin.app/Contents/Frameworks
+        DESTINATION SLPlugin.app/Contents/Frameworks
         )
 
     if (NDOF)
         install(FILES
             "${AUTOBUILD_INSTALL_DIR}/lib/release/libndofdev.dylib"
-            DESTINATION Resources
+            DESTINATION .
             )
     endif ()
 
diff --git a/indra/newview/installers/darwin/dmg-cleanup.applescript b/indra/newview/installers/darwin/dmg-cleanup.applescript
index 8a71b392f9..b5abc3a730 100755
--- a/indra/newview/installers/darwin/dmg-cleanup.applescript
+++ b/indra/newview/installers/darwin/dmg-cleanup.applescript
@@ -4,25 +4,42 @@
 
 tell application "Finder"
 	
-	set foo to every item in front window
-	repeat with i in foo
-		if the name of i is "Applications" then
-			set the position of i to {391, 165}
-		else if the name of i ends with ".app" then
-			set the position of i to {121, 166}
-		end if
-	end repeat
+	-- set foo to every item in front window
+	-- repeat with i in foo
+		-- if the name of i is "Applications" then
+			-- set the position of i to {391, 165}
+		-- else if the name of i ends with ".app" then
+			-- set the position of i to {121, 166}
+		-- end if
+	-- end repeat
 	
 	-- There doesn't seem to be a way to set the background picture with applescript, but all the saved .DS_Store files should already have that set correctly.
 	
-	set foo to front window
-	set current view of foo to icon view
-	set toolbar visible of foo to false
-	set statusbar visible of foo to false
-	set the bounds of foo to {100, 100, 600, 449}
+	-- set foo to front window
+	-- set current view of foo to icon view
+	-- set toolbar visible of foo to false
+	-- set statusbar visible of foo to false
+	-- set the bounds of foo to {100, 100, 600, 449}
 	
 	-- set the position of front window to {100, 100}
 	-- get {name, position} of every item of front window
 	
-	get properties of front window
+	-- get properties of front window
+
+	tell disk "Megapahit Installer"
+		open
+		set current view of container window to icon view
+		set toolbar visible of container window to false
+		set statusbar visible of container window to false
+		set the bounds of container window to {400, 100, 900, 500}
+		set theViewOptions to the icon view options of container window
+		set arrangement of theViewOptions to not arranged
+		set icon size of theViewOptions to 128
+		set background picture of theViewOptions to file ".background:background.jpg"
+		set position of item "Megapahit" of container window to {125, 160}
+		set position of item "Applications" of container window to {375, 160}
+		update without registering applications
+		delay 5
+		close
+	end tell
 end tell
-- 
cgit v1.2.3