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
Upgrade to Qt 5 #2509
Upgrade to Qt 5 #2509
Conversation
Oh, also, you need to set |
As long as it's a work in progress, you should add the WIP label and once it's ready, ask for a review. |
@oktomus Didn't know I had permissions to label it myself :P |
About what you said on |
For |
Oh, and also, on Windows I would recommend building your own qt5 or using one of these builds: https://github.com/martinrotter/qt5-minimalistic-builds because the standard installers are massive (3.7GB download, what the heck??) |
When building on windows for instance, we specify |
Yes you could, but I don't necessarily see a reason to do that, the Also, evidently my Windows building knowledge is just poor because I just built my modified version of SeExpr and then built appleseed.studio with |
|
@pjessesco Sweet! It should be trivial to also test #2496 if you've gotten this PR working :D |
Travis linux builds are failing. I'm not sure but you may need to update the travis build script. Here is where it failed https://travis-ci.org/appleseedhq/appleseed/jobs/512359848#L796 |
Oh you haven't tested for Qt5 on linux. Maybe I can help with that. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing work, thank you!
cmake/utilities.txt
Outdated
macro (QT5_WRAP_CPP_CPLUSPLUS_FILES outfiles) | ||
QT5_GET_MOC_FLAGS (moc_flags) | ||
|
||
set(options) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For some weird reason we insert a space before parentheses; for consistency's sake, please insert these spaces :)
{ | ||
#ifdef __APPLE__ | ||
// Under certain circumstances (under an macOS virtual machine?), a bogus warning | ||
// message is repeatedly printed to the console. Disable this warning message. | ||
// See https://github.com/appleseedhq/appleseed/issues/254 for details. | ||
if (type == QtWarningMsg && | ||
strcmp(msg, "QCocoaView handleTabletEvent: This tablet device is unknown (received no proximity event for it). Discarding event.") == 0) | ||
msg == "QCocoaView handleTabletEvent: This tablet device is unknown (received no proximity event for it). Discarding event.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if this kludge is still necessary. I'll check once I had it running on a macOS VM.
src/appleseed.studio/main/main.cpp
Outdated
return; | ||
} | ||
|
||
switch (type) | ||
{ | ||
case QtDebugMsg: | ||
fprintf(stderr, "Debug: %s\n", msg); | ||
fprintf(stderr, "Debug: %s\n", msg.toLocal8Bit().constData()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure we want to use toLocal8Bit()
/ fromLocal8Bit()
. Ideally appleseed would internally only handle UTF-8 strings.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could convert these to toUtf8()
/ fromUtf8()
instead... I'm not exactly sure the implications of one or the other to be completley honest, the Local8Bit versions seemed safter but I could be off base on that assumption :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, looks perfect!
This is ready to merge, but we need to wait until appleseedhq/windows-deps#4 in appleseed-deps is in. |
Once this is merged, we will need to update the build guides. |
Dont we need to make it support linux before merging it? |
We should probably test it, yes... it should Just Work TM by pointing it to qt 5 instead of qt4, but... worth a test. |
In any case, the travis linux build script needs to be updated. |
OK, I in theory updated the linux and macos travis build scripts; however, for linux, https://github.com/appleseedhq/prebuilt-linux-deps needs a new release with the patched version of SeExpr |
The prerequisite PR (appleseedhq/windows-deps#4) has been merged. |
It looks like the Linux dependency package needs to be updated:
|
Yep. Let me know if/how I can help with doing so; it should just be a simple rebuild of SeExpr based on my fork. |
I'm testing this PR. I'm getting this warning when running CMake:
We need to silence it. Later, CMake fails to to find Qt 5:
|
I fixed the second error about finding Qt 5 by providing the right path to Qt 5. |
👍🏻 I will investigate probably tomorrow as today is quite busy for me.
…On Mon, Apr 8, 2019 at 7:56 AM François Beaune ***@***.***> wrote:
It builds and runs correctly.
A few small issues:
- The About dialog is missing a title bar and cannot be moved:
[image: image]
<https://user-images.githubusercontent.com/321290/55733618-6dd97f80-5a1e-11e9-8e63-af3c58926962.png>
- List header rows are too thick:
[image: image]
<https://user-images.githubusercontent.com/321290/55733758-af6a2a80-5a1e-11e9-9325-4efb37842238.png>
- There's a bright horizontal line at the bottom of the window when
both the Log and Python Console tabs are shown:
[image: image]
<https://user-images.githubusercontent.com/321290/55734009-18ea3900-5a1f-11e9-8884-6b44ec881d34.png>
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#2509 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AA2Ln0K1rY7rhIoCcy02W-abTTsHk7erks5ve1iFgaJpZM4cNEY3>
.
|
#2184
This is now working! This is a required change for #2393 to work on macOS. Required changes to build:
Windows
In order to build with
WITH_DISNEY_MATERIAL=OFF
, the only change needed is to first download and build (or download a precompiled version of) Qt 5, I tested with the latest Qt 5.12.2. I recommend building from source or using this precompiled version https://github.com/martinrotter/qt5-minimalistic-builds (this is what I tested with) because the official builds are massive.With that done, the cmake command needs to be modified slightly, removing
-DQT_QMAKE_EXECUTABLE
and replacing it with-DCMAKE_PREFIX_PATH
, which should point to the root qt5 folder. For example, for me that is-DCMAKE_PREFIX_PATH=G:\qt5
.Finally, in the Visual Studio solution, the debugging environment variables need to be changed slightly (I'm not sure if this is true with the official builds but it is with the precompiled one I linked), we need to now include
qt5\lib
andqt5\bin
inPATH
. (This is under Environment when you right-click a target and to go properties then select All Configurations).Building with
WITH_DISNEY_MATERIAL=ON
requires a patched SeExpr, and I've made a version ofappleseed-deps
which supports this, https://github.com/termhn/appleseed-deps on theqt5
branch. TheBuildAll.bat
should work. You can also just comment out everything except the SeExpr part of that build script and copy it over to your current appleseed-deps if you have one.macOS
If you built using the recommended way, you'll need to do a couple of homebrew things.
Then when building appleseed without Disney material support, the only change needed is to add the cmake variable
-DCMAKE_PREFIX_PATH
, which should point to the root qt5 folder. For the homebrew installation method, this is/usr/local/opt/qt
, i.e.-DCMAKE_PREFIX_PATH=/usr/local/opt/qt
In order to build with
WITH_DISNEY_MATERIAL=ON
, you'll also need a patched SeExpr. You should be able to do the normal thing with this but just use my fork and check out theappleseed-qt5
branch https://github.com/termhn/SeExpr The only difference is you'll need again need to set-DCMAKE_PREFIX_PATH
to the root of qt5, which for the homebrew installation method is/usr/local/opt/qt
Linux
I haven't tested or attempted, but you should be able to basically follow the macOS instructions but you'll need to figure out how to install or build Qt 5 yourself.