Include high DPI resource paks.
authorCheng Zhao <zcbenz@gmail.com>
Wed, 16 Jul 2014 07:05:02 +0000 (15:05 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Wed, 16 Jul 2014 07:05:02 +0000 (15:05 +0800)
atom.gyp
atom/app/atom_main_delegate.cc
atom/app/atom_main_delegate.h
script/create-dist.py
script/lib/config.py

index d09b559..f2255e7 100644 (file)
--- a/atom.gyp
+++ b/atom.gyp
                 '<(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',
               ],
                 '<(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',
               ],
             },
             {
           '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': {
index dd4b3f7..47dc9da 100644 (file)
@@ -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)
index 0837df7..72bc0f7 100644 (file)
@@ -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;
 
index c39f560..d321f0b 100755 (executable)
@@ -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 = {
index 1bf36d3..249478c 100644 (file)
@@ -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',