diff options
Diffstat (limited to 'indra')
-rwxr-xr-x | indra/newview/CMakeLists.txt | 18 | ||||
-rwxr-xr-x | indra/newview/Info-SecondLife.plist | 2 | ||||
-rwxr-xr-x | indra/newview/installers/windows/installer_template.nsi | 10 | ||||
-rwxr-xr-x | indra/newview/llmaniprotate.cpp | 3 | ||||
-rwxr-xr-x | indra/newview/viewer_manifest.py | 18 | ||||
-rwxr-xr-x | indra/viewer_components/manager/SL_Launcher | 63 |
6 files changed, 92 insertions, 22 deletions
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index bb745bcb43..03768e78ab 100755 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1759,6 +1759,22 @@ if (WINDOWS) ${SHARED_LIB_STAGING_DIR}/Debug/fmodexL.dll ) endif (FMODEX) + + get_filename_component(PYTHON_DIRECTORY ${PYTHON_EXECUTABLE} DIRECTORY) + + # http://pythonhosted.org/PyInstaller/#options + add_custom_command( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/SL_Launcher.exe + COMMAND ${PYTHON_DIRECTORY}/Scripts/pyinstaller.exe + ARGS + --onefile + --log-level WARN + --distpath ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR} + ${CMAKE_SOURCE_DIR}/viewer_components/manager/SL_Launcher + COMMENT "Performing pyinstaller compile of SL_Launcher" +) + +add_custom_target(compile_w_viewer_launcher ALL DEPENDS ${CMAKE_CFG_INTDIR}/SL_Launcher.exe) add_custom_command( OUTPUT ${CMAKE_CFG_INTDIR}/copy_touched.bat @@ -2028,6 +2044,8 @@ endif (LINUX) if (DARWIN) # These all get set with PROPERTIES set(product "Second Life") + # this is the setting for the Python wrapper, see SL-322 and WRAPPER line in Info-SecondLife.plist + set(MACOSX_WRAPPER_EXECUTABLE_NAME "SL_Launcher") set(MACOSX_BUNDLE_INFO_STRING "Second Life Viewer") set(MACOSX_BUNDLE_ICON_FILE "secondlife.icns") set(MACOSX_BUNDLE_GUI_IDENTIFIER "com.secondlife.indra.viewer") diff --git a/indra/newview/Info-SecondLife.plist b/indra/newview/Info-SecondLife.plist index 9b8136a827..8aabd6818b 100755 --- a/indra/newview/Info-SecondLife.plist +++ b/indra/newview/Info-SecondLife.plist @@ -5,7 +5,7 @@ <key>CFBundleDevelopmentRegion</key> <string>English</string> <key>CFBundleExecutable</key> - <string>${MACOSX_BUNDLE_EXECUTABLE_NAME}</string> + <string>${MACOSX_WRAPPER_EXECUTABLE_NAME}</string> <key>CFBundleGetInfoString</key> <string>${MACOSX_BUNDLE_INFO_STRING}</string> <key>CFBundleIconFile</key> diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index b8677fd9e4..d833af8742 100755 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -276,7 +276,7 @@ StrCpy $SHORTCUT_LANG_PARAM "--set InstallLanguage $(LanguageCode)" CreateDirectory "$SMPROGRAMS\$INSTSHORTCUT"
SetOutPath "$INSTDIR"
CreateShortCut "$SMPROGRAMS\$INSTSHORTCUT\$INSTSHORTCUT.lnk" \
- "$INSTDIR\$INSTEXE" "$SHORTCUT_LANG_PARAM"
+ "$INSTDIR\$INSTEXE" "$SHORTCUT_LANG_PARAM" "%%SOURCE%%\icons\release\secondlife.ico"
WriteINIStr "$SMPROGRAMS\$INSTSHORTCUT\SL Create Account.url" \
@@ -294,15 +294,15 @@ CreateShortCut "$SMPROGRAMS\$INSTSHORTCUT\Uninstall $INSTSHORTCUT.lnk" \ # Other shortcuts
SetOutPath "$INSTDIR"
CreateShortCut "$DESKTOP\$INSTSHORTCUT.lnk" \
- "$INSTDIR\$INSTEXE" "$SHORTCUT_LANG_PARAM"
+ "$INSTDIR\$INSTEXE" "$SHORTCUT_LANG_PARAM" "%%SOURCE%%\icons\release\secondlife.ico"
CreateShortCut "$INSTDIR\$INSTSHORTCUT.lnk" \
- "$INSTDIR\$INSTEXE" "$SHORTCUT_LANG_PARAM"
+ "$INSTDIR\$INSTEXE" "$SHORTCUT_LANG_PARAM" "%%SOURCE%%\icons\release\secondlife.ico"
CreateShortCut "$INSTDIR\Uninstall $INSTSHORTCUT.lnk" \
'"$INSTDIR\uninst.exe"' ''
-# Create *.bat file to specify lang params on first run from installer - see MAINT-5259
+# Create *.bat file to specify lang params on first run from installer - see MAINT-5259S
FileOpen $9 "$INSTDIR\autorun.bat" w
-FileWrite $9 'start "$INSTDIR\$INSTEXE" "$INSTDIR\$INSTEXE" $SHORTCUT_LANG_PARAM$\r$\n'
+FileWrite $9 'start "$INSTDIR\$INSTEXE" /d "$INSTDIR" "$INSTDIR\$INSTEXE" $SHORTCUT_LANG_PARAM$\r$\n'
FileClose $9
# Write registry
diff --git a/indra/newview/llmaniprotate.cpp b/indra/newview/llmaniprotate.cpp index ed40483029..3a0f96cd37 100755 --- a/indra/newview/llmaniprotate.cpp +++ b/indra/newview/llmaniprotate.cpp @@ -67,9 +67,6 @@ const F32 RADIUS_PIXELS = 100.f; // size in screen space const F32 SQ_RADIUS = RADIUS_PIXELS * RADIUS_PIXELS; const F32 WIDTH_PIXELS = 8; const S32 CIRCLE_STEPS = 100; -const F32 DELTA = F_TWO_PI / CIRCLE_STEPS; -const F32 SIN_DELTA = sin( DELTA ); -const F32 COS_DELTA = cos( DELTA ); const F32 MAX_MANIP_SELECT_DISTANCE = 100.f; const F32 SNAP_ANGLE_INCREMENT = 5.625f; const F32 SNAP_ANGLE_DETENTE = SNAP_ANGLE_INCREMENT; diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 1c77cf805e..2c694132ea 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -339,6 +339,8 @@ class Windows_i686_Manifest(ViewerManifest): if self.is_packaging_viewer(): # Find secondlife-bin.exe in the 'configuration' dir, then rename it to the result of final_exe. self.path(src='%s/secondlife-bin.exe' % self.args['configuration'], dst=self.final_exe()) + # include the compiled launcher script so that it gets included in the file_list + self.path(src='%s/SL_Launcher.exe' % self.args['configuration'], dst="SL_Launcher.exe") # Plugin host application self.path2basename(os.path.join(os.pardir, @@ -610,7 +612,7 @@ class Windows_i686_Manifest(ViewerManifest): substitution_strings['installer_file'] = installer_file version_vars = """ - !define INSTEXE "%(final_exe)s" + !define INSTEXE "SL_Launcher.exe" !define VERSION "%(version_short)s" !define VERSION_LONG "%(version)s" !define VERSION_DASHES "%(version_dashes)s" @@ -702,6 +704,8 @@ class Darwin_i386_Manifest(ViewerManifest): if self.prefix(dst="MacOS"): self.path2basename("../viewer_components/updater/scripts/darwin", "*.py") + #this copies over the python wrapper script, see SL-322 + self.path2basename("../viewer_components/manager","SL_Launcher") self.end_prefix() # most everything goes in the Resources directory @@ -883,12 +887,6 @@ class Darwin_i386_Manifest(ViewerManifest): self.run_command('strip -S %(viewer_binary)r' % { 'viewer_binary' : self.dst_path_of('Contents/MacOS/Second Life')}) - def copy_finish(self): - # Force executable permissions to be set for scripts - # see CHOP-223 and http://mercurial.selenic.com/bts/issue1802 - for script in 'Contents/MacOS/update_install.py',: - self.run_command("chmod +x %r" % os.path.join(self.get_dst_prefix(), script)) - def package_finish(self): global CHANNEL_VENDOR_BASE # MBW -- If the mounted volume name changes, it breaks the .DS_Store's background image and icon positioning. @@ -1089,12 +1087,6 @@ class LinuxManifest(ViewerManifest): self.path("featuretable_linux.txt") - def copy_finish(self): - # Force executable permissions to be set for scripts - # see CHOP-223 and http://mercurial.selenic.com/bts/issue1802 - for script in 'secondlife', 'bin/update_install': - self.run_command("chmod +x %r" % os.path.join(self.get_dst_prefix(), script)) - def package_finish(self): installer_name = self.installer_base_name() diff --git a/indra/viewer_components/manager/SL_Launcher b/indra/viewer_components/manager/SL_Launcher new file mode 100755 index 0000000000..e715546821 --- /dev/null +++ b/indra/viewer_components/manager/SL_Launcher @@ -0,0 +1,63 @@ +#!/usr/bin/env python + +# $LicenseInfo:firstyear=2016&license=internal$ +# +# Copyright (c) 2016, Linden Research, Inc. +# +# The following source code is PROPRIETARY AND CONFIDENTIAL. Use of +# this source code is governed by the Linden Lab Source Code Disclosure +# Agreement ("Agreement") previously entered between you and Linden +# Lab. By accessing, using, copying, modifying or distributing this +# software, you acknowledge that you have been informed of your +# obligations under the Agreement and agree to abide by those obligations. +# +# ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO +# WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, +# COMPLETENESS OR PERFORMANCE. +# $/LicenseInfo$ + +import argparse +import os +import sys +import subprocess +import Tkinter as tk + +cwd = os.path.dirname(os.path.realpath(__file__)) + +executable_name = "" +if sys.platform.startswith('darwin'): + executable_name = "Second Life" +elif sys.platform.startswith("win") or sys.platform.startswith("cyg"): + if os.path.isfile(os.path.join(cwd,"SecondLifeViewer.exe")): + executable_name = "SecondLifeViewer.exe" + elif os.path.isfile(os.path.join(cwd,"SecondLifeTest.exe")): + executable_name = "SecondLifeTest.exe" + else: + #unsupported by prototypeS + sys.exit("Can't find Windows viewer binary") +elif sys.platform.startswith("linux"): + executable_name = "secondlife" +else: + #SL doesn't run on VMS or punch cards + sys.exit("Unsupported platform") + +#print "COYOT: executable name ", executable_name +#print "COYOT: path ", os.path.dirname(os.path.abspath(sys.argv[0])) + +viewer_binary = os.path.join(os.path.dirname(os.path.abspath(sys.argv[0])),executable_name) + +parser = argparse.ArgumentParser() +#parser.add_argument('--f', action='store_const', const=42) +args = parser.parse_known_args(sys.argv) +args_list_to_pass = args[1][1:] +args_list_to_pass.insert(0,viewer_binary) +#print "COYOT: arrrrrghs to pass", args_list_to_pass + +#to prove we are launching from the script, launch a Tkinter window first +root = tk.Tk() +w = tk.Label(root, text=viewer_binary) +w.pack() +root.after(10000, lambda: root.destroy()) # Destroy the widget after 10 seconds +root.mainloop() + +viewer_process = subprocess.Popen(args_list_to_pass) |