Giter Site home page Giter Site logo

robertkraig / browser-plugin Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bdeluca/browser-plugin

0.0 1.0 0.0 10.02 MB

This is a browser plugin that is an extension for the Shotgun production tracking system. It implements the local file integration and pipeline integration features of Shotgun.

License: Apache License 2.0

browser-plugin's Introduction

The Shotgun Browser Plugin (Beta)

This is a browser plugin that is an extension for the Shotgun production tracking system. It implements the local file integration and pipeline integration features of Shotgun.

The plugin is currently in public beta.

Table of Contents

Background

This plugin replaces Shotgun's previous implementations of local file linking and pipeline integration. The previous implementation was based on a Java applet, and due to the various security issues surrounding Java we wrote this native plugin. It uses the firebreath library as a foundation and has been written with security in mind.

Supported Browsers

This plugin is supported for all browsers the Shotgun supports. The detailed list is here, but most versions of Safari, Chrome, and Firefox should work.

Supported Platforms

This plugin is supported on OSX (10.6+), Windows (XP+), and Linux.

Security

Without any customization, this plugin only exposes its functionality to web pages on hosted shotgun sites. The methods it implements will not be available except for pages served from shotgunstudio.com over https.

If you run a local installation of shotgun, you can set two environment variables to override this default security:

  • SHOTGUN_PLUGIN_PROTOCOL_RESTRICTION - The protocol portion of a url must match this. Defaults to "https".
  • SHOTGUN_PLUGIN_DOMAIN_RESTRICTION - The host portion of a url must match this. Defaults to "*.shotgunstudio.com"

These environment variables can contain wildcards to match multiple values. SHOTGUN_PLUGIN_DOMAIN_RESTRICTION can be a comma separated set of wildcarded domains to match.

Example - Configuring the browser plugin for a local Shotgun server

If you using the browser plugin with a hosted Shotgun installation (e.g. your Shotgun url ends with shotgunstudio.com), things should work out of the box using the browser plugin's default settings. However, if you are using the browser plugin with a locally installed shotgun client, things will not work out of the box. You need to tell the browser plugin which urls you use for your internal site.

Here's an example how to set things up when using a local Shotgun. Imagine your shotgun site can be reached using the following addresses:

  • http://shotgun
  • http://shotgun.mystudio.int

We then need to set the following two environment variables:

SHOTGUN_PLUGIN_PROTOCOL_RESTRICTION = "http"
SHOTGUN_PLUGIN_DOMAIN_RESTRICTION = "shotgun,shotgun.mystudio.int"

Environment variables are set differently on different operating systems. On Linux, they are typically added to a login script. On windows, they can be modified using the control panel and on Macosx they are typically added to a special configuration file (/etc/launchd.conf).

Installation

Installing on OSX

A pre-built binary is available here.

Double clicking on the dmg will bring up this window:

folder

Simply drag the plugin into the linked folder and restart your browser to enable the plugin. The folder is /Library/Internet Plug-Ins/, which will install the plugin for all users. If you do not have administrative privledges or want to install the plugin only for yourself, you can copy the plugin to ~/Library/Internet Plug-Ins/ instead.

Installing on Windows

A pre-built binary is available here.

Double clicking on the installer will bring up a standard installer window, which will install without any further prompting:

installer

Installing on Linux

A pre-built binary is available here.

This binary was built on CentOS 6.3 and has fairly minimal library dependencies. There is a good chance it will work on any Linux system based on a 2.6 kernel. To install it copy the binary to /usr/lib64/mozilla/plugins or ~/.mozilla/plugins.

Your install location may differ depending on your linux flavor and system architecture.

Verifying Installation

Once the plugin is installed and you have restarted your browser, you should see the plugin listed in the browser plugin list. For example, in Chrome you will see a plugin named "Shotgun Integration":

installer

In addition, in the javascript console when visiting a Shotgun page where local file linking or pipeline integration is turned on, you should see a message like the following:

installer

If you do not see that message, then the plugin is not working.

If you see the message, but instead of reading "Protected Security Scope" it reads "Public Security Scope", then you need to update your environment to activate the plugin. See the section on security above for instructions on how to do this.

Launching via a Wrapper

By default the browser will use the operating system default to launch a command (the equivalent of xdg-open on linux, open on osx, and run on windows). If you wish to provide your own wrapper for launching files you can set the SHOTGUN_PLUGIN_LAUNCHER environment variable to point to your custom wrapper. If that is set, then the wrapper will be called with the path as its only argument.

Building

The firebreath build instructions are very thorough. You should be able to build this plugin by following those instructions.

Building on OSX

This plugin has been built on OSX 10.6, 10.7, and 10.8. Firebreath's DMG creation functionality is currently experimental, but functions well. The one issue with it is that rebuilding the source will raise an error at the DMG generation if the previous DMG has not been deleted or moved aside.

Building on Windows

This plugin has been built on Windows XP and Windows 7 using Visual Studio Express 2012. The extra functionality for creating an MSI installer has been turned on, which requires WiX to be installed. The firebreath instructions on how to build for Windows has detailed instructions on how to install these dependencies.

Building on Linux

Building on Linux if fairly simple. There is a bug with firebreath where the prepmake.sh script which generates the Makefiles needs to be run twice to correctly generate a build directory. The only package dependency for building should be on libgtk2.

License

This software is released under the Apache License Version 2.0. The full text is available here.

Support

You can report issues with the plugin here.

Changelog

v0.0.2 - 2013 May 22

  • added: ability to use a custom launcher via SHOTGUN_PLUGIN_LAUNCHER
  • fixed: run Tank commands hidden on Windows
  • fixed: crashes if Tank command or directory is misconfigured. issue #5.
  • added: ability to set SHOTGUN_PLUGIN_DOMAIN_RESTRICTION to a comma separated list of values

v0.0.1 - 2013 Apr 19

  • added: initial release

githalytics.com alpha

browser-plugin's People

Contributors

lithorus avatar manneohrstrom avatar mattdaw avatar robblau avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.