From ffd0e6b79d39a2e902b1a892d01fa2f113a85f73 Mon Sep 17 00:00:00 2001 From: Latif Khalifa Date: Wed, 18 Jun 2014 15:50:21 +0200 Subject: [PATCH] [Branding] Linux scripts now made from template by cmake --- .gitignore | 6 ++++++ indra/cmake/BuildVersion.cmake | 15 +++++++++++++++ indra/newview/linux_tools/client-readme-voice.txt | 4 ++-- ...rotocol.sh => handle_secondlifeprotocol.sh.in} | 2 +- .../linux_tools/{install.sh => install.sh.in} | 12 ++++++------ ...p_entry.sh => refresh_desktop_app_entry.sh.in} | 8 ++++---- 6 files changed, 34 insertions(+), 13 deletions(-) rename indra/newview/linux_tools/{handle_secondlifeprotocol.sh => handle_secondlifeprotocol.sh.in} (81%) rename indra/newview/linux_tools/{install.sh => install.sh.in} (83%) mode change 100644 => 100755 rename indra/newview/linux_tools/{refresh_desktop_app_entry.sh => refresh_desktop_app_entry.sh.in} (74%) diff --git a/.gitignore b/.gitignore index ead4b749f5..7c302ed856 100644 --- a/.gitignore +++ b/.gitignore @@ -29,3 +29,9 @@ qtcreator-build/ /indra/newview/res/viewerRes.rc /indra/newview/res/viewerRes_bc.rc /indra/newview/English.lproj/InfoPlist.strings +/indra/newview/linux_tools/handle_secondlifeprotocol.sh +/indra/newview/linux_tools/install.sh +/indra/newview/linux_tools/refresh_desktop_app_entry.sh +/indra/newview/linux_tools/wrapper.sh + + diff --git a/indra/cmake/BuildVersion.cmake b/indra/cmake/BuildVersion.cmake index 81b5d5deeb..2f983b2619 100644 --- a/indra/cmake/BuildVersion.cmake +++ b/indra/cmake/BuildVersion.cmake @@ -58,6 +58,21 @@ if (LINUX) ${CMAKE_SOURCE_DIR}/newview/linux_tools/wrapper.sh @ONLY ) + configure_file( + ${CMAKE_SOURCE_DIR}/newview/linux_tools/handle_secondlifeprotocol.sh.in + ${CMAKE_SOURCE_DIR}/newview/linux_tools/handle_secondlifeprotocol.sh + @ONLY + ) + configure_file( + ${CMAKE_SOURCE_DIR}/newview/linux_tools/install.sh.in + ${CMAKE_SOURCE_DIR}/newview/linux_tools/install.sh + @ONLY + ) + configure_file( + ${CMAKE_SOURCE_DIR}/newview/linux_tools/refresh_desktop_app_entry.sh.in + ${CMAKE_SOURCE_DIR}/newview/linux_tools/refresh_desktop_app_entry.sh + @ONLY + ) endif (LINUX) # Compose the version. diff --git a/indra/newview/linux_tools/client-readme-voice.txt b/indra/newview/linux_tools/client-readme-voice.txt index aa04a57045..0637e9d176 100644 --- a/indra/newview/linux_tools/client-readme-voice.txt +++ b/indra/newview/linux_tools/client-readme-voice.txt @@ -11,9 +11,9 @@ groups inside Second Life, with an appropriate headset/microphone. Linux Voice Support is currently EXPERIMENTAL and is known to still have some compatibility issues. -SINGULARITY MULTI-VOICE +MULTI-VOICE -=-=-=-=-=-=-=-=-=-=-=- -Singularity multi-voice is an experimental feature that allows you to run multiple +Multi-voice is an experimental feature that allows you to run multiple SLVoice daemons at the same time, in order to do this, the debug setting VoiceMultiInstance must be TRUE, this allows multiple instances of the viewer to run concurrently and each connect to voice. diff --git a/indra/newview/linux_tools/handle_secondlifeprotocol.sh b/indra/newview/linux_tools/handle_secondlifeprotocol.sh.in similarity index 81% rename from indra/newview/linux_tools/handle_secondlifeprotocol.sh rename to indra/newview/linux_tools/handle_secondlifeprotocol.sh.in index 4ff3e26370..54d20279e7 100755 --- a/indra/newview/linux_tools/handle_secondlifeprotocol.sh +++ b/indra/newview/linux_tools/handle_secondlifeprotocol.sh.in @@ -13,5 +13,5 @@ fi RUN_PATH=`dirname "$0" || echo .` cd "${RUN_PATH}" -exec ./singularity -url \'"${URL}"\' +exec ./@VIEWER_BRANDING_ID@ -url \'"${URL}"\' diff --git a/indra/newview/linux_tools/install.sh b/indra/newview/linux_tools/install.sh.in old mode 100644 new mode 100755 similarity index 83% rename from indra/newview/linux_tools/install.sh rename to indra/newview/linux_tools/install.sh.in index 86d0206713..17a837fbbb --- a/indra/newview/linux_tools/install.sh +++ b/indra/newview/linux_tools/install.sh.in @@ -1,6 +1,6 @@ #!/bin/bash -# Install Singularity Viewer. This script can install the viewer both +# Install @VIEWER_CHANNEL@. This script can install the viewer both # system-wide and for an individual user. VT102_STYLE_NORMAL='\E[0m' @@ -48,8 +48,8 @@ function warn() function homedir_install() { warn "You are not running as a privileged user, so you will only be able" - warn "to install Singularity Viewer in your home directory. If you" - warn "would like to install Singularity Viewer system-wide, please run" + warn "to install @VIEWER_CHANNEL@ in your home directory. If you" + warn "would like to install @VIEWER_CHANNEL@ system-wide, please run" warn "this script as the root user, or with the 'sudo' command." echo @@ -58,13 +58,13 @@ function homedir_install() exit 0 fi - install_to_prefix "$HOME/.singularity-install" - $HOME/.singularity-install/refresh_desktop_app_entry.sh + install_to_prefix "$HOME/.@VIEWER_BRANDING_ID@-install" + $HOME/.@VIEWER_BRANDING_ID@-install/refresh_desktop_app_entry.sh } function root_install() { - local default_prefix="/opt/singularity-install" + local default_prefix="/opt/@VIEWER_BRANDING_ID@-install" echo -n "Enter the desired installation directory [${default_prefix}]: "; read diff --git a/indra/newview/linux_tools/refresh_desktop_app_entry.sh b/indra/newview/linux_tools/refresh_desktop_app_entry.sh.in similarity index 74% rename from indra/newview/linux_tools/refresh_desktop_app_entry.sh rename to indra/newview/linux_tools/refresh_desktop_app_entry.sh.in index 9412c840cf..b865b4df05 100755 --- a/indra/newview/linux_tools/refresh_desktop_app_entry.sh +++ b/indra/newview/linux_tools/refresh_desktop_app_entry.sh.in @@ -12,10 +12,10 @@ function install_desktop_entry() local desktop_entry="\ [Desktop Entry]\n\ -Name=Singularity\n\ +Name=@VIEWER_BRANDING_ID@\n\ Comment=Client for Online Virtual Worlds, such as Second Life\n\ -Exec=${installation_prefix}/singularity\n\ -Icon=${installation_prefix}/singularity_icon.png\n\ +Exec=${installation_prefix}/@VIEWER_BRANDING_ID@\n\ +Icon=${installation_prefix}/@VIEWER_BRANDING_ID@_icon.png\n\ Terminal=false\n\ Type=Application\n\ Categories=Application;Network;\n\ @@ -24,7 +24,7 @@ X-Desktop-File-Install-Version=3.0" echo " - Installing menu entries in ${desktop_entries_dir}" mkdir -vp "${desktop_entries_dir}" - echo -e $desktop_entry > "${desktop_entries_dir}/singularity-viewer.desktop" || "Failed to install application menu!" + echo -e $desktop_entry > "${desktop_entries_dir}/@VIEWER_BRANDING_ID@-viewer.desktop" || "Failed to install application menu!" } if [ "$UID" == "0" ]; then