Discussion:
[Qt-creator] QtCreator support for Unreal Engine 4
Sander Smid
2018-02-09 19:01:41 UTC
Permalink
Hi,

I was wondering if QtCreator could see some improvements in supporting
third-party builds systems and/or integration with bigger projects. Unreal
Engine 4 is one of the biggest game engines and, when you agree with their
terms, you get access to the full source code. This helped quite a bit in
supporting other platforms.

One of the weaker points with this engine is that for each platform you
require to adapt to a another IDE or build process. Unreal uses their own
build system, which can generate projectfiles/-solutions for various other
build systems (e.g. CMake) and IDEs. If QtCreator could integrate better
with UE4 there would be a single IDE that works on all platforms.

The official UE4 docs[1] already mention QtCreator but if you take the time
to look at the steps the integration is very weak. Changing a build target,
variant or platform means changing the builds steps by hand. This is one of
the reasons people often recommend CodeLite for development on Linux
because that IDE allows you to switch target and variant by using the drop
down menus just like you would on Visual Studio.

Is if there is willingness to add UE4 support in QtCreator or are there
ways to improve the current integration?

Cheers,
.san

[1] -
https://docs.unrealengine.com/latest/INT/Platforms/Linux/BeginnerLinuxDeveloper/SettingUpQtCreator/
Tobias Hunger
2018-02-15 11:15:21 UTC
Permalink
Hi Sander,
Post by Sander Smid
I was wondering if QtCreator could see some improvements in supporting
third-party builds systems and/or integration with bigger projects. Unreal
Engine 4 is one of the biggest game engines and, when you agree with
their terms, you get access to the full source code. This helped quite a
bit in supporting other platforms.
I have no plans at this time to support Unreal Engine. Contributions are of course welcome, but I don't think this is something that we should offer in the core Qt Creator. It would be a wonderful 3rd party plugin though.
Post by Sander Smid
One of the weaker points with this engine is that for each platform you require
to adapt to a another IDE or build process. Unreal uses their own build system,
which can generate projectfiles/-solutions for various other build systems
(e.g. CMake) and IDEs. If QtCreator could integrate better with UE4 there
would be a single IDE that works on all platforms.
Sure, Creator is a great IDE and if Unreal sees value in having a nice cross-platform IDE, then they are free to contribute or fork or do whatever the license allows:-) I do not see why the Qt Project should do that work though.
Post by Sander Smid
The official UE4 docs[1] already mention QtCreator
Nice! I was not aware of that.
Post by Sander Smid
but if you take the time
to look at the steps the integration is very weak. Changing a build target,
variant or platform means changing the builds steps by hand. This is one
of the reasons people often recommend CodeLite for development on
Linux because that IDE allows you to switch target and variant by using
the drop down menus just like you would on Visual Studio.
According to the documentation you link you should be able to switch between debug/release via creator's UI just as well, once you did the initial setup.
Post by Sander Smid
Is if there is willingness to add UE4 support in QtCreator
I am willing to answer questions on build system integration into Creator, but I do not plan to work on this myself.
Post by Sander Smid
or are there ways to improve the current integration?
Nothing obvious. Maybe another supported build system would work better than the half-baked .pro-file they ask you to load? I do not have UE around to test, so I don't know.

Best Regards,
Tobias

--
Tobias Hunger, Senior Software Engineer | The Qt Company
The Qt Company GmbH, Rudower Chaussee 13, D-12489 Berlin
Geschäftsführer: Mika Pälsi, Juha Varelius, Mika Harjuaho. Sitz der
Gesellschaft: Berlin, Registergericht: Amtsgericht Charlottenburg, HRB 144331 B
Sander Smid
2018-03-03 08:57:41 UTC
Permalink
Thanks Tobias for your reply.

So I've been looking into what QtCreator already provides, what steps are
already done on the UE4 side of things and what is missing to get proper
integration. What UE4 currently provides is a qmake project file (.pro) and
a few project include files (.pri) which mainly list all the project source
and header files. The UE4.pro file does contain some description of targets
but not all of them are picked up when the user configures the project
file. All of the settings that actually deal with defines (UE4Defines.pri)
seem stubbed and don't contain actual build defines. Probably because it is
required by qmake but simply doesn't have a purpose as UE4 uses its own
build system.

The current UE4 documentation recommends each user needs to create a
UE4.pro.user file in which the qmake build and clean steps are removed and
(manually) replaced with a make command. This is all described in an array
of "ProjectExplorer.Project.Target" structures in the UE4.pro.user that
define the build and run settings. As a quick test I moved that part over
to a UE4.pro.shared file as that file is intended to be shared.
Unfortunately QtCreator prompts me to configure the project so I assume
this isn't supported.
The alternative would be to generate the UE4.pro.user file in a similar way
the .pro file is generated (I should have all the information at that the
moment the .pro and .pri files are being generated) however I got the
impression that is not the recommended way to go about this.

This bring me to the following set of questions:

1. Fixing the qmake build steps:
- Each user currently needs to define their kits (which makes sense as
it includes build target locations) but after generating them not all the
targets as described in UE4.pro are not all available. Can you what steps
are missing here?
- Can you see any reason why the qmake project files are not working?
I know this is a broad question so feel free to skip this.
- Is there any other place than the .pro.user files where QtCreator
stored information about project configurations that might be
relevant (e.g
~/.config)?
2. Use qmake project as a shell for code navigation and focus on getting
build and run configurations working with make:
- I'm thinking to generate a set of "ProjectExplorer.Project.Target"
structures that call 'make' to build the projects. I think I can generate
the structure for a UE4.pro.user but that conflicts with the kit
generation/configure step. Is there any other place where I can
store this
structure so it is available to all users? And is this a sane
approach? I'm
a bit worried about some of the Ids in there (e.g. ProjectExplorer.
ProjectConfiguration.Id and EnvironmentId) will bite me once I got
the UE4.pro.user file generated. Any ideas on that?

For reference I attached the generated .pro and .pri files which might help
filling in the blanks where my explanation (with very limited experience
with qmake) might fall short.

Cheers!
.san
Thanks Tobias for your reply.
So I've been looking into what QtCreator already provides, what steps are
already done on the UE4 side of things and what is missing to get proper
integration. What UE4 currently provides is a qmake project file (.pro) and
a few project include files (.pri) which mainly list all the project source
and header files. The UE4.pro file does contain some description of targets
but not all of them are picked up when the user configures the project
file. All of the settings that actually deal with defines (UE4Defines.pri)
seem stubbed and don't contain actual build defines. Probably because it is
required by qmake but simply doesn't have a purpose as UE4 uses its own
build system.
The current UE4 documentation recommends each user needs to create a
UE4.pro.user file in which the qmake build and clean steps are removed and
(manually) replaced with a make command. This is all described in an array
of "ProjectExplorer.Project.Target" structures in the UE4.pro.user that
define the build and run settings. As a quick test I moved that part over
to a UE4.pro.shared file as that file is intended to be shared.
Unfortunately QtCreator prompts me to configure the project so I assume
this isn't supported.
The alternative would be to generate the UE4.pro.user file in a similar
way the .pro file is generated (I should have all the information at that
the moment the .pro and .pri files are being generated) however I got the
impression that is not the recommended way to go about this.
- Each user currently needs to define their kits (which makes sense as
it includes build target locations) but after generating them not all the
targets as described in UE4.pro are not all available. Can you what steps
are missing here?
- Can you see any reason why the qmake project files are not
working? I know this is a broad question so feel free to skip this.
- Is there any other place than the .pro.user files where QtCreator
stored information about project configurations that might be relevant (e.g
~/.config)?
2. Use qmake project as a shell for code navigation and focus on
- I'm thinking to generate a set of "ProjectExplorer.Project.Target"
structures that call 'make' to build the projects. I think I can generate
the structure for a UE4.pro.user but that conflicts with the kit
generation/configure step. Is there any other place where I can store this
structure so it is available to all users? And is this a sane approach? I'm
a bit worried about some of the Ids in there (e.g. ProjectExplorer.
ProjectConfiguration.Id and EnvironmentId) will bite me once I got
the UE4.pro.user file generated. Any ideas on that?
For reference I attached the generated .pro and .pri files which might
help filling in the blanks where my explanation (with very limited
experience with qmake) might fall short.
Cheers!
.san
Post by Tobias Hunger
Hi Sander,
Post by Sander Smid
I was wondering if QtCreator could see some improvements in supporting
third-party builds systems and/or integration with bigger projects.
Unreal
Post by Sander Smid
Engine 4 is one of the biggest game engines and, when you agree with
their terms, you get access to the full source code. This helped quite a
bit in supporting other platforms.
I have no plans at this time to support Unreal Engine. Contributions are
of course welcome, but I don't think this is something that we should offer
in the core Qt Creator. It would be a wonderful 3rd party plugin though.
Post by Sander Smid
One of the weaker points with this engine is that for each platform you
require
Post by Sander Smid
to adapt to a another IDE or build process. Unreal uses their own build
system,
Post by Sander Smid
which can generate projectfiles/-solutions for various other build
systems
Post by Sander Smid
(e.g. CMake) and IDEs. If QtCreator could integrate better with UE4
there
Post by Sander Smid
would be a single IDE that works on all platforms.
Sure, Creator is a great IDE and if Unreal sees value in having a nice
cross-platform IDE, then they are free to contribute or fork or do whatever
the license allows:-) I do not see why the Qt Project should do that work
though.
Post by Sander Smid
The official UE4 docs[1] already mention QtCreator
Nice! I was not aware of that.
Post by Sander Smid
but if you take the time
to look at the steps the integration is very weak. Changing a build
target,
Post by Sander Smid
variant or platform means changing the builds steps by hand. This is one
of the reasons people often recommend CodeLite for development on
Linux because that IDE allows you to switch target and variant by using
the drop down menus just like you would on Visual Studio.
According to the documentation you link you should be able to switch
between debug/release via creator's UI just as well, once you did the
initial setup.
Post by Sander Smid
Is if there is willingness to add UE4 support in QtCreator
I am willing to answer questions on build system integration into
Creator, but I do not plan to work on this myself.
Post by Sander Smid
or are there ways to improve the current integration?
Nothing obvious. Maybe another supported build system would work better
than the half-baked .pro-file they ask you to load? I do not have UE around
to test, so I don't know.
Best Regards,
Tobias
--
Tobias Hunger, Senior Software Engineer | The Qt Company
The Qt Company GmbH, Rudower Chaussee 13, D-12489 Berlin
GeschÀftsfÌhrer: Mika PÀlsi, Juha Varelius, Mika Harjuaho. Sitz der
Gesellschaft: Berlin, Registergericht: Amtsgericht Charlottenburg, HRB 144331 B
Tobias Hunger
2018-03-05 09:20:40 UTC
Permalink
Hi San,

Before we continue: Creator supports more than just qmake as a build
system. Is there any that works better?
Post by Sander Smid
Thanks Tobias for your reply.
So I've been looking into what QtCreator already provides, what steps are
already done on the UE4 side of things and what is missing to get proper
integration. What UE4 currently provides is a qmake project file (.pro) and
a few project include files (.pri) which mainly list all the project source
and header files. The UE4.pro file does contain some description of targets
but not all of them are picked up when the user configures the project file.
All of the settings that actually deal with defines (UE4Defines.pri) seem
stubbed and don't contain actual build defines. Probably because it is
required by qmake but simply doesn't have a purpose as UE4 uses its own
build system.
The current UE4 documentation recommends each user needs to create a
UE4.pro.user file in which the qmake build and clean steps are removed and
(manually) replaced with a make command. This is all described in an array
of "ProjectExplorer.Project.Target" structures in the UE4.pro.user that
define the build and run settings. As a quick test I moved that part over to
a UE4.pro.shared file as that file is intended to be shared. Unfortunately
QtCreator prompts me to configure the project so I assume this isn't
supported.
Moving that to a .shared file will not work: The kit ids will not
match and then get ignored. Kit-specific stuff like build steps
currently can not effectively get shared in creator.
Post by Sander Smid
The alternative would be to generate the UE4.pro.user file in a similar way
the .pro file is generated (I should have all the information at that the
moment the .pro and .pri files are being generated) however I got the
impression that is not the recommended way to go about this.
I doubt that would work for the same reason as the .shared files fail:
You do not know the right kit Ids to put into the .user file.
Post by Sander Smid
Each user currently needs to define their kits (which makes sense as it
includes build target locations) but after generating them not all the
targets as described in UE4.pro are not all available. Can you what steps
are missing here?
No idea. Everything in a .pro file should get picked up.
Post by Sander Smid
Can you see any reason why the qmake project files are not working?
Bugs? :-)

I am actually not sure whether creator is supposed to show aux targets or not.
Post by Sander Smid
I know
this is a broad question so feel free to skip this.
Is there any other place than the .pro.user files where QtCreator stored
information about project configurations that might be relevant (e.g
~/.config)?
No. All the project-specific data is stored in the .user-file.
Post by Sander Smid
Use qmake project as a shell for code navigation and focus on getting build
Why qmake?
Post by Sander Smid
I'm thinking to generate a set of "ProjectExplorer.Project.Target"
structures that call 'make' to build the projects. I think I can generate
the structure for a UE4.pro.user but that conflicts with the kit
generation/configure step. Is there any other place where I can store this
structure so it is available to all users?
No.
Post by Sander Smid
And is this a sane approach?
No, it is user specific:-/
Post by Sander Smid
I'm
a bit worried about some of the Ids in there (e.g.
ProjectExplorer.ProjectConfiguration.Id and EnvironmentId) will bite me once
I got the UE4.pro.user file generated. Any ideas on that?
It will not work. That is a known problem for a while now.

My plan is to eventually have project-specific wizards that can do the
necessary magic. But those are not there yet (and I am currently
poking into other corners, so do not hold your breath).
Post by Sander Smid
For reference I attached the generated .pro and .pri files which might help
filling in the blanks where my explanation (with very limited experience
with qmake) might fall short.
So basically you are defining custom targets for the things you
actually want to build? I am not sure that this is supported in
creator, it will definitely not be supported well.

Best Regards,
Tobias
Vincent Hui
2018-03-05 11:51:15 UTC
Permalink
Hi San,

I don't know whether it is easier to integrate UE4 into Qt Creator by QBS.
Perhaps it is worth to investitage.

Cheers,
Vincent
Post by Tobias Hunger
Hi San,
Before we continue: Creator supports more than just qmake as a build
system. Is there any that works better?
Post by Sander Smid
Thanks Tobias for your reply.
So I've been looking into what QtCreator already provides, what steps are
already done on the UE4 side of things and what is missing to get proper
integration. What UE4 currently provides is a qmake project file (.pro)
and
Post by Sander Smid
a few project include files (.pri) which mainly list all the project
source
Post by Sander Smid
and header files. The UE4.pro file does contain some description of
targets
Post by Sander Smid
but not all of them are picked up when the user configures the project
file.
Post by Sander Smid
All of the settings that actually deal with defines (UE4Defines.pri) seem
stubbed and don't contain actual build defines. Probably because it is
required by qmake but simply doesn't have a purpose as UE4 uses its own
build system.
The current UE4 documentation recommends each user needs to create a
UE4.pro.user file in which the qmake build and clean steps are removed
and
Post by Sander Smid
(manually) replaced with a make command. This is all described in an
array
Post by Sander Smid
of "ProjectExplorer.Project.Target" structures in the UE4.pro.user that
define the build and run settings. As a quick test I moved that part
over to
Post by Sander Smid
a UE4.pro.shared file as that file is intended to be shared.
Unfortunately
Post by Sander Smid
QtCreator prompts me to configure the project so I assume this isn't
supported.
Moving that to a .shared file will not work: The kit ids will not
match and then get ignored. Kit-specific stuff like build steps
currently can not effectively get shared in creator.
Post by Sander Smid
The alternative would be to generate the UE4.pro.user file in a similar
way
Post by Sander Smid
the .pro file is generated (I should have all the information at that the
moment the .pro and .pri files are being generated) however I got the
impression that is not the recommended way to go about this.
You do not know the right kit Ids to put into the .user file.
Post by Sander Smid
Each user currently needs to define their kits (which makes sense as it
includes build target locations) but after generating them not all the
targets as described in UE4.pro are not all available. Can you what steps
are missing here?
No idea. Everything in a .pro file should get picked up.
Post by Sander Smid
Can you see any reason why the qmake project files are not working?
Bugs? :-)
I am actually not sure whether creator is supposed to show aux targets or not.
Post by Sander Smid
I know
this is a broad question so feel free to skip this.
Is there any other place than the .pro.user files where QtCreator stored
information about project configurations that might be relevant (e.g
~/.config)?
No. All the project-specific data is stored in the .user-file.
Post by Sander Smid
Use qmake project as a shell for code navigation and focus on getting
build
Why qmake?
Post by Sander Smid
I'm thinking to generate a set of "ProjectExplorer.Project.Target"
structures that call 'make' to build the projects. I think I can generate
the structure for a UE4.pro.user but that conflicts with the kit
generation/configure step. Is there any other place where I can store
this
Post by Sander Smid
structure so it is available to all users?
No.
Post by Sander Smid
And is this a sane approach?
No, it is user specific:-/
Post by Sander Smid
I'm
a bit worried about some of the Ids in there (e.g.
ProjectExplorer.ProjectConfiguration.Id and EnvironmentId) will bite me
once
Post by Sander Smid
I got the UE4.pro.user file generated. Any ideas on that?
It will not work. That is a known problem for a while now.
My plan is to eventually have project-specific wizards that can do the
necessary magic. But those are not there yet (and I am currently
poking into other corners, so do not hold your breath).
Post by Sander Smid
For reference I attached the generated .pro and .pri files which might
help
Post by Sander Smid
filling in the blanks where my explanation (with very limited experience
with qmake) might fall short.
So basically you are defining custom targets for the things you
actually want to build? I am not sure that this is supported in
creator, it will definitely not be supported well.
Best Regards,
Tobias
_______________________________________________
Qt-creator mailing list
http://lists.qt-project.org/mailman/listinfo/qt-creator
t***@gmail.com
2018-03-05 12:22:58 UTC
Permalink
Hi,

Indeed this sounds like something you could do with a heavily
customized Qbs project file, using custom rules and similar. Perhaps
try asking on the Qbs mailing list about what you are trying to
accomplish and what specific issues you are facing.

As an aside, qmake is going to be deprecated eventually in favour of
Qbs, so if you start with Qbs, your work is likely to me more future-
proof.

Hope this helps,
Timur
Post by Tobias Hunger
Hi San,
I don't know whether it is easier to integrate UE4 into Qt Creator by
QBS. Perhaps it is worth to investitage.
Cheers,
Vincent
Post by Tobias Hunger
Hi San,
Before we continue: Creator supports more than just qmake as a build
system. Is there any that works better?
Post by Sander Smid
Thanks Tobias for your reply.
So I've been looking into what QtCreator already provides, what
steps are
Post by Sander Smid
already done on the UE4 side of things and what is missing to get
proper
Post by Sander Smid
integration. What UE4 currently provides is a qmake project file
(.pro) and
Post by Sander Smid
a few project include files (.pri) which mainly list all the
project source
Post by Sander Smid
and header files. The UE4.pro file does contain some description
of targets
Post by Sander Smid
but not all of them are picked up when the user configures the
project file.
Post by Sander Smid
All of the settings that actually deal with defines
(UE4Defines.pri) seem
Post by Sander Smid
stubbed and don't contain actual build defines. Probably because
it is
Post by Sander Smid
required by qmake but simply doesn't have a purpose as UE4 uses
its own
Post by Sander Smid
build system.
The current UE4 documentation recommends each user needs to
create a
Post by Sander Smid
UE4.pro.user file in which the qmake build and clean steps are
removed and
Post by Sander Smid
(manually) replaced with a make command. This is all described in
an array
Post by Sander Smid
of "ProjectExplorer.Project.Target" structures in the
UE4.pro.user that
Post by Sander Smid
define the build and run settings. As a quick test I moved that
part over to
Post by Sander Smid
a UE4.pro.shared file as that file is intended to be shared.
Unfortunately
Post by Sander Smid
QtCreator prompts me to configure the project so I assume this
isn't
Post by Sander Smid
supported.
Moving that to a .shared file will not work: The kit ids will not
match and then get ignored. Kit-specific stuff like build steps
currently can not effectively get shared in creator.
Post by Sander Smid
The alternative would be to generate the UE4.pro.user file in a
similar way
Post by Sander Smid
the .pro file is generated (I should have all the information at
that the
Post by Sander Smid
moment the .pro and .pri files are being generated) however I got
the
Post by Sander Smid
impression that is not the recommended way to go about this.
You do not know the right kit Ids to put into the .user file.
Post by Sander Smid
Each user currently needs to define their kits (which makes sense
as it
Post by Sander Smid
includes build target locations) but after generating them not
all the
Post by Sander Smid
targets as described in UE4.pro are not all available. Can you
what steps
Post by Sander Smid
are missing here?
No idea. Everything in a .pro file should get picked up.
Post by Sander Smid
Can you see any reason why the qmake project files are not
working?
Bugs? :-)
I am actually not sure whether creator is supposed to show aux targets or not.
Post by Sander Smid
I know
this is a broad question so feel free to skip this.
Is there any other place than the .pro.user files where QtCreator
stored
Post by Sander Smid
information about project configurations that might be relevant
(e.g
Post by Sander Smid
~/.config)?
No. All the project-specific data is stored in the .user-file.
Post by Sander Smid
Use qmake project as a shell for code navigation and focus on
getting build
Why qmake?
Post by Sander Smid
I'm thinking to generate a set of
"ProjectExplorer.Project.Target"
Post by Sander Smid
structures that call 'make' to build the projects. I think I can
generate
Post by Sander Smid
the structure for a UE4.pro.user but that conflicts with the kit
generation/configure step. Is there any other place where I can
store this
Post by Sander Smid
structure so it is available to all users?
No.
Post by Sander Smid
And is this a sane approach?
No, it is user specific:-/
Post by Sander Smid
I'm
a bit worried about some of the Ids in there (e.g.
ProjectExplorer.ProjectConfiguration.Id and EnvironmentId) will
bite me once
Post by Sander Smid
I got the UE4.pro.user file generated. Any ideas on that?
It will not work. That is a known problem for a while now.
My plan is to eventually have project-specific wizards that can do the
necessary magic. But those are not there yet (and I am currently
poking into other corners, so do not hold your breath).
Post by Sander Smid
For reference I attached the generated .pro and .pri files which
might help
Post by Sander Smid
filling in the blanks where my explanation (with very limited
experience
Post by Sander Smid
with qmake) might fall short.
So basically you are defining custom targets for the things you
actually want to build? I am not sure that this is supported in
creator, it will definitely not be supported well.
Best Regards,
Tobias
_______________________________________________
Qt-creator mailing list
http://lists.qt-project.org/mailman/listinfo/qt-creator
_______________________________________________
Qt-creator mailing list
http://lists.qt-project.org/mailman/listinfo/qt-creator
Tobias Hunger
2018-03-05 13:23:29 UTC
Permalink
Hi,

I would personally look at something more battle-hardened than qbs,
especially considering that UE4 already supports more build systems
from what I understand.

Maybe one of those that are already supported will work better with Qt
Creator than qmake already? CMake is a likely candidate, as that will
most likely have seen way more testing and polish than the .pro files
on the UE4 side.
Post by t***@gmail.com
As an aside, qmake is going to be deprecated eventually in favour of
Qbs, so if you start with Qbs, your work is likely to me more future-
proof.
I am not aware that this decision has been made yet: It's still up to
the Qt Project to decide on that eventually. And Qbs needs a serious
amount of non-trivial work between now and then.

Best Regards,
Tobias
t***@gmail.com
2018-03-05 13:47:10 UTC
Permalink
Post by Tobias Hunger
Post by t***@gmail.com
As an aside, qmake is going to be deprecated eventually in favour of
Qbs, so if you start with Qbs, your work is likely to me more future-
proof.
I am not aware that this decision has been made yet: It's still up to
the Qt Project to decide on that eventually. And Qbs needs a serious
amount of non-trivial work between now and then.
Sorry if I was wrong, this is where I got the idea:

http://blog.qt.io/blog/2017/05/29/qbs-1-8-released/
"The Qt Company’s latest build tool, which is planned to be the
replacement for qmake in the Qt 6 build system."

Loading...