pixaline / parupaint Goto Github PK
View Code? Open in Web Editor NEWa multiplayer drawing and animation program
Home Page: http://parupaint.sqnya.se
a multiplayer drawing and animation program
Home Page: http://parupaint.sqnya.se
In an Archlinux variant called Artix. I have both qt5-base and ffmpeg installed, but it fails to build.
qmake && make release
make -f Makefile.Release
make[1]: Entering directory '/home/****/github/parupaint'
g++ -c -pipe -std=c++11 -Wfatal-errors -fdiagnostics-color=auto -O2 -std=gnu++11 -Wall -Wextra -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_CORE_LIB -I. -Isrc/bundled/ffmpeg -I/usr/include/qt -I/usr/include/qt/QtWidgets -I/usr/include/qt/QtGui -I/usr/include/qt/QtNetwork -I/usr/include/qt/QtXml -I/usr/include/qt/QtCore -I.obj/moc -I/usr/lib/qt/mkspecs/linux-g++ -o .obj/parupaintAVWriter.o src/core/parupaintAVWriter.cpp
src/core/parupaintAVWriter.cpp: In destructor ‘ParupaintAVWriter::~ParupaintAVWriter()’:
src/core/parupaintAVWriter.cpp:35:51: warning: ‘AVStream::codec’ is deprecated [-Wdeprecated-declarations]
35 | if(video_stream) pp_avcodec_close(video_stream->codec);
| ^~~~~
In file included from src/core/parupaintAVWriter.cpp:9:
/usr/include/libavformat/avformat.h:880:21: note: declared here
880 | AVCodecContext *codec;
| ^~~~~
src/core/parupaintAVWriter.cpp:35:51: warning: ‘AVStream::codec’ is deprecated [-Wdeprecated-declarations]
35 | if(video_stream) pp_avcodec_close(video_stream->codec);
| ^~~~~
In file included from src/core/parupaintAVWriter.cpp:9:
/usr/include/libavformat/avformat.h:880:21: note: declared here
880 | AVCodecContext *codec;
| ^~~~~
src/core/parupaintAVWriter.cpp:35:51: warning: ‘AVStream::codec’ is deprecated [-Wdeprecated-declarations]
35 | if(video_stream) pp_avcodec_close(video_stream->codec);
| ^~~~~
In file included from src/core/parupaintAVWriter.cpp:9:
/usr/include/libavformat/avformat.h:880:21: note: declared here
880 | AVCodecContext *codec;
| ^~~~~
src/core/parupaintAVWriter.cpp: In constructor ‘ParupaintAVWriter::ParupaintAVWriter(QString, int, int, int)’:
src/core/parupaintAVWriter.cpp:72:21: warning: ‘void av_register_all()’ is deprecated [-Wdeprecated-declarations]
72 | ppavfunc(avformat, av_register_all);
| ^~~~~~~~~~~~~~~
src/core/parupaintAVWriter.cpp:19:48: note: in definition of macro ‘ppavfunc’
19 | #define ppavfunc(l, f) auto pp_##f = decltype(&f)( l.resolve(#f)); if(!pp_##f) errorCancel("Function pp_" #f " in " #l " could not be loaded.")
| ^
In file included from src/core/parupaintAVWriter.cpp:9:
/usr/include/libavformat/avformat.h:2050:6: note: declared here
2050 | void av_register_all(void);
| ^~~~~~~~~~~~~~~
src/core/parupaintAVWriter.cpp:72:21: warning: ‘void av_register_all()’ is deprecated [-Wdeprecated-declarations]
72 | ppavfunc(avformat, av_register_all);
| ^~~~~~~~~~~~~~~
src/core/parupaintAVWriter.cpp:19:48: note: in definition of macro ‘ppavfunc’
19 | #define ppavfunc(l, f) auto pp_##f = decltype(&f)( l.resolve(#f)); if(!pp_##f) errorCancel("Function pp_" #f " in " #l " could not be loaded.")
| ^
In file included from src/core/parupaintAVWriter.cpp:9:
/usr/include/libavformat/avformat.h:2050:6: note: declared here
2050 | void av_register_all(void);
| ^~~~~~~~~~~~~~~
src/core/parupaintAVWriter.cpp:121:32: warning: ‘AVStream::codec’ is deprecated [-Wdeprecated-declarations]
121 | codec_context = video_stream->codec;
| ^~~~~
In file included from src/core/parupaintAVWriter.cpp:9:
/usr/include/libavformat/avformat.h:880:21: note: declared here
880 | AVCodecContext *codec;
| ^~~~~
src/core/parupaintAVWriter.cpp:121:32: warning: ‘AVStream::codec’ is deprecated [-Wdeprecated-declarations]
121 | codec_context = video_stream->codec;
| ^~~~~
In file included from src/core/parupaintAVWriter.cpp:9:
/usr/include/libavformat/avformat.h:880:21: note: declared here
880 | AVCodecContext *codec;
| ^~~~~
src/core/parupaintAVWriter.cpp:121:32: warning: ‘AVStream::codec’ is deprecated [-Wdeprecated-declarations]
121 | codec_context = video_stream->codec;
| ^~~~~
In file included from src/core/parupaintAVWriter.cpp:9:
/usr/include/libavformat/avformat.h:880:21: note: declared here
880 | AVCodecContext *codec;
| ^~~~~
src/core/parupaintAVWriter.cpp:136:83: error: ‘CODEC_FLAG_GLOBAL_HEADER’ was not declared in this scope; did you mean ‘AV_CODEC_FLAG_GLOBAL_HEADER’?
136 | if (format_context->oformat->flags & AVFMT_GLOBALHEADER) codec_context->flags |= CODEC_FLAG_GLOBAL_HEADER;
| ^~~~~~~~~~~~~~~~~~~~~~~~
| AV_CODEC_FLAG_GLOBAL_HEADER
compilation terminated due to -Wfatal-errors.
make[1]: *** [Makefile.Release:973: .obj/parupaintAVWriter.o] Error 1
make[1]: Leaving directory '/home/****/github/parupaint'
make: *** [Makefile:42: release] Error 2
and with -config noffmpeg
❯ qmake -config noffmpeg && make release
Project MESSAGE: Compiling without ffmpeg support.
make -f Makefile.Release
make[1]: Entering directory '/home/****/github/parupaint'
g++ -c -pipe -std=c++11 -Wfatal-errors -fdiagnostics-color=auto -O2 -std=gnu++11 -Wall -Wextra -D_REENTRANT -fPIC -DPARUPAINT_NOFFMPEG -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_CORE_LIB -I. -Isrc/bundled/ffmpeg -I/usr/include/qt -I/usr/include/qt/QtWidgets -I/usr/include/qt/QtGui -I/usr/include/qt/QtNetwork -I/usr/include/qt/QtXml -I/usr/include/qt/QtCore -I.obj/moc -I/usr/lib/qt/mkspecs/linux-g++ -o .obj/parupaintBrush.o src/core/parupaintBrush.cpp
g++ -c -pipe -std=c++11 -Wfatal-errors -fdiagnostics-color=auto -O2 -std=gnu++11 -Wall -Wextra -D_REENTRANT -fPIC -DPARUPAINT_NOFFMPEG -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_CORE_LIB -I. -Isrc/bundled/ffmpeg -I/usr/include/qt -I/usr/include/qt/QtWidgets -I/usr/include/qt/QtGui -I/usr/include/qt/QtNetwork -I/usr/include/qt/QtXml -I/usr/include/qt/QtCore -I.obj/moc -I/usr/lib/qt/mkspecs/linux-g++ -o .obj/parupaintBrushGlass.o src/core/parupaintBrushGlass.cpp
g++ -c -pipe -std=c++11 -Wfatal-errors -fdiagnostics-color=auto -O2 -std=gnu++11 -Wall -Wextra -D_REENTRANT -fPIC -DPARUPAINT_NOFFMPEG -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_CORE_LIB -I. -Isrc/bundled/ffmpeg -I/usr/include/qt -I/usr/include/qt/QtWidgets -I/usr/include/qt/QtGui -I/usr/include/qt/QtNetwork -I/usr/include/qt/QtXml -I/usr/include/qt/QtCore -I.obj/moc -I/usr/lib/qt/mkspecs/linux-g++ -o .obj/parupaintCommonOperations.o src/core/parupaintCommonOperations.cpp
g++ -c -pipe -std=c++11 -Wfatal-errors -fdiagnostics-color=auto -O2 -std=gnu++11 -Wall -Wextra -D_REENTRANT -fPIC -DPARUPAINT_NOFFMPEG -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_CORE_LIB -I. -Isrc/bundled/ffmpeg -I/usr/include/qt -I/usr/include/qt/QtWidgets -I/usr/include/qt/QtGui -I/usr/include/qt/QtNetwork -I/usr/include/qt/QtXml -I/usr/include/qt/QtCore -I.obj/moc -I/usr/lib/qt/mkspecs/linux-g++ -o .obj/parupaintFrame.o src/core/parupaintFrame.cpp
src/core/parupaintFrame.cpp: In member function ‘QRect ParupaintFrame::drawLine(const QLineF&, QPen)’:
src/core/parupaintFrame.cpp:143:17: error: aggregate ‘QPainterPath path’ has incomplete type and cannot be defined
143 | QPainterPath path;
| ^~~~
compilation terminated due to -Wfatal-errors.
make[1]: *** [Makefile.Release:987: .obj/parupaintFrame.o] Error 1
make[1]: Leaving directory '/home/****/github/parupaint'
make: *** [Makefile:42: release] Error 2
Alright, first issue! One that i need help with.
So in the networking code (src/net/parupaintClient.cpp
) there is code for reconnecting to another host, called when the user clicks the "Connect" button in the connection dialog. It's supposed to disconnect you from your server locally and immediately reconnect you to the new host. However, this does not seem to work.
Connecting to "ws://x.x.x.x" 1108
QAbstractSocket::connectToHost() called when already looking up or connecting/connected to "x.x.x.x"
The socket gives this error message (x.x.x.x being the IP i want to connect to) which is very strange since i connect only when the connection status of the socket resets to unconnected state. I don't know why it happens. I've tried abort() on the socket as well, but it didn't work. Bug maybe?
I had an idea that i could use a QTimer instead to delay the connection to the new server, but i don't know how well that'd work. I also have another plan, a "workaround", and it is to replace the "Connect" button in the connection dialog with a "disconnect" button if you are connected, so that you manually disconnect and connect to the server yourself.
But the problem is, since parupaint is heavily focused as a server <-> client, i would rather avoid the whole disconnection thing since it breaks a lot of things!...
Thoughts? Other suggestions? Don't be afraid to say what you think...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.