Closed pa-0 closed 1 month ago
Phew, if you manage to build Qt statically it might be ok. Which platform do you want to build for and what are you trying to achieve?
If it's just portability... There is the portable mode.
For now, it's just an experiment, for the sake of learning how / seeing if I can do it. Of course, I recognize there's probably no benefit in doing this -- maybe marginal performance gains on cold-opening the app, but I will benchmark /compare if I manage to get it working.
Beyond that, part-OCD, part-my weird fascination with having applications in the form of single binaries that run with little to no dependencies (save for maybe the runtime).
I don't think this will be a fun endeavor, and it depends a lot on the platform you want to build for. Please let me know how it went. π
Btw. QOwnNotes has no external dependencies but Qt.
Windows 11 64-bit and before you say anything I realize that's probably the worst of the main three! π Am I going to have to revise the .pro files or do QT tools automate most of that once I've built the qt source statically?
A little bit, see https://wiki.qt.io/Build_Standalone_Qt_Application_for_Windows.
Thanks. Will report back with positive results... if any π€·π½ββοΈ
Have fun π
Quick question: I notice in the documentation, you advise that only mingw
toolchain should be used to compile, but in the Build logs^1, it looks like you're using VS. Are the docs up to date or have circumstances changed since that was written?
Those runs are from a PR, @Waqar144 is currently playing around with Microsoft's tool chain.
Yes sorry I should have followed up. I noticed the latest PR after asking about that. Good luck!
-skip qt3d -skip qtandroidextras -skip qtcanvas3d \
-skip qtcharts -skip qtconnectivity -skip qtdatavis3d \
-skip qtdeclarative -skip qtdoc -skip qtgamepad \
-skip qtgraphicaleffects -skip qtimageformats -skip qtlocation \
-skip qtmacextras -skip qtmultimedia -skip qtnetworkauth \
-skip qtpurchasing -skip qtquickcontrols -skip qtquickcontrols2 \
-skip qtscript -skip qtscxml -skip qtsensors \
-skip qtserialbus -skip qtserialport -skip qtspeech \
-skip qtsvg -skip qttools -skip qttranslations \
-skip qtvirtualkeyboard -skip qtwayland -skip qtwebchannel \
-skip qtwebengine -skip qtwebview -skip qtwinextras \
-skip qtx11extras -skip qtxmlpatterns
Also, any idea how these features
fit into the equation?
-no-feature-texthtmlparser -no-feature-textodfwriter -no-feature-concurrent \
-no-feature-effects -no-feature-sharedmemory -no-feature-systemsemaphore \
-no-feature-im -no-feature-process -no-feature-dom \
-no-feature-filesystemmodel -no-feature-filesystemwatcher -no-feature-graphicsview \
-no-feature-graphicseffect -no-feature-sizegrip -no-feature-calendarwidget \
-no-feature-printpreviewwidget -no-feature-keysequenceedit -no-feature-colordialog \
-no-feature-filedialog -no-feature-fontdialog -no-feature-printpreviewdialog \
-no-feature-progressdialog -no-feature-inputdialog -no-feature-errormessage \
-no-feature-wizard -no-feature-datawidgetmapper -no-feature-imageformat_bmp \
-no-feature-imageformat_ppm -no-feature-imageformat_xbm -no-feature-imageformat_png \
-no-feature-imageformat_jpeg -no-feature-image_heuristic_mask -no-feature-image_text \
-no-feature-colornames -no-feature-cups -no-feature-paint_debug \
-no-feature-freetype -no-feature-translation -no-feature-codecs \
-no-feature-big_codecs -no-feature-iconv -no-feature-ftp \
-no-feature-udpsocket -no-feature-networkproxy -no-feature-socks5 \
-no-feature-networkdiskcache -no-feature-bearermanagement -no-feature-completer \
-no-feature-fscompleter -no-feature-desktopservices -no-feature-mimetype \
-no-feature-systemtrayicon -no-feature-undocommand -no-feature-undostack \
-no-feature-undogroup -no-feature-undoview -no-feature-statemachine \
-no-feature-gestures -no-feature-dbus
Also just FYI, I absolutely appreciate how these questions (treating you like qt support) can get incredibly annoying astonishingly fast, so just want to make clear that I will most definitely curb this behavior / refrain from asking anything outside of a narrower QOwnNotes-related scope moving forward π€£
NEVERMIND figured it out. It was actually much simpler than I anticipated (and dreadfully obvious):
QT += core gui widgets sql svg network xml printsupport qml websockets concurrent
I see qt5compat
is no longer required. That's pretty cool. Also much of the documentation I am realizing is irrelevant at this point as QT has deprecated some of the long-standing parameters that used to be standard for configuring the source, e.g. -opensource
is now ignored, or at least soon will be. Caught a bunch of little nuances like this
I see qt5compat is no longer required.
That's right, actually it wasn't for quite a while, but never removed.
Is your feature request related to a problem? Please describe.
I'm currently contemplating building QownNotes into a statically-linked portable executable. I was not super familiar with Qt before, but I've been reading up on it. Note-worthy points (of which you are probably already aware):
All of this in mind, I'd still like to try to take it on. With respect to point 1, let's call it part-learning experience, part-masochism on my part. As for any issues with licensing, my thoughts are that I could figure out how to simplify the process as much as possible (via GitHub workflow most likely) and document the steps for anyone who would like to build it for themselves. This way I avoid violating any licensing terms. If you are interested, I'd be happy to share those docs/scripts with you once I've 'perfected' them.
My question for you: How much revision of the source code / project files would I need to do to get to a place where a build should theoretically succeed (beyond of course building QT static from the source as a prerequisite)?
Describe the solution you'd like
A clear and concise description of what you want to happen.
Describe alternatives you've considered
Additional context