Build doc sets in Xcode 4 using Doxygen - xcode4

HOw do I build docsets in Xcode 4 with Doxygen?
Apple's documentation refers to Xcode 3 and doesn't seem to apply to Xcode 4.
I think it might have to use a schemas (schemata?) rather than targets, but I'm not 100% certain.
Thanks in advance...

You can build documentation as part of a dedicated target:
In the project navigator, click on the project.
In the right pane, add a new aggregate target (in MacOSX/Other) and name it Documentation
In this target, add a new Run Script build phase
In this build phase, invoke the Doxygen command line:
/Applications/Doxygen.app/Contents/Resources/doxygen
Once the DocSet is built, copy it into /Users/<YourName>/Library/Developer/Shared/Documentation/DocSets folder.
The new docset should appear into the help browser.

It seems documentation for Xcode 3 works fine with Xcode 4.
I followed instructions (see Using Doxygen to Create Xcode Documentation Sets on Documentation) and everything is fine excerpt Xcode does not load the brand new docset.
I then examined the AppleScript command on the given run script and tested it on AppleScript editor : execution result was false. Error was the name of the docset file was missing.
By adding the docset filename the AppleScript script run successfully and the docset is well inserted to documentation :
Before :
echo "load documentation set with path \"/Users/$USER/Library/Developer/Shared/Documentation/DocSets/\""
After :
echo "load documentation set with path \"/Users/$USER/Library/Developer/Shared/Documentation/DocSets/com.mycompany.DoxygenExample.docset\""

Related

QtCreator - no rule to make target when building windeployqt

I have installed C:\Qt\5.6\ on Windows 10. I have started QtCreator from there, and opened C:\Qt\5.6\Src\qttools\qttools.pro in it. I expanded the node, and right-clicked on designer and did Build "designer", it built fine (using mingw)
Now, I try to do the same for windeployqt, but it fails with:
:-1: error: No rule to make target 'C:/Qt/5.6/mingw49_32/lib/libQt5Bootstrapd.a', needed by '..\..\bin\windeployqt.exe'. Stop.
What am I missing, and how can I get windeployqt to compile?
Ok, I think I got it. First, I tried looking for *bootstrap* named files in C:\Qt, and it turns out, this file exists:
C:\Qt\5.6\mingw49_32\lib\libQt5Bootstrap.a
So, the only difference from the filename in the error message, libQt5Bootstrapd.a, is that there isn't a d at the end of the filename (without the extension) - and then I remembered, that d probably represents a Debug version of the .a library.
As you can see on the screenshot, there is a button down left in the Qt Creator GUI, where it says "qttools ... (monitor icon) ... Debug". This is "Deploy Configuration" - I clicked there, and set the Deploy Configuration to "Release" - and then tried building windeployqt again - and this time, it worked without an error message.

How to pass cmake arguments using Qt Creator interface and settings

I'm trying to figure out how to use Qt Creator's settings and pass some CMake arguments. Let's say I have an app which I can build using the terminal like so:
cmake .. -DQTDIR=/home/myCustomBuildStuff
-DLD_LIBRARY_PATH=/home/myCustomBuildStuff
-DCMAKE_INCLUDE_PATH=/home/myCustomBuildStuff/include
# etc.
As you can see, I'm using my custom built Qt (plus some other libs). When I build using the terminal, everything works.
But now I want to try to use the Qt Creator and pass all the CMake arguments by using the Qt Creator settings.
I tried to use the CMake Configuration settings that can be found in the Kits. I tried to modify the Build Settings, and add my arguments directly to the Build Steps and/or CMake table above. None of that helps and my app fails to include my custom built QtWidgets from main.cpp:
/usr/lib/x86_64-linux-gnu/libQt5Core.so.5:-1: error:
version 'Qt_5.9' not found (required by home/myCustomBuiltStaff/bin/uic)
In the error above the path is obviously wrong (it needs to search in /home/myCustomBuiltStuff/ folder). But how do I pass that path by using the Qt Creator settings?
Note, I cannot touch the content of the CMake file and only want to make it to build as it builds in my terminal when I pass all the paths as arguments to CMake.
So I followed an advice given in the comment, and had to add my own custom build steps in order to make sure I have the wanted CMake arguments passed correctly. I could not find any other way to pass them by using Qt Creator's settings and menus.
This is the list of steps I did:
Go to Projects and chose the Build to edit. If you have several configurations, you will have to repeat the below steps for each.
Disable or delete the default CMake step, normally it would be something like cmake --build . --target all
Chose your Build directory.
Add new Custom process step with Command to be cmake, Arguments to be your CMake arguments; normally you'd leave the Working directory to default.
Add new Custom process step with Command to be make and add any necessary arguments (e.g. LD_LIBRARY_PATH).
Go and edit the Run settings: make sure the Executable points to the one your cmake and make just created. There you can also add any necessary command line arguments.
This is version 4.3.1 I am using. If not yet done you should have the most updated version of qtcreator.
File->Open:
Choose the CMakeLists.txt file of your project. Select your target and you should be able to get the project open at least.
Now click on "Projects". Assure you have selected Build & Run -> Build and under Cmake click on "Add" -> "String" or "Directory". In your case Directory make more sense. On the left you put the define, without "-D" of course and right side the value.
Repeat the step for every variable you want to define and click on "Apply"
If that does not work I would try to set the CMAKE_EXE_LINKER_FLAGS to -L/home/myCustomBuildStuff
Hint: To see if it worked you can pass VERBOSE=1 parameter to toolparameters if you are using makefiles under the section Build steps. That way your output will show if the variable were really passed.
Hint: Remeber to activate the "Advanced" selection so you see more if not all the variables defined fo Cmake.

Android SDK MonkeyRunner 25.3.2 Won't Run

So I upgraded Android SDK tools today and now I'm having a problem getting monkeyrunner to run. I did the standard which is (from the command prompt)
D:\Android\SDK\tools\bin\monkeyrunner.bat D:\ScriptName.py
Note 1: The directory of monkeyrunner.bat changed in this release, so I had to update my command line accordingly.
That fails with the message:
SWT Folder '..\framework\x86_64' does not exist.
I can fix that by editing monkeyrunner.bat and instead of having frameworkdir be set to 'lib' it gets set to '..\lib', the actual location of the monkey runner jar file.
However, when I implement this fix it then gives the error:
Cannot run program "..\framework\adb.exe" cannot find the file specified.
I'm kind of stuck here because no matter what I change in monkeyrunner.bat I get the same message, which indicates to me that the jar file has this directory hardcoded in it or something. It should probably be "....\platform-tools\adb.exe"
Any help would be appreciated.
-open monkeyrunner.bat in notepad
change set frameworkdir=. to set frameworkdir=..\lib everywhere
find the line call "%java_exe%" -Xmx512m "-Djava.ext.dirs=%frameworkdir%;%swt_path%" -Dcom.android.monkeyrunner.bindir= -jar %jarpath% %*
change the value of Dcom.android.monkeyrunner.bindir to the path of the folder containing adb.exe. Mine was under platform-tools

Can't run qt commands like qtviewer

I am new to Qt so I follow a tutorial on QML. It starts with a basic qml file which should be run with qmlviewer.
The problem is that when I start qmlviewer it says
qmlviewer: could not exec '/usr/lib/qt/bin/qmlviewer': No such file or directory
whereis qmlviewer tells me that it's location is /usr/bin/qmlviewer so I try to run it with this absolute path, but I still get the same error
qmlviewer: could not exec '/usr/lib/qt/bin/qmlviewer': No such file or directory
Why is it still looking for that location ? How can I solve this ?
I should mention that I have tried qtconfig just for testing, and I still get the error, so this is a global Qt problem.
Thank you
As said in the documentation : http://doc.qt.io/qt-5/qtquick-porting-qt5.html
The qmlviewer tool provided for prototyping and testing QML
applications in Qt 4.x has been replaced with the qmlscene tool which
integrates with the new scenegraph features in Qt 5.
So using qmlscence all works.

Setup of Qt Creator to debug into Qt classes

I want to setup Qt Creator (3.0) in a way, that I can debug into the Qt classes. So I download the corresponding src code (http://gitorious.org/qt/qt5) and install it in a directory (e.g. c:\Qt5\src).
Then I have my own project. Where do I need to set the source code path of Qt (c:\Qt5\src), so I can debug my code, but also into a Qt class where necessary.
-- Edit:Pavel's comment --
Pavel has given a good hint: But I am using a precompiled version of Qt/Qt Creator. So I am basically looking for a solution which does not require me to compile from source. Nevertheless a useful hint. Thanks.
If you are using a prebuilded version just remap the source code location as described in http://doc.qt.io/qtcreator/creator-debugger-engines.html
Mapping Source Paths
To enable the debugger to step into the code and display the source
code when using a copy of the source tree at a location different from
the one at which the libraries where built, map the source paths to
target paths:
Select Tools > Options > Debugger > General > Add.
In the Source path field, specify the source path in the debug information of the executable as reported by the debugger.
In the Target path field, specify the actual location of the source tree on the local machine.
To get "the source path in the debug information of the executable as reported by the debugger", you can activate the "Use Tooltips in Stack-View when Debugging" option by right-clicking in the Stack View and move the mouse over a specific function call.
If you look into the tooltips, you will see references to /Users/qt/work, the Mac deployed debug symbols are pointing there. Of course, this is not documented, as these folks want you to buy enterprise.
If you create the /Users/qt/work directory (as root), then make a soft link to your source directory named qt, everything will work. No need to build anything from source (under Mac that would result in tens of gigs wasted). Same considerations about plugins
Example:
sudo -s
mkdir /Users/qt
cd /Users/qt
mkdir work
cd work
ln -s /Users/your_user_name/Qt/your_qt_release/Src qt
Everything will work. Any source mapping failed here, so leave those alone.
Hope this helps
With Xcode, before you step into the Qt library the first time, enter the following command in the LLDB window:
settings set target.source-map /Users/qt/work/qt /path/to/Qt/5.10.1/Src
(Obviously you'll want to change the version number, as relevant).
But suppose Trolltech changes its build directory, what to do then? (Or, how did the community wiki that gave the /Users/qt/work/qt path find it?) You can guess what the path needs to be by editing /path/to/Qt/5.10.1/clang_64/lib/QtCore.framework.dSYM/Contents/Resources/DWARF/QtCore_debug (or any other Qt library) and searching for some paths. "/Users" seems like a good guess. About 2% into the library you'll start seeing sections with a lot of paths like:
../../include/QtCore/../../src/corelib/kernel^#../../include/QtCore
/../../src/corelib/tools^#global^#/Users/qt/work/qt/qtbase/src/corelib
/../../include/QtCore/../../src/corelib/arch^#/Applications/Xcode.app
/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/<etc>
Look for an absolute path that looks like it could be writable. (/Applications/... would not be a likely build path, for example)
In recent Qt creator (v 4.11) press button "Add Qt Sources"
in Tools > Options > Debugger > General
and select Qt sources file.
Qt5 should be installed by online installer with checked "Qt Debug Information files".
Follow the instructions from Qt here:
"In the run configuration, select Use debug version of frameworks."

Resources