qmc2 / qmc2-mame-fe

QMC2 - M.A.M.E. Catalog / Launcher II
40 stars 3 forks source link

Get rid of QtWebKit, replace it with QtWebEngine #9

Open qmc2 opened 2 years ago

qmc2 commented 2 years ago

This solves a number of problems (less dependencies), however, we also lose something, e.g. the nice WebInspector if there's no alternative.

This will be done later, not in the current release (that is, in 0.244+).

Techwolf commented 2 years ago

Just a note for you. I ported and updated qmc2 ebuild into my local gentoo overlay due to the public overlay was now un-maintained. In doing so, I noted one qtwebkit item and ported/update it.

# QtWebKit got removed in Qt 5.6
sed -e "s:QtWebKit/QWebView:QtWebKitWidgets/QWebView:g" \
        -i src/htmleditor/htmleditor.ui
qmc2 commented 2 years ago

Thanks, that's in "master" now.

Techwolf commented 2 years ago

An update. emerge update world is now "blocked" on my system due to qtwebkit is no longer aviable and the one overlay ebuild is way outdated and is blocking the world update via depensity blockers.

I found a webpage detailing how to update at https://wiki.qt.io/QtWebEngine/Porting_from_QtWebKit .

qmc2 commented 2 years ago

Thanks, that should help! I already did a bunch of work on it but did not release it as it became to an "endless story", because I didn't realize that (for instance) "QWebFrame has been merged into QWebEnginePage" :).

qmc2 commented 2 years ago

There is actually a better page, that is https://doc.qt.io/qt-5/qtwebenginewidgets-qtwebkitportingguide.html

I'm currently "porting" it, but there will remain a number of things that aren't working (as expected). I will not give this code "a go" for release...

qmc2 commented 2 years ago

Part 1 is done: we now support QWebEngine instead of QWebKit. See https://github.com/qmc2/qmc2-mame-fe/commit/5b423e9aea7bc672b879359871a5c4c2b8a50e8d

However, there is still much to do... at least I learned using lambda functions while doing so :).

qmc2 commented 2 years ago

Part 2: Removed two left-overs.

estefan3112 commented 1 year ago

I installed qt5-qtwebengine via MacPorts (very long process) and got a new binary on Apple Silicon!

estefan3112 commented 1 year ago

Happy to report now that with the move to QTWebEngine, compiling under Homebrew works again (and for some reason is less of a hassle than MacPorts).

However, there is one thing I had to change manually now on Apple Silicon:

qmake -makefile -o Makefile.qmake -spec macx-clang-arm64 VERSION=0.244 QMC2_MINGW=0 SDL=2 TARGET=qmc2-sdlmame CONFIG+=warn_off CONFIG+=release 'DEFINES+=QMC2_SDLMAME QMC2_VERSION=0.244 BUILD_OS_NAME=Darwin BUILD_OS_RELEASE=21.6.0 BUILD_MACHINE=arm64 PREFIX=/usr/local DATADIR="/Library/Application:Support" SYSCONFDIR="/Library/Application:Support" QMC2_JOYSTICK=1 QMC2_PHONON=0 QMC2_MULTIMEDIA=1 QMC2_FADER_SPEED=500 QMC2_GIT_REV=v0.243-14-g112724d69 QMC2_MAC_UNIVERSAL=0 QMC2_BROWSER_EXTRAS_ENABLED QMC2_BROWSER_PLUGINS_ENABLED QMC2_BROWSER_JAVA_ENABLED QMC2_BROWSER_JAVASCRIPT_ENABLED QMC2_YOUTUBE_ENABLED QMC2_BUNDLED_MINIZIP QMC2_BUNDLED_ZLIB' qmc2.pro

By default, it is only -spec macx-clang, which fails under Apple Silicon. With this add-on, it compiles.

Cheers!