Code Monkey home page Code Monkey logo

Comments (4)

konsumer avatar konsumer commented on August 22, 2024

Seems like I can make it build by installing dep submodule, and modifying binding.gyp.

It seems like library_dirs is not working as expected, but works fine with -L../deps/PLATFORM works, in libraries.

I installed dep submodule with this:

git submodule init
git submodule update

Here is the edit of binding.gyp:

{
  'variables': {
    'platform': '<(OS)',
  },
  'conditions': [
    # Replace gyp platform with node platform, blech
    ['platform == "mac"', {'variables': {'platform': 'darwin'}}],
    ['platform == "win"', {'variables': {'platform': 'win32'}}],
  ],
  'targets': [
    {
      #'target_name': 'glfw-<(platform)-<(target_arch)',
      'target_name': 'glfw',
      'defines': [
        'VERSION=0.1.2'
      ],
      'sources': [ 'src/atb.cc', 'src/glfw.cc' ],
      'include_dirs': [
        './deps/include',
      ],
      'library_dirs': [
        './deps/<(platform)',
      ],
      'conditions': [
        ['OS=="linux"', {
            'libraries': [
              '-lAntTweakBar',
              '-lglfw',
              '-lGLEW'
            ]
          }
        ],
        ['OS=="mac"', {
            'libraries': [
              '-lAntTweakBar',
              '-lglfw',
              '-lGLEW',
              '-framework OpenGL',
              '-L../deps/darwin'
            ]
          }
        ],
        ['OS=="win"', {
            'libraries': [
              'AntTweakBar64.lib',
              'glew64s.lib', 
              'glfw64dll.lib', 
              'opengl32.lib',
              '-L../deps/win32'
              ],
            'defines' : [
              'WIN32_LEAN_AND_MEAN',
              'VC_EXTRALEAN'
            ]
          },
        ],
      ],
    }
  ]
}

As an alternate route, to make it easier to install by npm, the submodule could be removed, a package.json added to that repo, and a dependency added to node-glfw's package.json.

If this seems like a good plan, I'd be happy to make pull requests for both projects.

from node-glfw.

mikeseven avatar mikeseven commented on August 22, 2024

Yes it is a good idea. The problem is anttweakbar provides realky nice navigation and menu and requires some tight integration with glfw. I'll look if it is possible to separate it.

-- Mike

-------- Original message --------
From: David Konsumer [email protected]
Date: 08/26/2013 13:05 (GMT-08:00)
To: mikeseven/node-glfw [email protected]
Subject: [node-glfw] Remove dependency on AntTweakBar (#2)

npm install node-glfw fails due to this dep.

Especially for use in other things, it would simplify things for me on OSX (it would probably help linux people, too) to not have a dependency on AntTweakBar, as everything else is built-in, and I don't need it.

Would it be reasonable to make node-AntTweakBar a separate project, for people who are not using AntTweakBar?


Reply to this email directly or view it on GitHub.

from node-glfw.

mikeseven avatar mikeseven commented on August 22, 2024

Thanks! Please do make a pull request. 

-- Mike

-------- Original message --------
From: David Konsumer [email protected]
Date: 08/26/2013 13:58 (GMT-08:00)
To: mikeseven/node-glfw [email protected]
Subject: Re: [node-glfw] Remove dependency on AntTweakBar (#2)

Seems like I can make it build by installing dep submodule, and modifying binding.gyp.

It seems like library_dirs is not working as expected, but works fine with -L../deps/PLATFORM works, in libraries.

I installed dep submodule with this:

git submodule init
git submodule update
Here is the edit of binding.gyp:

{
'variables': {
'platform': '<(OS)',
},
'conditions': [
# Replace gyp platform with node platform, blech
['platform == "mac"', {'variables': {'platform': 'darwin'}}],
['platform == "win"', {'variables': {'platform': 'win32'}}],
],
'targets': [
{
#'target_name': 'glfw-<(platform)-<(target_arch)',
'target_name': 'glfw',
'defines': [
'VERSION=0.1.2'
],
'sources': [ 'src/atb.cc', 'src/glfw.cc' ],
'include_dirs': [
'./deps/include',
],
'library_dirs': [
'./deps/<(platform)',
],
'conditions': [
['OS=="linux"', {
'libraries': [
'-lAntTweakBar',
'-lglfw',
'-lGLEW'
]
}
],
['OS=="mac"', {
'libraries': [
'-lAntTweakBar',
'-lglfw',
'-lGLEW',
'-framework OpenGL',
'-L../deps/darwin'
]
}
],
['OS=="win"', {
'libraries': [
'AntTweakBar64.lib',
'glew64s.lib',
'glfw64dll.lib',
'opengl32.lib',
'-L../deps/win32'
],
'defines' : [
'WIN32_LEAN_AND_MEAN',
'VC_EXTRALEAN'
]
},
],
],
}
]
}
As an alternate route, to make it easier to install by npm, the submodule could be removed, a package.json added to that repo, and a dependency added to node-glfw's package.json.

If this seems like a good plan, I'd be happy to make pull requests for both projects.


Reply to this email directly or view it on GitHub.

from node-glfw.

konsumer avatar konsumer commented on August 22, 2024

Upon further inspection, I can't seem to actually load the lib after building it (it's looking for ../deps/darwin on load, which is different, in relative terms)

I will inspect closer, and see if I can fix it.

from node-glfw.

Related Issues (19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.