Open JohannesLorenz opened 5 years ago
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. cmake
, or in the case of Java, maven
or ant
.).
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 http://youtu.be/3OzGXfm6fqE
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 qmake
and then patch variables:
QT += xml core gui widgets
INCLUDES += . build/ build/src /usr/include/lilv-0
and probably more, e.g. rpmallocDEFINES += ...
This patching is already complicated. Also, when you switch branches (I do multiple times a day), you can
qmake
again, patching all those variables again, wasting 5 minutesHEADERS+=
, SOURCES+=
). But if you have 5 or 10 new files, and make typos (was that cpp file now in src/tracks
, src/gui
or src/gui/widgets
?)...That's why I'm writing a WIP generator script that
qmake
QT
, INCLUDES
, DEFINES
for youMore stuff can be done. E.g. patching the .pro.user
file, such that it sets the following automatically
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 lmmsobjs
folder structure a terrible argument to move away from an off-the-shelf solution that is used by millions.
I'm not getting QtCreator set up properly with CMake. If I use a CMake project, hold the mouse over Effect::processAudioBuffer
and press ctrl+shift+u, it shows usages in include and plugins, but not in core. Does that work for you?
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? :smile:
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
Summary
Maybe something like this?