We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e39c01e commit 8c7fd9cCopy full SHA for 8c7fd9c
src/nw_base.cc
@@ -21,8 +21,16 @@ Package* package(const base::FilePath* path) {
21
}
22
23
Package* InitNWPackage() {
24
- if (!g_package)
25
- g_package = new Package();
+ if (!g_package) {
+ const base::CommandLine& command_line =
26
+ *base::CommandLine::ForCurrentProcess();
27
+ std::string process_type = command_line.GetSwitchValueASCII("type");
28
+ if (process_type == "renderer") {
29
+ base::FilePath pkg_path = command_line.GetSwitchValuePath("nwapp-path");
30
+ g_package = new Package(pkg_path);
31
+ } else
32
+ g_package = new Package();
33
+ }
34
exit_code = 0;
35
return g_package;
36
0 commit comments