-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Setting up QtCreator (Guide + Scripts) #4934
Comments
good beginning/ first issue :+1 |
@JohannesLorenz can you explain what these auto-config scripts are for and an example of another project that use scripts for setup? For example, I'm familiar with the ability for Java projects with IntelliJ IDEA to run tasks at start, but when the environment is missing stuff, it's not really much better than just placing it into the build logic (e.g. I think setting up the code editor is not a two-hour task, but rather a 2-minute task. I feel the gap is mostly in formatting (as we've identified in other bug reports) as well as non-IDE aware CMakeLists but even then the learning curve is just lack of familiarity. Working to improve this is tricky. For example, Qt5 is provided with Qt Creator, but we try to find it anyway. I've started to address the Qt5 detection scenario here (superseded -- in part -- by MSVC commits to master/work from others) but the general idea is that the project can be complied by CLI or IDE equally and that the assumption of a Qt runtime that's provided by the IDE should be automatic and transparent to the average user looking to hack at a few lines of code. Using Qt Creator can be summarized with videos that can also save a bunch of time. So far, the only attempts I've seen to do this was done by @curlymorphic. Here are the tutorials: http://youtu.be/XTWnQPGL9xs What I think is important is that a good idea today is better than a great idea tomorrow. If Qt Creator is to be embraced, put something in the wiki helping others. As people start to use it, it can be improved. @cubician (renamed or deleted his github apparently) is our official YouTube tutorial maker, perhaps he's interested in making an updated version of @curlymorphic videos. |
(I was mostly referring to the Linux situation, I can't speak for the other OSes) Initially, you have to run
This patching is already complicated. Also, when you switch branches (I do multiple times a day), you can
That's why I'm writing a WIP generator script that
More stuff can be done. E.g. patching the
|
I've never had to do these things described. Running qmake seems like the wrong way though. |
Did you maybe import the CMakeLists instead? |
Yes, of course. |
I found it confusing when importing CMakeLists (see the images above) - the additional CMake tree level, and finding out that the sources are in "src/lmmsobjs/". Maybe I'll get used to it... What do others use? |
I see the |
I'm not getting QtCreator set up properly with CMake. If I use a CMake project, hold the mouse over |
Just saw this. I'll take a look at those videos and work on understanding using QtCreator enough to make a tutorial. |
@iansannar how far are you with the tutorial? 😄 |
I'll make a video tutorial now, unless anyone else wants to do it (or has already done it). |
Motivation
It's important to have your IDE setup correctly before coding the first line. It will:
Everyone can use their favourite IDE, but QtCreator is one of the most popular, and it's practical for dealing with Qt code. It's not worth for every programmer to
No one wants to mess around with that for every branch. It's probably also annoying for LMMS beginners to say: "Welcome to LMMS, before you code, please spend 2 hours getting your IDE ready". They might prefer a "Hello, just run
generate-project.sh
and start coding immediatelly".That is why we should make it as easy as possible to set this up.
Proposals
a. One way is to use QtCreator's CMake importer. That usually works flawless, but the file tree can look a bit unordered.
b. We could also autogenerate project files using a script. Questions:
a. QtCreator allows importing XML code style files. We should deliver one.
b. You can use clang-format to re-format existing files ( Add .clang-format and .clang-tidy #4690 ), but you'll rarely need this.
Summary
Maybe something like this?
The text was updated successfully, but these errors were encountered: