Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

NetBeans (7.3) C/C++ project generation #9

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

NetBeans (7.3) C/C++ project generation #9

wants to merge 5 commits into from

Conversation

Lusito
Copy link

@Lusito Lusito commented Oct 15, 2013

NetBeans is my fav. IDE, especially since its autocompletion and refactoring is better than Visual Studio's.
I've not seen a netbeans action for premake since I've started working with it, so I decided to write one myself.
This was written with NB 7.3 in mind. Not sure how compatible this would be to older versions.

This creates c/c++ project files for static libs, shared libs and executables.
I'm new to this, so I might have done something horribly wrong, forgive me if I did.

Known issues / Notes:

  • Netbeans does not have anything like a "solution" file. The closest thing would be a group, but you can't store them in files.
  • There is no "single" project file. There are actually 3 files:
    • one Makefile (containing pre- and post-build steps)
    • and the nbprojects folder with:
    • project.xml
    • configurations.xml
    • So for every project I created a new folder containing the makefile and the nbprojects folder.
  • You need to restart netbeans for it to recognize changes in a project file.
    • Simply closing and reopening the project won't work.
  • I have no idea how to add resource files (.rc) correctly
  • Pre-link steps seem impossible to me.
  • I'm not sure If I have the linking libraries part right, but my test projects seem to work.

Let me know if you have other problems.

@TurkeyMan
Copy link
Contributor

I've made a premake5 extension out of this code: https://bitbucket.org/premakeext/netbeans
I wanted to experiment with the NetBeans D-language plugin, which I'll add support for.

I cherry-picked your commits, to preserve your identity in the history.
You don't seem to have a bitbucket account, but if you create one the same as your github; Lusito [email protected], then it should link you to your history. If you have a different bitbucket account, I can edit the commit history to fix it if you like.
If you want to maintain the NetBeans extension, then I'm sure you can ask starkos to be added to the premake-ext group. It seems a bit thin (most options are ignored), but it's a good start.

@TurkeyMan
Copy link
Contributor

One more thought, since NetBeans is primarily a Java IDE, it might be a good starting point for adding Java language support to premake (via another extension). I've been interested in adding Java support, since I use premake for Android projects, which is a platform that also requires Java code. But I haven't had enough time.

@Lusito
Copy link
Author

Lusito commented Nov 5, 2013

I've registered on bitbucket.

Java Projects for Netbeans would actually be quite simple to generate, but I think that maven is way better for java, as it can also handle dependency management.
Netbeans is able to open maven projects like normal projects as well, so no need to create project files for it.
Actually I'd rather see something like maven for c++, but I guess it's not that well suited since artifacts are not as easily created for multiple platforms as in java.

@Lusito
Copy link
Author

Lusito commented Nov 5, 2013

By the way, not sure what premake extensions are.. are they added separately from the premake exe or is it just a way to name thirdparty extensions that are still bundled within the exe ?

@TurkeyMan
Copy link
Contributor

'extensions' is the direction starkos has gone with supporting minor/user extensions. They are to be kept apart (near) the exe, and loaded at runtime.
It's new, and there's still room for movement regarding how they're managed.
Extensions that are thorough and bug-free may eventually become 'blessed' extensions, and be included in the premake exe, but since premake was beyond the scope of his own testability, the unmaintained code was removed, and should be added back as extensions.
Basically, it's a way to democratize the process of maintaining many complex features. He's happy to give many people access to premake-ext, so you can develop/release/test an extension without polluting the main exe with code that may or may not be well tested. The trouble was, before, it was almost impossible to get a pull-request with your platform/action/whatever accepted into premake-dev, now you can release an extension, get people using it, prove it, and when it's proven to work well and you've also proven that you'll stay around to maintain it, it may be included in the main exe.
Some reference:
http://industriousone.com/topic/premake-extensions
https://bitbucket.org/premake/premake-dev/wiki/Extending%20Premake
https://bitbucket.org/premakeext

@TurkeyMan
Copy link
Contributor

It seems I'm a premake-ext admin actually, so I can add you as a member if you plan to spend time maintaining this extension (there is an upper limit to the number of team members for unpaid bitbicket accounts, so only if you plan to work on it).

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

Successfully merging this pull request may close these issues.

2 participants