Skip to content
Snippets Groups Projects
  1. Jul 27, 2021
  2. Jul 24, 2021
  3. Sep 15, 2020
  4. Aug 02, 2020
  5. Mar 10, 2020
  6. Sep 18, 2019
  7. Sep 16, 2019
  8. Oct 22, 2018
    • Nat Goodspeed's avatar
      DRTVWR-447: Introduce LLManifest.process_either(). · 279073db
      Nat Goodspeed authored
      process_directory() and process_file() are reached both from the top-level
      caller (try_path(), a local function within LLManifest.path()) and recursively
      from process_directory(). Both places tested os.path.isdir(source), and if so
      called process_directory(), else process_file(). Both places were wrong, as it
      turns out.
      
      os.path.isdir(symlink_to_directory) returns True. That meant that despite
      explicit logic in ccopymumble() to recreate symlinks in the destination area,
      we were consistently recopying the contents of symlinked directories.
      
      The downside to this -- in addition to inflating the size of the installer! --
      is that macOS is very particular about the structure of a Framework bundle. It
      *must* include a Versions/Current symlink identifying which of the other
      Versions subdirectories is, in fact, current. If Current is itself a
      subdirectory, codesign can't figure out how to sign the framework, and fails.
      
      The logic for deciding between process_directory() and process_file() must
      explicitly check for os.path.islink(source). Rather than replicating that
      change in both places, introduce process_either() which decides how to forward
      the call, and call it both from try_path() and from process_directory().
      279073db
  9. Sep 07, 2018
  10. Sep 06, 2018
  11. Aug 24, 2018
    • Nat Goodspeed's avatar
      DRTVWR-447: Introduce explicit CMake BUGSPLAT_DB variable. · c2178bb6
      Nat Goodspeed authored
      Define the CMake cache variable, with empty string as its default.
      
      Make build.sh pass the BUGSPLAT_DB environment variable as a CMake
      command-line variable assignment.
      
      Change CMake 'if (DEFINED ENV{BUGSPLAT_DB})' to plain 'if (BUGSPLAT_DB)'.
      
      Make CMake pass new --bugsplat switch to every one of SIX different
      invocations of viewer_manifest.py.
      
      Give llmanifest.main() function an argument to allow supplementing the base
      set of command-line switches with additional application-specific switches.
      
      In viewer_manifest.py, define new --bugsplat command-line switch and pass to
      llmanifest.main(). Instead of consulting os.environ['BUGSPLAT_DB'], consult
      self.args['bugsplat'].
      c2178bb6
  12. Aug 17, 2018
    • Nat Goodspeed's avatar
      DRTVWR-447: Use os.path.split(path) instead of path.split(os.sep). · 52fe3573
      Nat Goodspeed authored
      On Windows, where 'path' might be separated either with '/' or '\', the latter
      breaks unless all path separators are in fact the os.sep character '\'. While
      it would be possible to code something fancy with os.sep and os.altsep,
      testing the latter for None, much simpler to let os.path.split() handle it.
      52fe3573
  13. Aug 15, 2018
  14. Jun 30, 2018
  15. Jun 29, 2018
    • Nat Goodspeed's avatar
      MAINT-8822: Revamp the LLManifest.prefix() calling convention. · 93ea0d70
      Nat Goodspeed authored
      The way prefix("path_fragment") or prefix(src="path_fragment") has always
      worked is that unless you explicitly specify dst="", it adds "path_fragment"
      to the source AND dest prefix stacks!
      
      The most recent refactoring of viewer_manifest.py failed to copy CEF because
      it involved prefix(src="../some lengthy path fragment") -- forgetting to
      specify dst="" -- which added "../some lengthy path fragment" to the dest
      prefix stack -- which put it outside the viewer install staging area
      altogether.
      
      Having been bitten too many times by forgetting to add prefix(dst=""), we
      remove the necessity. The prefix() src=, build= and dst= prefix stacks are now
      completely independent. Add src_dst= keyword argument for when you DO want to
      add the same path fragment to both the source and dest prefix stacks.
      ("Explicit is better than implicit.")
      
      Change all existing calls accordingly.
      
      Now that the build prefix stack no longer tracks the src prefix stack, we were
      failing to pick up some things from the build area because NOBODY ever used
      build=, relying entirely on src= to point both to stuff in the source tree and
      stuff in the build tree. Try to use build= appropriately.
      
      If that proves too confusing, we might eliminate the separate build and
      artwork (!) prefix stacks entirely, requiring callers to reset the src stack
      explicitly when switching back and forth.
      93ea0d70
  16. Dec 04, 2017
    • Nat Goodspeed's avatar
      MAINT-7751: Rework DarwinManifest to produce new app bundle structure. · 488d1658
      Nat Goodspeed authored
      Specifically, Second Life.app is now mostly just a wrapper. Its Contents/
      Resources contains nested Launcher.app (the VMP) and Viewer.app (the viewer
      itself). Most of what used to be in the top-level Second Life.app has been
      relocated to the embedded Viewer.app. VMP stuff has of course been extracted
      to Launcher.app. The top-level Second Life.app executable is now a tiny script
      that runs Launcher.app. This structure permits different icons and different
      Dock flyover text for the launcher and the viewer, hopefully ameliorating a
      certain amount of user confusion about the dual icons.
      
      This requires a corresponding VMP change: on macOS, the VMP must now find both
      its resources and the viewer executable by walking up from Launcher.app and
      down again into its sibling Viewer.app.
      
      Since Dock flyover text is determined by the embedded app names, allow Product
      to change these at will. That means we should be able to tweak exactly one
      variable assignment to change either of those embedded app names, without
      having to chase down other references scattered throughout the source repo.
      
      For that reason, create top-level trampoline SL_Launcher script dynamically:
      it must reference the launcher app by name. That means we must also perform
      (the equivalent of) chmod +x on that generated script.
      
      The one mystery surrounding this restructuring is that without a top-level
      Frameworks symlink pointing to the embedded Viewer.app's Frameworks directory
      (where CEF lives), CEF refuses to start: no splash screen, no MoP. Perhaps we
      can fix that someday.
      
      Use Python's bundled plistlib to generate Info.plist files for the embedded
      applications.
      
      Reorganize stray code stanzas to try to help the structure of the code more or
      less resemble the structure of the desired result.
      
      Add ViewerManifest.relpath() method to determine the relative path from a
      specified base to the target path. If base omitted, assumes get_dst_prefix()
      -- handy for creating symlinks. Determining exactly the right number of
      os.pardir instances to concatenate into the relative pathname for a symlink
      (or an install_name_tool stamp) was tedious, fragile and unobvious, difficult
      to desk-check. Using relpath() should make all that more robust.
      
      Migrate symlinkf() from free function to ViewerManifest method, refactoring
      into _symlinkf_prep_dst() and _symlinkf(), adding relsymlinkf(). This lets us
      add convenience features such as prepending get_dst_prefix() to the dest (the
      place where we want to create the symlink), defaulting dest to the basename of
      target and ensuring that the parent of that dest already exists -- as with
      LLManifest.path(). Moreover, since it makes no sense whatsoever to create an
      absolute symlink to some path on the build machine, relsymlinkf() creates
      every symlink relative to dirname(dest). That, in turn, lets us eliminate a
      certain amount of boilerplate around existing calls. (Also, since we now
      ensure the parent directory exists, scrap the logic to diagnose "nonexistent
      parent directory.")
      
      Make llmanifest.LLManifest.run_command() not pass shell=True to subprocess,
      thereby permitting (requiring) the list form rather than the string form.
      Change all existing calls to list form. This makes calls more readable, for
      two reasons. First, many of the arguments are taken from script variables;
      these can simply be dropped into the list instead of indirecting through
      string interpolation. Second, it eliminates the need to manually escape
      individual arguments, since subprocess promises to honor the distinction
      between list elements.
      
      Also fix LLManifest.put_in_file() to ensure the containing directory exists.
      
      Consolidate some viewer_manifest.py redundancy, e.g. copying the same set of
      ten DLLs from either of two directories depending on Release vs. Debug.
      488d1658
  17. Oct 09, 2017
    • Nat Goodspeed's avatar
      MAINT-7831: Allow LLManifest.prefix() to be a context manager. · d9d6df31
      Nat Goodspeed authored
      LLManifest.prefix() dates back to before Python had a 'with' statement or the
      notion of a context manager. That's why every prefix() call requires a
      corresponding end_prefix() call.
      
      Existing usage is of the form:
      
          if self.prefix(...some args...):
              self.path(...)
              ...
              self.end_prefix()
      
      The use of an 'if' statement is solely to allow the coder to indent the
      statements between the self.prefix() call and the corresponding call to
      self.end_prefix() -- there is no intention to make that code conditional.
      self.prefix() unconditionally returned True to facilitate that usage.
      
      But now that we have the 'with' statement, this all feels a little silly. Make
      prefix() return an instance of a context-manager class so that it's reasonable
      to say instead:
      
          with self.prefix(...some args...):
              self.path(...)
              ...
      
      and have the Right Things happen simply by leaving the 'with' block.
      
      The only tricky part is code to preserve compatibility with old-style usage:
      
      * The context manager has a __nonzero__() method so that if it's tested in an
        'if' statement, it can unconditionally return True.
      
      * On leaving the 'with' block, rather than simply popping the top of each
        prefix stack, the context manager restores its length to the same length it
        had before that prefix() call. This allows for (erroneous but hardly
        unlikely) usage of the form:
      
          with self.prefix(...some args...):
              self.path(...)
              ...
              self.end_prefix()
      
      Restoring the previous length makes the context manager insensitive to whether
      or not end_prefix() has popped the most recent prefix() entries.
      d9d6df31
  18. Sep 21, 2017
  19. May 24, 2017
  20. Jul 21, 2016
  21. Jul 20, 2016
  22. Jun 18, 2015
  23. Nov 24, 2013
  24. Nov 18, 2013
  25. Sep 16, 2013
  26. Jul 26, 2013
    • Nat Goodspeed's avatar
      CHOP-955: Include app_settings/settings_install.xml in file_list. · a207b24d
      Nat Goodspeed authored
      viewer_manifest.py uses its base-class llmanifest.LLManifest.put_in_file()
      method to create several different files in the install image being
      marshalled. I based the logic to create settings_install.xml on that example.
      Unfortunately I failed to notice that after every existing call, the script
      also explicitly appended the newly-created file to self.file_list... which
      only matters on Windows. file_list is fed to the NSIS installer.
      Change put_in_file() method to implicitly append to self.file_list.
      Change every existing viewer_manifest.py call to pass new put_in_file(src=)
      param instead of explicitly appending to self.file_list.
      a207b24d
  27. Jun 18, 2013
  28. Mar 29, 2013
  29. Feb 15, 2013
  30. Feb 12, 2013
Loading