Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(71)

Unified Diff: cloud_print/virtual_driver/posix/mac_packaging/install.sh

Issue 7599018: Code to package Cloud Print Linux and Mac virtual drivers. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Changed Copyright file per discusssion Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: cloud_print/virtual_driver/posix/mac_packaging/install.sh
diff --git a/cloud_print/virtual_driver/posix/mac_packaging/install.sh b/cloud_print/virtual_driver/posix/mac_packaging/install.sh
new file mode 100755
index 0000000000000000000000000000000000000000..bc72247b6653956b42f772bd5185781864990e1f
--- /dev/null
+++ b/cloud_print/virtual_driver/posix/mac_packaging/install.sh
@@ -0,0 +1,24 @@
+#!/bin/bash
+
+# Change working directory to the one in which the script is located.
+DIR="$( cd "$( dirname "$0" )" && pwd )"
+cd $DIR
+
+# Change the ownership and permissions, as Package Maker can be buggy
+chown root:wheel /usr/libexec/cups/backend/GCP-driver
+chmod 0700 /usr/libexec/cups/backend/GCP-driver
+
+# Restart cups so that it sees the new backend
+launchctl stop org.cups.cupsd
+launchctl start org.cups.cupsd
+
+# Install the Cloud Print Driver only for the current user,
+# since the Service Process is available only for current user
+# Give it a unique name, so that multiple users
+# on the same machine can install GCP.
+# $USER contains the username of the person that started the install.
+lpadmin -p Google-Cloud-Print-$USER -E -P GCP-driver.ppd -D \
+ "Google Cloud Print" -u allow:$USER -o printer-is-shared=false -v GCP-driver:/
+
+# Register the driver with Chrome/Chromium using the included ObjC program.
+./GCP-install

Powered by Google App Engine
This is Rietveld 408576698