SDK build environment

I just realized dazstudio SDK is outdated.
i finally found and installed visualstudio 2010.(Service Pack 1)
installed Qt 4.8.7 (32 Bit) I can't find 64 bit!
but still I should find old version of the Cmake that supports VS 2010
I installed all, but windows 7 sdk! I can't!
everything supre outdated (14 years!)
did I missed something? any solution?
someone can tell me structure to build a correct pipeline?
My target Daz version is 4.23 (64 bit) , Can we make 64 bit plugins at all?
Post edited by MehdiZangenehBar on
Comments
Some of the discussion here may be useful https://www.daz3d.com/forums/discussion/673141/developing-in-the-new-version-of-microsoft-visual-studio#latest
Yea, but links are broken, and I still don't get my questions...
Of course you can. If your bin and lib directories don't have x64 subdirectories, then there's something wrong with your SDK install.
The SDK is outdated, but the header files are such that you can compile and link against the latest DS libs.
There is no 32/64 bit version of Qt; it will be whatever you compile it for, which makes me think you might simply not have selected x64 as the architecture.
And I would just skip cmake altogether and just build up your project from the ground up as a Windows DLL project. It's kind of a pain adding the build tool rules for uic and moc, but if you know how to build a Qt app in general, you'll know what to do.
This is becoming strange... I am not an experienced Win32 developer and don't know what I'm doing, but did get VS2022 working, while others have expressed having difficulty. I think I probably made mistakes that somehow offset each other.
In any case, the SDK being old is not an issue as it would appear to be, and you can do what you are trying to do.
OK, my new update:
SDK have 64 bit for sure.
Daz Studio is 64 Bit.
Visual Studio 2010 express installed SP1 (Toolset 100)
Windows 7 SDK already exist in VS 2010 folders.
Cmake 3.24 installed, instead of the latest version : cmake_minimum_required(VERSION 3.4...3.24) and it works perfectly.
The ONLY problem is Qt 4.8.7 64 bit is not exist, we have to build it from the source... (I wish someone have the builded and send me the link)
I just tried 32 bit for test and plugin is created , but not loaded in DazStudio, (Help > About installed plugins, shows Plugin failed to load!)
Are you saying that you only have the DAZStudio4.5+ SDK/bin/Win32 folder and do not have the DAZStudio4.5+ SDK/bin/x64 folder?
Did you follow all the steps in the "Compiling DAZ Studio Plugins on Windows" section of the SDK documentation?
It describes how to setup for building 64 bit.
If you have built a 32bit plugin then I can understand you getting a "Plugin Failed to load" error. I think the 32bit is a carry over from when there was a 32bit version of DAZStudio.
You will need to build x64 plugins for the current DazStudio.
If you still get an error after building a 64bit plugin, have a look in your Daz Studio log file(Help > Troubleshooting > View Log File).
It is always a good starting point for debugging errors. The alternative is to use VS debugging and connect to DazStudio after it starts and before it tries to load your plugin.
I can understand TheMysteryIsThePoint appreciation of VS2022 and dislike of cmake. Myself I much prefer using cmake(when adding a new project) and VS2017. I find that VS2022 will occationally break a project and the simplest solution is to open and build the project in VS2107, most probably because I know VS2017 better than VS2022.
To compile for 64 bit DS you need to select that option in Cmake.
DS 32 still exists.
You don't need to compile it. You've got the DLLs and LIBs already. You just need the headers.
Again, there is no separate 32 or 64 bit release of Qt 4.8.7; it will be for the architecture for which it was compiled.
You want this one.
If you are getting 32 bit build artifacts, it is because that's what you asked for. Set it to x64/Release.
Aha, thanks guys, Yes my target is 64bit. (I don't want 32 bit at all)
Thanks for the Qt, it seems I though wrong, I should reference that from SDK, no need to install separate Qt.
I am struggling with the windows 7 SDK (both online and iso installer), I got error that SDK needs dotnet framework in order to install correctly, I just installed and re installed .Net several times, but still got error.
I guess if I find VisualStudio 2010 professional, I don't have to install windows 7 SDK right?
I recall having some difficulty the last time I installed this SDK.
I have these two links bookmarked, one of which I think helped me resolve the issue.
Also, there are some instances in which you should NOT install "Microsoft Visual C++ 2010 Service Pack 1 Compiler Update for the Windows SDK 7.1" after installing the SDK, but I cannot remember what they are...
Thank you for your helps, I tried several times, but decided to installed Visual Studio 2010 Ultimate, so no need to install windows SDK anymore.
I am still confused about the qt, as we don't have 64 bit version of the qt, i used a command to autocreate moc file.
now project will be builded, plugin is loaded in daz, but i can't find the action: where is my problem?
how i can find the action?
can I check it using dazscript?
https://drive.google.com/file/d/1TB1lTF0RTI6MLwNaVxpO_qTe2erNNeKK/view?usp=drive_link
You need to crate the 64 bit plug-in, using the commands as explained above. Qt 64 already exists and doesn't need creating separately.
This seems like it may be the same phenomenon that I encountered with Sagan. Read the first post in the Sagan topic
I did! did you check the file?
I successfully builded 64 bit version without errors, my question was, did i implemented cmake correctly?
and plugin is loaded successfully, I can see it in plugin window as green
but where is my registered action? why I am not able to find it inside menu or workspace customize window
would you please give me a favor and explain briefly here? instead of link to the thousonds pages that I should read?
Did you define a group(getActionGroup()) for your action? If not then the default is the"Miscellaneous" group. Look in DzStudio > Window > Workspace > Customize > Miscellaneous.
Did you define a default menu(getDefaultMenuPath() for your action? If you did not then the default is for it to not be automatically added to any menu. You will need to go into DzStudio > Window > Workspace > Customize and manually add it to one or more menus.
The SDK documentation has a good example and explanation in the DzAction Class Reference regarding creating actions and what groups and menus they will appear in by default.
Step 1.Create a unique GUID for your action. VS > Tools > Greate GUID
Your GUID should be unique, well as unique as windows will make it. This will identify your action from any other action.
Step 2. In pluginMain.cpp add a line for your action and its GUID example "DZ_PLUGIN_CLASS_GUID(MyAction, 12345678-90AB-CDEF-GHJK-LMNOPQUVXY12".
The GUID should not have any spaces in it.
If you want to be able to call your action from scripts then add the line to export the action.see example in DzAction documentation.
Step 3. In a header and source file define your action based on DzAction. example
MYACTIONS.H
MYACTIONS.CPP
did you checked my file? I did all
https://drive.google.com/file/d/1TB1lTF0RTI6MLwNaVxpO_qTe2erNNeKK/view?usp=drive_link
and there is no "Miscellaneous"
I tried several things, but it seems I am not able to register an action
You are asking people to take donate time to help you, it is reasonable to actually answer their questions rather than present them with a file and expect them to study it for all the details.
did you ask a question? anyone asked a question?
I questioned about the my cmake in the link
I don't get why you tell that?!
please be professional
You hae twice asked if people checked your file in response to suggestions.
I created a simple project based on data that gathered here,
my goal is to step by step develop and correct it to make a starter project.
best way is to share the project, and ask experienced people check it in each step.
so my main challange now is , plugin is builded / loaded, but action is not registered.
Read the first post in the Sagan topic
Thank you, @surreal
You probably just solved the problem for me in Sagan.
@TheMysteryIsThePoint
I undrstand, in order to register an action in menu we should override getActionGroup and getDefaultMenuPath. thanks @surreal
But my problem was, the action was not accicable even with the daz script:
So, where was the problem?! I finally figure it out. my problem was I was trying to use qt 32 headers, instead of 64 headers. I just build 64 bit version of the Qt and everything works just fine,
action is perfectly registered now and it is accicable from menu and also dazscript.
So conclusion from me:
Visual Studio 2010 express needs Windows 7 SDK, Windows 7 SDK needs dotnet framework 4 to install. and tried several times to reinstall everything with different methods, but I failed. so only versions that works this days is Professional or Ultimate versions.
Important part was Qt, Qt 4.8.x 64 bit is not exist, we should build 64 bit version of it. The trick to use Qt sources from DAZStudio4.5+ SDK\bin\x64 and mix it with headers from installed Qt 32 bit is a huge mistake that I did. it will fail to register the actions!
I just use Visual Studio Code and cmake always, so Visual Studio version was not important I think, as we should build using 2010 Toolset v100.
if someone interested to see the final test project, I can share it here.
And thanks everyone who helped me here.
This is getting way out of my comfort zone, so I am just going to pass their through:
Thas't exactly why I questioned: did you checked my cmake file? because it is perfectly targeted 64 bit version of the SDK libraries/binaries, but about the headers, there is no Qt header or cpp files in SDK at all, so we should do? I downloaded qt-opensource-windows-x86-vs2010-4.8.7.exe from https://download.qt.io/archive/qt/4.8/4.8.7/ and updated cmake to address header files ONLY from there. so errors gone and I successfully build the plugin.BUT after thousond try to register a simple action, I failed and action was not registered.
so I downloaded qt-everywhere-opensource-src-4.8.7.zip and builded 64 bit version of it, and just updated the folder path, and this time action was successfully registered.
EDIT:
OK, I should admit that I was wrong, I don't know the cmake version or c_cpp_properties configuration made me confuse about this, however, it seems we don't need to install Qt, and every Qt stuff in SDK works without error. note that I installed cmake 2.24 which is highest version of the cmake that supports VS 2010.
so, you right, we don't need to install qt.
this is my cmakelist: