From: Cheng Zhao Date: Wed, 16 Jul 2014 07:05:02 +0000 (+0800) Subject: Include high DPI resource paks. X-Git-Tag: v0.14.0~1^2~20 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=db6c37bfbc5e41a4f93e1d511a1a68a1aeab4e00;p=electron.git Include high DPI resource paks. --- diff --git a/atom.gyp b/atom.gyp index d09b5590..f2255e7b 100644 --- a/atom.gyp +++ b/atom.gyp @@ -368,6 +368,8 @@ '<(libchromiumcontent_library_dir)/libGLESv2.dll', '<(libchromiumcontent_resources_dir)/icudtl.dat', '<(libchromiumcontent_resources_dir)/content_shell.pak', + '<(libchromiumcontent_resources_dir)/ui_resources_200_percent.pak', + '<(libchromiumcontent_resources_dir)/webkit_resources_200_percent.pak', 'external_binaries/d3dcompiler_43.dll', 'external_binaries/xinput1_3.dll', ], @@ -389,6 +391,8 @@ '<(libchromiumcontent_library_dir)/libffmpegsumo.so', '<(libchromiumcontent_resources_dir)/icudtl.dat', '<(libchromiumcontent_resources_dir)/content_shell.pak', + '<(libchromiumcontent_resources_dir)/ui_resources_200_percent.pak', + '<(libchromiumcontent_resources_dir)/webkit_resources_200_percent.pak', ], }, { @@ -650,6 +654,8 @@ 'mac_bundle_resources': [ 'atom/common/resources/mac/MainMenu.xib', '<(libchromiumcontent_resources_dir)/content_shell.pak', + '<(libchromiumcontent_resources_dir)/ui_resources_200_percent.pak', + '<(libchromiumcontent_resources_dir)/webkit_resources_200_percent.pak', '<(libchromiumcontent_resources_dir)/icudtl.dat', ], 'xcode_settings': { diff --git a/atom/app/atom_main_delegate.cc b/atom/app/atom_main_delegate.cc index dd4b3f76..47dc9dad 100644 --- a/atom/app/atom_main_delegate.cc +++ b/atom/app/atom_main_delegate.cc @@ -12,6 +12,7 @@ #include "base/debug/stack_trace.h" #include "base/logging.h" #include "content/public/common/content_switches.h" +#include "ui/base/resource/resource_bundle.h" namespace atom { @@ -21,6 +22,16 @@ AtomMainDelegate::AtomMainDelegate() { AtomMainDelegate::~AtomMainDelegate() { } +void AtomMainDelegate::AddDataPackFromPath( + ui::ResourceBundle* bundle, const base::FilePath& pak_dir) { + bundle->AddDataPackFromPath( + pak_dir.Append(FILE_PATH_LITERAL("ui_resources_200_percent.pak")), + ui::SCALE_FACTOR_200P); + bundle->AddDataPackFromPath( + pak_dir.Append(FILE_PATH_LITERAL("webkit_resources_200_percent.pak")), + ui::SCALE_FACTOR_200P); +} + bool AtomMainDelegate::BasicStartupComplete(int* exit_code) { // Disable logging out to debug.log on Windows #if defined(OS_WIN) diff --git a/atom/app/atom_main_delegate.h b/atom/app/atom_main_delegate.h index 0837df72..72bc0f74 100644 --- a/atom/app/atom_main_delegate.h +++ b/atom/app/atom_main_delegate.h @@ -16,6 +16,11 @@ class AtomMainDelegate : public brightray::MainDelegate { ~AtomMainDelegate(); protected: + // brightray::MainDelegate: + virtual void AddDataPackFromPath( + ui::ResourceBundle* bundle, const base::FilePath& pak_dir) OVERRIDE; + + // content::ContentMainDelegate: virtual bool BasicStartupComplete(int* exit_code) OVERRIDE; virtual void PreSandboxStartup() OVERRIDE; diff --git a/script/create-dist.py b/script/create-dist.py index c39f5600..d321f0bf 100755 --- a/script/create-dist.py +++ b/script/create-dist.py @@ -41,6 +41,8 @@ TARGET_BINARIES = { 'libEGL.dll', 'libGLESv2.dll', 'd3dcompiler_43.dll', + 'ui_resources_200_percent.pak', + 'webkit_resources_200_percent.pak', 'xinput1_3.dll', ], 'linux': [ @@ -48,6 +50,8 @@ TARGET_BINARIES = { 'content_shell.pak', 'libchromiumcontent.so', 'libffmpegsumo.so', + 'ui_resources_200_percent.pak', + 'webkit_resources_200_percent.pak', ], } TARGET_DIRECTORIES = { diff --git a/script/lib/config.py b/script/lib/config.py index 1bf36d3e..249478cc 100644 --- a/script/lib/config.py +++ b/script/lib/config.py @@ -5,7 +5,7 @@ import sys NODE_VERSION = 'v0.11.13' BASE_URL = 'https://gh-contractor-zcbenz.s3.amazonaws.com/libchromiumcontent' -LIBCHROMIUMCONTENT_COMMIT = '99d263cbd842ba57331ddb975aad742470a4cff4' +LIBCHROMIUMCONTENT_COMMIT = '177f00b33d8ba5a6befe646e8d39ce19b6a3c668' ARCH = { 'cygwin': '32bit',