summaryrefslogtreecommitdiffstats
path: root/cloud_print
diff options
context:
space:
mode:
authorabeera@google.com <abeera@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-04 22:24:32 +0000
committerabeera@google.com <abeera@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-04 22:24:32 +0000
commit6ef511c10f78ed32f5bcc4861d84494e97d48651 (patch)
tree3b0ba24638927993bd5dd861e08d1e286c7bbd9c /cloud_print
parent92508df5db3ec8927d1f0f3d786d38c2861e5c58 (diff)
downloadchromium_src-6ef511c10f78ed32f5bcc4861d84494e97d48651.zip
chromium_src-6ef511c10f78ed32f5bcc4861d84494e97d48651.tar.gz
chromium_src-6ef511c10f78ed32f5bcc4861d84494e97d48651.tar.bz2
Installer for Windows cloud print driver changed to use PPD, PPd file added
BUG= TEST= Review URL: http://codereview.chromium.org/7465016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@95520 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cloud_print')
-rw-r--r--cloud_print/virtual_driver/GCP-driver.ppd85
-rw-r--r--cloud_print/virtual_driver/win/install/setup.cc22
2 files changed, 96 insertions, 11 deletions
diff --git a/cloud_print/virtual_driver/GCP-driver.ppd b/cloud_print/virtual_driver/GCP-driver.ppd
new file mode 100644
index 0000000..0b4b717
--- /dev/null
+++ b/cloud_print/virtual_driver/GCP-driver.ppd
@@ -0,0 +1,85 @@
+*PPD-Adobe: "4.3"
+*% Minmalistic PPD file for Google cloud Print.
+*FormatVersion: "4.3"
+*FileVersion: "1.1"
+*LanguageVersion: English
+*LanguageEncoding: ISOLatin1
+*PCFileName: "GOOGLE-CLOUD-PRINT.PPD"
+*Manufacturer: "Google Inc."
+*Product: "(CUPS v1.1)"
+*ModelName: "GCP Virtual Driver"
+*ShortNickName: "GCP Virtual Driver"
+*NickName: "GCP Virtual Driver"
+*1284DeviceID: "MFG:Google Inc.;MDL:GCP Virtual Driver;DES:GCP Virtual Driver;CLS:PRINTER;CMD:POSTSCRIPT;"
+*cupsFilter: "application/vnd.cups-pdf 0 -"
+*PSVersion: "(2017.000) 0"
+*LanguageLevel: "3"
+*ColorDevice: True
+*DefaultColorSpace: RGB
+*FileSystem: False
+*Throughput: "8"
+*LandscapeOrientation: Plus90
+*TTRasterizer: Type42
+
+*OpenGroup: General/General
+
+*OpenUI *PageSize/Page Size: PickOne
+*OrderDependency: 100 AnySetup *PageSize
+*DefaultPageSize: Letter
+*PageSize Letter/US Letter: "<</PageSize[612 792]/ImagingBBox null>>setpagedevice"
+*CloseUI: *PageSize
+
+*OpenUI *PageRegion: PickOne
+*OrderDependency: 100 AnySetup *PageRegion
+*DefaultPageRegion: Letter
+*PageRegion Letter/US Letter: "<</PageSize[612 792]/ImagingBBox null>>setpagedevice"
+*CloseUI: *PageRegion
+
+*DefaultImageableArea: Letter
+*ImageableArea Letter/US Letter: "18 36 594 786"
+
+*DefaultPaperDimension: Letter
+*PaperDimension Letter/US Letter: "612 792"
+
+*CloseGroup: General
+
+*% List of fonts supported. Taken from Sample PPD file for CUPS
+*% written by Michael Goffioul.
+
+*DefaultFont: Courier
+*Font AvantGarde-Book: Standard "(001.006S)" Standard ROM
+*Font AvantGarde-BookOblique: Standard "(001.006S)" Standard ROM
+*Font AvantGarde-Demi: Standard "(001.007S)" Standard ROM
+*Font AvantGarde-DemiOblique: Standard "(001.007S)" Standard ROM
+*Font Bookman-Demi: Standard "(001.004S)" Standard ROM
+*Font Bookman-DemiItalic: Standard "(001.004S)" Standard ROM
+*Font Bookman-Light: Standard "(001.004S)" Standard ROM
+*Font Bookman-LightItalic: Standard "(001.004S)" Standard ROM
+*Font Courier: Standard "(002.004S)" Standard ROM
+*Font Courier-Bold: Standard "(002.004S)" Standard ROM
+*Font Courier-BoldOblique: Standard "(002.004S)" Standard ROM
+*Font Courier-Oblique: Standard "(002.004S)" Standard ROM
+*Font Helvetica: Standard "(001.006S)" Standard ROM
+*Font Helvetica-Bold: Standard "(001.007S)" Standard ROM
+*Font Helvetica-BoldOblique: Standard "(001.007S)" Standard ROM
+*Font Helvetica-Narrow: Standard "(001.006S)" Standard ROM
+*Font Helvetica-Narrow-Bold: Standard "(001.007S)" Standard ROM
+*Font Helvetica-Narrow-BoldOblique: Standard "(001.007S)" Standard ROM
+*Font Helvetica-Narrow-Oblique: Standard "(001.006S)" Standard ROM
+*Font Helvetica-Oblique: Standard "(001.006S)" Standard ROM
+*Font NewCenturySchlbk-Bold: Standard "(001.009S)" Standard ROM
+*Font NewCenturySchlbk-BoldItalic: Standard "(001.007S)" Standard ROM
+*Font NewCenturySchlbk-Italic: Standard "(001.006S)" Standard ROM
+*Font NewCenturySchlbk-Roman: Standard "(001.007S)" Standard ROM
+*Font Palatino-Bold: Standard "(001.005S)" Standard ROM
+*Font Palatino-BoldItalic: Standard "(001.005S)" Standard ROM
+*Font Palatino-Italic: Standard "(001.005S)" Standard ROM
+*Font Palatino-Roman: Standard "(001.005S)" Standard ROM
+*Font Symbol: Special "(001.007S)" Special ROM
+*Font Times-Bold: Standard "(001.007S)" Standard ROM
+*Font Times-BoldItalic: Standard "(001.009S)" Standard ROM
+*Font Times-Italic: Standard "(001.007S)" Standard ROM
+*Font Times-Roman: Standard "(001.007S)" Standard ROM
+*Font ZapfChancery-MediumItalic: Standard "(001.007S)" Standard ROM
+*Font ZapfDingbats: Special "(001.004S)" Standard ROM
+
diff --git a/cloud_print/virtual_driver/win/install/setup.cc b/cloud_print/virtual_driver/win/install/setup.cc
index 5ea687f..3497481 100644
--- a/cloud_print/virtual_driver/win/install/setup.cc
+++ b/cloud_print/virtual_driver/win/install/setup.cc
@@ -20,12 +20,12 @@
namespace {
-HRESULT GetGpdPath(FilePath* path) {
+HRESULT GetPpdPath(FilePath* path) {
if (!PathService::Get(base::DIR_EXE, path)) {
LOG(ERROR) << "Unable to get install path.";
return ERROR_PATH_NOT_FOUND;
}
- *path = path->Append(L"gcp.gpd");
+ *path = path->Append(L"GCP-driver.ppd");
return S_OK;
}
@@ -143,7 +143,7 @@ DWORDLONG GetVersionNumber() {
return retval;
}
-HRESULT InstallGpd() {
+HRESULT InstallPpd() {
DRIVER_INFO_6 driver_info = {0};
HRESULT result = S_OK;
@@ -152,9 +152,9 @@ HRESULT InstallGpd() {
FilePath driver_dir;
cloud_print::GetPrinterDriverDir(&driver_dir);
FilePath xps_path = driver_dir.Append(L"mxdwdrv.dll");
- FilePath ui_path = driver_dir.Append(L"unidrvui.dll");
+ FilePath ui_path = driver_dir.Append(L"ps5ui.dll");
FilePath ui_help_path = driver_dir.Append(L"unidrv.hlp");
- result = GetGpdPath(&source_path);
+ result = GetPpdPath(&source_path);
if (!SUCCEEDED(result)) {
return result;
}
@@ -192,7 +192,7 @@ HRESULT InstallGpd() {
return S_OK;
}
-HRESULT UninstallGpd() {
+HRESULT UninstallPpd() {
int tries = 10;
string16 driver_name = cloud_print::LoadLocalString(IDS_DRIVER_NAME);
while (!DeletePrinterDriverEx(NULL,
@@ -270,9 +270,9 @@ HRESULT InstallVirtualDriver(void) {
LOG(ERROR) << "Unable to register port monitor.";
return result;
}
- result = InstallGpd();
+ result = InstallPpd();
if (!SUCCEEDED(result)) {
- LOG(ERROR) << "Unable to install gpd.";
+ LOG(ERROR) << "Unable to install Ppd.";
return result;
}
result = InstallPrinter();
@@ -287,12 +287,12 @@ HRESULT UninstallVirtualDriver(void) {
HRESULT result = S_OK;
result = UninstallPrinter();
if (!SUCCEEDED(result)) {
- LOG(ERROR) << "Unable to uninstall gpd.";
+ LOG(ERROR) << "Unable to uninstall Ppd.";
return result;
}
- result = UninstallGpd();
+ result = UninstallPpd();
if (!SUCCEEDED(result)) {
- LOG(ERROR) << "Unable to remove gpd.";
+ LOG(ERROR) << "Unable to remove Ppd.";
return result;
}
result = RegisterPortMonitor(false);