Closed hexabits closed 10 years ago
Looks good, would it be overkill to nest all the code related folders in one master source folder?
I dunno. I'm ambivalent as to whether the headers are separated into their own include dir. However I think that the separation of lib
and src
is necessary. If they're not really relevant to our source code, and shouldn't be intermixed, like qhull, they shouldn't be in the same parent source directory but instead both in the project root. Especially if we will create libs with their own .PRO files that we build as static dependencies.
For example qhull is like an entirely separate project with its own project structure. I considered listing docsys there too. Fsengine and NvTriStrip are borderline. As of now FSEngine relies on the project for Qt, etc. But it's reasonably detached from the rest of the project's code. And in the future we might refactor FSEngine entirely since it can no longer work as-is under Qt 5.2.
Basically anything we separate into its own config (e.g. CONFIG += fsengine) scope in NifSkope.pro should probably be placed under libs. I don't think src/src and src/libs really makes as much sense.
Sorry should clarify, its not necessarily a source folder, just a general parent folder.
I dunno. I think lib
, src
, include
are extremely common for the root dir. If anything just remove the dep
folder and merge that into lib
. For example NifMopp.dll... is there a project for this somewhere with source? The source could instead be included at lib
, and a .PRO file could be generated to allow us to build NifMopp dynamically or statically.
I wouldn't know what to call it as the libs aren't our source.
If include
is used for anything I guess it should be the public interface for anything inside of lib
.
Makes sense. I think it just because I am looking at the current layout and its so cluttered, the proposed structure is perfect, just nitpicking :P
Is there source for NifMopp.dll though? Best I can find is this: https://github.com/Ethatron/nifopt/blob/master/nifopt-hvk.C
The DLL didn't come out of nowhere, and it's not directly from a vendor. I would prefer we have the ability to rebuild such dependencies if we needed to. Especially if we move on to newer compilers. I can't tell you offhand if the DLL would cause issues, but it's probable.
Otherwise we would possibly have to force someone to use an old version if they want to update any MOPP code.
~~Looking about I found this commit - added NifMopp.dll from niftools revision 4012 - (trunk/contrib/niflib/NifMopp/NifMopp.dll). This would suggest that its an external dependency, built via Niflib, Thankfully Skyfox has kept it up to date.~~
Correction, separate project we created. https://github.com/niftools/mopper. Again see Skyfox's fork for any updates.
Nah that's not quite it. It's going to be a file with these functions:
GenerateMoppCode
RetrieveMoppCode
RetrieveMoppScale
RetrieveMoppOrigin
GenerateMoppCodeWithSubshapes
And that nifopt-hkv.c
file definitely fits the bill when it comes to having the proper methods.
Both Mopper and that seem to be for standalone executables though. The nifopt-hvk.c
file being for Ethatron's Nifopt obviously.
Edit: Just noticed the license in the header of that nifopt-hvk.c
file:
Copyright (c) 2006-2008, NIF File Format Library and Tools.
So it must be from somewhere... It just looks to be adapted around Nifopt in Ethatron's case.
Yeah I think Mopper is the version used by pyffi for it Mopp code generation. I would suggest trying to contact either of the two above and see what they know. I know Skyfox had to use a newer version of the Havok SDK for the bhkCompressedMesh generation, but had decoded things to the point the he could write an open source version. He is currently however occupied with work given his post on the forum, but may still respond with general information.
README.txt.in
is basically completely outdated.doxygen_makeapidocs.bat
and doxygen_makeqttag.bat
have hardcoded doxygen executables instead of relying on doxygen being on the path. The latter also assumes a very specific Qt version and path (same goes for the .sh variant).Doxyfile.in
needs paths adjusted, and hardcoded Qt version references removed.sfannounce.txt
... Turn into README.md
for the Github repo main page.docsys
to build
directory? It's only meant to be a pre/post link build step, and has no bearing on the actual source like a lib/dep would.VERSION
to `build directory?build
directory? Or should the only thing in the root be qmake/make files, aside from TXT and .git files?Re point no. 8
QString fname = dir.filePath( "nif.xml" ); // last resort // Try local copy first, docsys, relative from nifskope/release, relative from ../nifskope-build/release, linux data dir. QStringList xmlList( QStringList() << "nif.xml" << "docsys/nifxml/nif.xml" << "../docsys/nifxml/nif.xml" << "../../docsys/nifxml/nif.xml" << "../nifskope/docsys/nifxml/nif.xml" << "../../nifskope/docsys/nifxml/nif.xml" << "/usr/share/nifskope/nif.xml" );
I don't like that hardcoded stuff at all actually. I already took out some code that changes the directory to search for the shaders folder if the EXE is in a folder named "release" or "debug". jonwd7/nifskope@d5875fa3
All that is for is just searching for nif.xml when the application starts. I'm not sure NifSkope should look for the docsys folder at all. It's relevant only to dev builds. I also copy nif.xml to the build folder along with kfm.xml, the lang and shaders folders, and the necessary DLLs (if a non-static build).
Actually that code is only useful if you build NifSkope underneath the project directory, which qmake doesn't like (that's why they're called shadow builds). And even if you wanted to, the qmake script would place the nif.xml alongside the exe.
I could technically leave the /usr/share
bits alone... But I don't like that they're there at all. I could leave them in and wrap them with an #ifdef
so that it only compiles on Linux. The relative paths I don't see the point in.
[WIP]
I put some comments in brackets. To elaborate:
resources
should possibly be moved to their own subdirres\icons
lib
a public interface.build
? Depends on if the .PRO should go inbuild
or the root.Changes will need to be reflected in:
Tracking
Refactor Progress #32