nwjs / nw.js

Call all Node.js modules directly from DOM/WebWorker and enable a new way of writing applications with all Web technologies.
https://nwjs.io
MIT License
40.39k stars 3.88k forks source link

Build instructions #459

Closed RobertLowe closed 11 years ago

RobertLowe commented 11 years ago

Hey,

The build instructions are unclear, should node-webkit (this repo) be the root, or is it chromium. Should it be nested inside the chromium source under content/nw?

First find a place to put our code, it will take up about 14G disk space after compilation. Assume you store code under node-webkit folder, our final directory architecture will be like:

node-webkit/
|-- .gclient
`-- src/
    |-- many-stuff
    |-- ...
    `-- content
        |-- ...
        `-- nw

I wanted to take a stab at fixing #348

Specifically I was getting an error like:

Error: 
____ src at node
    Path is not a git repo. No .git dir.
    To resolve:
        rm -rf src
    And run gclient sync again
rogerwang commented 11 years ago

It should be content/nw. I'll fix the doc. Thanks

RobertLowe commented 11 years ago

@rogerwang thanks for the clarification, my misunderstand was that node-webkit repo is checkout by the chromium node branch. The build instructions can be simplified for osx.

Get Depot Tools:

  1. Run cd ~
  2. Run git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
  3. Add ~/depot_tools to your path - export PATH="$PATH":~/depot_tools

Get the source & build

  1. Run mkdir ~/node-webkit && cd ~/node-webkit
  2. Create a file named .gclient with:

    solutions = [
      { "name"        : "src",
        "url"         : "https://github.com/zcbenz/chromium.git@origin/node",
        "deps_file"   : ".DEPS.git",
        "managed"     : True,
        "custom_deps" : {
          "src/third_party/WebKit/LayoutTests": None,
          "src/chrome_frame/tools/test/reference_build/chrome": None,
          "src/chrome_frame/tools/test/reference_build/chrome_win": None,
          "src/chrome/tools/test/reference_build/chrome": None,
          "src/chrome/tools/test/reference_build/chrome_linux": None,
          "src/chrome/tools/test/reference_build/chrome_mac": None,
          "src/chrome/tools/test/reference_build/chrome_win": None,
        },
        "safesync_url": "",
      },
    ]
  3. Run gclient sync (This may take hours, keep syncing until it's done)
  4. Run cd src
  5. Run GYP_GENERATORS='ninja' ./build/gyp_chromium content/content.gyp
  6. Run ninja -C out/Release nw -j4 to build

I think that's everything.

Cheers,

longmangl commented 11 years ago

qq20130801-2

follow the step till run gclient sync return Error: client not configured; see 'gclient config'

Is there something wrong?

longmangl commented 11 years ago

Hi ,RobertLowe , when I run sync for a while,it apperaed messges: “27> No output for 22290 seconds from command: 27> git -c core.deltaBaseCacheLimit=2g clone --no-checkout --progress --template=/Users/CDC_PM2/Desktop/Longman_WorkSpace/depot_tools/git-templates https://chromium.googlesource.com/chromium/third_party/ffmpeg.git /Users/CDC_PM2/Desktop/Longman_WorkSpace/node-webkit/src/third_party/_gclient_ffmpeg_iuSjoz; cwd=/Users/CDC_PM2/Desktop/Longman_WorkSpace/node-webkit 27> ... killing it!” 1daef757-c757-4a46-bda4-dc93de91dac7

Is that something wrong?

kingFighter commented 11 years ago

It happens when the network is poor. And after a long time no output, it assumes that failed and kills it.Keep trying and manually clone it etc.

longmangl commented 11 years ago

hi,kingFighter,how can I manually clone it?

kingFighter commented 11 years ago

@longmangl See #891

vishalup commented 8 years ago

Not able get code itself. Getting following error on windows.

D:\Workspace\NW12>fetch --no-history chromium --nosvn=True Running: 'D:\Workspace\depot_tools\python276_bin\python.exe' 'D:\Workspace\depot_tools\gclient.py' root Running: 'D:\Workspace\depot_tools\python276_bin\python.exe' 'D:\Workspace\depot_tools\gclient.py' config --sp ec 'solutions = [ { "managed": False, "name": "src", "url": "https://chromium.googlesource.com/chromium/src.git", "custom_deps": {}, "deps_file": ".DEPS.git", "safesync_url": "", }, ] ' Running: 'D:\Workspace\depot_tools\python276_bin\python.exe' 'D:\Workspace\depot_tools\gclient.py' sync --no-h istory Error: Command 'D:\\Workspace\\depot_tools\\python276_bin\\python.exe src/build/landmines.py' returned non-zer o exit status 1 in D:\Workspace\NW12 Traceback (most recent call last): File "D:\Workspace\depot_tools\\fetch.py", line 346, in <module> sys.exit(main()) File "D:\Workspace\depot_tools\\fetch.py", line 341, in main return run(options, spec, root) File "D:\Workspace\depot_tools\\fetch.py", line 335, in run return checkout.init() File "D:\Workspace\depot_tools\\fetch.py", line 142, in init self.run_gclient(*sync_cmd) File "D:\Workspace\depot_tools\\fetch.py", line 76, in run_gclient return self.run(cmd_prefix + cmd, **kwargs) File "D:\Workspace\depot_tools\\fetch.py", line 66, in run return subprocess.check_output(cmd, **kwargs) File "D:\Workspace\depot_tools\python276_bin\lib\subprocess.py", line 573, in check_output raise CalledProcessError(retcode, cmd, output=output) subprocess.CalledProcessError: Command '('D:\\Workspace\\depot_tools\\python276_bin\\python.exe', 'D:\\Workspa ce\\depot_tools\\gclient.py', 'sync', '--no-history')' returned non-zero exit status 2

I have tried to fetch without --nosvn=True.

Solution is as follow: solutions = [ { "name" : "src", "url" : "https://github.com/zcbenz/chromium.git@origin/node", "deps_file" : ".DEPS.git", "managed" : True, "custom_deps" : { "src/third_party/WebKit/LayoutTests": None, "src/chrome_frame/tools/test/reference_build/chrome": None, "src/chrome_frame/tools/test/reference_build/chrome_win": None, "src/chrome/tools/test/reference_build/chrome": None, "src/chrome/tools/test/reference_build/chrome_linux": None, "src/chrome/tools/test/reference_build/chrome_mac": None, "src/chrome/tools/test/reference_build/chrome_win": None, }, "safesync_url": "", }, ]

System: Window 8.1 M Visual Studio 2013 Update 5

Also tried with his URL in solution, getting same issue. Need help? I am able to download chrome but not node webkit.

ghostoy commented 8 years ago

Latest build instructions can be found on official website http://docs.nwjs.io/

vishalup commented 8 years ago

Failed to get again. It says change from managed:true to managed:false in gclient.