Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm install from Windows with node 0.8.x #11

Open
andreslozadamosto opened this issue Jan 31, 2013 · 1 comment
Open

npm install from Windows with node 0.8.x #11

andreslozadamosto opened this issue Jan 31, 2013 · 1 comment

Comments

@andreslozadamosto
Copy link

This release of Node (0.8) use node-gyp insted of node-waf.
Documentation: http://blog.nodejs.org/2012/06/25/node-v0-8-0/

There's any workaround on Windows or Linux?

@ghost
Copy link

ghost commented Mar 22, 2013

I managed to make a binding.gyp file for arcusNode. I successfully built the dlls on windows.
Here's the gyp file:

{
  'variables': {
    # node v0.6.x doesn't give us its build variables,
    # but on Unix it was only possible to use the system OpenSSL library,
    # so default the variable to "true", v0.8.x node and up will overwrite it.
    'node_shared_openssl%': 'true'
  },
  'targets': [
    {
      'target_name': 'rtmfp',
      'sources': [ 'src/rtmfp.cc' ],
      'cflags': ['-g', '-D_FILE_OFFSET_BITS=64', '-D_LARGEFILE_SOURCE', '-Wall', '-L/usr/lib', '-lssl'],
      'type': 'shared_library',
      'conditions': [
        ['node_shared_openssl=="false"', {
          # so when "node_shared_openssl" is "false", then OpenSSL has been
          # bundled into the node executable. So we need to include the same
          # header files that were used when building node.
          'include_dirs': [
            '<(node_root_dir)/deps/openssl/openssl/include'
          ],
          'conditions' : [
            ["target_arch=='ia32'", {
              "include_dirs": [ "<(node_root_dir)/deps/openssl/config/piii" ]
            }],
            ["target_arch=='x64'", {
              "include_dirs": [ "<(node_root_dir)/deps/openssl/config/k8" ]
            }],
            ["target_arch=='arm'", {
              "include_dirs": [ "<(node_root_dir)/deps/openssl/config/arm" ]
            }]
          ]
        }],
        [ 'OS=="win"', {
            'conditions': [
              # "openssl_root" is the directory on Windows of the OpenSSL files.
              # Check the "target_arch" variable to set good default values for
              # both 64-bit and 32-bit builds of the module.
              ['target_arch=="x64"', {
                'variables': {
                  'openssl_root%': 'C:/Program Files/OpenSSL-Win64'
                },
              }, {
                'variables': {
                  'openssl_root%': 'C:/Program Files/OpenSSL-Win32'
                },
              }],
            ],
            'libraries': [ 
              '-l<(openssl_root)/lib/libeay32.lib',
            ],
            'include_dirs': [
              '<(openssl_root)/include',
            ],
        }]
      ]
    },
    {
      'target_name': 'keyexchange',
      'sources': [ 'src/keyexchange.cc' ],
      'cflags': ['-g', '-D_FILE_OFFSET_BITS=64', '-D_LARGEFILE_SOURCE', '-Wall', '-L/usr/lib', '-lssl'],
      'type': 'shared_library',
      'conditions': [
        ['node_shared_openssl=="false"', {
          # so when "node_shared_openssl" is "false", then OpenSSL has been
          # bundled into the node executable. So we need to include the same
          # header files that were used when building node.
          'include_dirs': [
            '<(node_root_dir)/deps/openssl/openssl/include'
          ],
          'conditions' : [
            ["target_arch=='ia32'", {
              "include_dirs": [ "<(node_root_dir)/deps/openssl/config/piii" ]
            }],
            ["target_arch=='x64'", {
              "include_dirs": [ "<(node_root_dir)/deps/openssl/config/k8" ]
            }],
            ["target_arch=='arm'", {
              "include_dirs": [ "<(node_root_dir)/deps/openssl/config/arm" ]
            }]
          ]
        }],
        [ 'OS=="win"', {
            'conditions': [
              # "openssl_root" is the directory on Windows of the OpenSSL files.
              # Check the "target_arch" variable to set good default values for
              # both 64-bit and 32-bit builds of the module.
              ['target_arch=="x64"', {
                'variables': {
                  'openssl_root%': 'C:/Program Files/OpenSSL-Win64'
                },
              }, {
                'variables': {
                  'openssl_root%': 'C:/Program Files/OpenSSL-Win32'
                },
              }],
            ],
            'libraries': [ 
              '-l<(openssl_root)/lib/libeay32.lib',
            ],
            'include_dirs': [
              '<(openssl_root)/include',
            ],
        }]
      ]
    }
  ]
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant