JOCL's build.xml is based on NB's template, which is impossible to maintain. We shall replace it w/ our own build.xml style, i.e. copy JOAL's or JOGL's and adapt it. JOAL's build.xml should be most close to JOCL's complecity. While doing so, JOCL shall only generate code and compile components if they are 'new' - currently they are always generated and compiled which makes development a PIA.
Is anyone working on this? If not, I can give it a shot.
I didn't get very far, feel free to have at it. Harvey
OK, I'm on it -- will report back once I've made some progress.
Working on this now. Unless anyone has objections, I may do it in two parts -- first migrating to the new make/build.xml based on JOAL's build, then after that works, moving the files around to match the layout of the other JogAmp projects (e.g. Java source in src/java, C code in src/native).
That sounds like an excellent plan Wade. I think you're right about moving the build structure second, as if you do your version in make/build.xml, you can have both in parallel for a bit without breaking anything, and eventually when eveything works, you can just kill the build.xml that is up at the root folder currently.
Making progress on this. I've got the classes, natives, JARs and tests building, and many of the tests pass now. I still need to get the rest of the tests passing, then carefully compare the results to the original build.
All the tests pass now, and I've manually compared the results to the original build to insure they're all being run (a bit annoying, since the subtest output is in non-deterministic order). I've also compared the jocl.jar contents with those of the original build to make sure all the .class files are present and of the same size (they are). One difference is that the original build doesn't compress the JARs, and the new build does. The next step for me is to remove the unused old build files and create a branch so I can test on Mac and Linux.
Branch containing the first version of this fix is at: https://github.com/WadeWalker/jocl/compare/master...bug_884_replace_netbeans_build_with_jogamp_standard_build Let me know if you have any feedback or concerns. I'll test this on other platforms and add more commits to fix any problems.
Tested and functional on Ubuntu 12.04, MacOS 10.9, and Windows 8. Some tests fail on Mac, but they seem to fail on our build server too, so I'll leave that for a later patch. Now I'm working on the build to make sure it only rebuilds the minimum set of files when something is changed.
Wade, have you pushed any of this work out for people to have a look? I'll likely have enough time to at least give it a read-through if you point me in the right direction. Harvey
Hi Harvey, the first part of the work is visible on my GitHub in https://github.com/WadeWalker/jocl/branches, the branch is named bug_884_replace_netbeans_build_with_jogamp_standard_build. Right now there's only one commit to that branch, which adapts JOAL's build files to JOCL in the simplest way possible. Subsequent commits are coming which will reduce the number of files rebuilt (for example, currently JOAL's build relinks the native code and rebuilds all JAR files every time, even if nothing has changed). I welcome any feedback, feel free to let me know if you spot any problems. I'll probably add another couple of commits to get the build efficient, then try to get Sven to pull it to the master before I start moving the source files around to match the other JogAmp projects.
(In reply to comment #11) > Hi Harvey, the first part of the work is visible on my GitHub in > https://github.com/WadeWalker/jocl/branches, the branch is named > bug_884_replace_netbeans_build_with_jogamp_standard_build. Right now there's > only one commit to that branch, which adapts JOAL's build files to JOCL in > the simplest way possible. Subsequent commits are coming which will reduce > the number of files rebuilt (for example, currently JOAL's build relinks the > native code and rebuilds all JAR files every time, even if nothing has > changed). > > I welcome any feedback, feel free to let me know if you spot any problems. > I'll probably add another couple of commits to get the build efficient, then > try to get Sven to pull it to the master before I start moving the source > files around to match the other JogAmp projects. Sweet. Thank you Wade. Glancing over your commit while not validating the details, all looks familiar now - enabling us to maintain and to add new things. KUDOS.
Sorry for bothering Wade, can I merge and test your [preliminary] version ?
(In reply to comment #13) Sure, I tested it manually, but only on three platform/OS combinations, so more testing is welcome. I'm still working on further optimizing the build, but progress has been slow because my wife and I got a new puppy last month, and her training has been cutting into my coding time :)
(In reply to comment #14) > (In reply to comment #13) > > Sure, I tested it manually, but only on three platform/OS combinations, so > more testing is welcome. I'm still working on further optimizing the build, > but progress has been slow because my wife and I got a new puppy last month, > and her training has been cutting into my coding time :) Wuff :) I merge now and test .. thank you!
First of all: KUDOS to Wade, thank you - works like a charme .. now we can finally add and improve things properly! Minor changes: 9ecc606bce374ea093c6321f2d4921b5019a0b18 The new make/build.xml successfully builds and tests the project. The original NetBeans build files are still present, but won't work anymore since the resources directory is now inside the make directory. The new build files are based on those of JOAL. The new build is not yet minimized and cleaned up, because this commit is meant to be the minimum way to get things functional. 5c5f3b4785835b8abf53474b0c9dc248d1b8dab6 Move obsolete NB based build files to 'obsolete.make-nb' ; Fix text file suffix ; Fix Jar Manifest: Move Sealed to bottom. f9214217defbcc2a640e80a68f1270ee1e428cf2 Avoid sealed package violation: Move AutoCloseable to com.jogamp.opencl 52a1b51d7281640ed525d07fe22d14de54b398d0 Add '-b${joal.build.number}' to joal.version / archive.name ; Produce jar and apk files in ${build}/jar (as it was before new build system)
(In reply to comment #16) > > Minor changes: > > 9ecc606bce374ea093c6321f2d4921b5019a0b18 ... oops .. the above is Wade's build system change. Minor changes are: > 5c5f3b4785835b8abf53474b0c9dc248d1b8dab6 > f9214217defbcc2a640e80a68f1270ee1e428cf2 > 52a1b51d7281640ed525d07fe22d14de54b398d0
Closing this one .. fixing remaining Android build issue via Bug 863
ac84afd26ad3b34851a423fb90e6c819b9dc9495 build.xml: Fix jogl.build: Use [passed or default] jogl.build as well as rootrel.build (as gluegen does)