static linked openssl in Qt, gobject dynamic linked, moved gtk/appindicator init after Qt Application creation, trying to enable rdynamic flag
This commit is contained in:
		
							parent
							
								
									6a299e32d3
								
							
						
					
					
						commit
						23a8090a73
					
				
					 9 changed files with 65 additions and 23 deletions
				
			
		
							
								
								
									
										13
									
								
								QTCREATOR.md
									
										
									
									
									
								
							
							
						
						
									
										13
									
								
								QTCREATOR.md
									
										
									
									
									
								
							|  | @ -101,6 +101,17 @@ then go to **/home/user/TBuild/Libraries/openal-soft/build** and run | ||||||
|     make |     make | ||||||
|     sudo make install |     sudo make install | ||||||
| 
 | 
 | ||||||
|  | ####OpenSSL | ||||||
|  | 
 | ||||||
|  | In Terminal go to **/home/user/TBuild/Libraries** and run | ||||||
|  | 
 | ||||||
|  |     git clone https://github.com/openssl/openssl | ||||||
|  |     cd openssl | ||||||
|  |     git checkout OpenSSL_1_0_1-stable | ||||||
|  |     ./config | ||||||
|  |     make | ||||||
|  |     sudo make install | ||||||
|  | 
 | ||||||
| ####libxkbcommon (required for Fcitx Qt plugin) | ####libxkbcommon (required for Fcitx Qt plugin) | ||||||
| 
 | 
 | ||||||
| In Terminal go to **/home/user/TBuild/Libraries** and run | In Terminal go to **/home/user/TBuild/Libraries** and run | ||||||
|  | @ -136,7 +147,7 @@ Install some packages for Qt (see **/home/user/TBuild/Libraries/QtStatic/qtbase/ | ||||||
| 
 | 
 | ||||||
| In Terminal go to **/home/user/TBuild/Libraries/QtStatic** and there run | In Terminal go to **/home/user/TBuild/Libraries/QtStatic** and there run | ||||||
| 
 | 
 | ||||||
|     ./configure -release -opensource -confirm-license -qt-zlib -qt-libpng -qt-libjpeg -qt-freetype -qt-harfbuzz -qt-pcre -qt-xcb -qt-xkbcommon-x11 -no-opengl -static -nomake examples -nomake tests |     OPENSSL_LIBS='/usr/local/ssl/lib/libssl.a /usr/local/ssl/lib/libcrypto.a' ./configure -release -opensource -confirm-license -qt-zlib -qt-libpng -qt-libjpeg -qt-freetype -qt-harfbuzz -qt-pcre -qt-xcb -qt-xkbcommon-x11 -no-opengl -static -openssl-linked -nomake examples -nomake tests | ||||||
|     make -j4 |     make -j4 | ||||||
|     sudo make -j4 install |     sudo make -j4 install | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -111,14 +111,14 @@ if [ "$BuildTarget" == "linux" ] || [ "$BuildTarget" == "linux32" ]; then | ||||||
| 
 | 
 | ||||||
|   mkdir -p "$WorkPath/ReleaseIntermediateUpdater" |   mkdir -p "$WorkPath/ReleaseIntermediateUpdater" | ||||||
|   cd "$WorkPath/ReleaseIntermediateUpdater" |   cd "$WorkPath/ReleaseIntermediateUpdater" | ||||||
|   /usr/local/Qt-5.5.1/bin/qmake "$HomePath/Updater.pro" |   /usr/local/Qt-5.5.1/bin/qmake "$HomePath/Updater.pro" -r -spec linux-g++ | ||||||
|   make |   make | ||||||
|   echo "Updater build complete!" |   echo "Updater build complete!" | ||||||
|   cd "$HomePath" |   cd "$HomePath" | ||||||
| 
 | 
 | ||||||
|   mkdir -p "$WorkPath/ReleaseIntermediate" |   mkdir -p "$WorkPath/ReleaseIntermediate" | ||||||
|   cd "$WorkPath/ReleaseIntermediate" |   cd "$WorkPath/ReleaseIntermediate" | ||||||
|   /usr/local/Qt-5.5.1/bin/qmake "$HomePath/Telegram.pro" |   /usr/local/Qt-5.5.1/bin/qmake "$HomePath/Telegram.pro" -r -spec linux-g++ | ||||||
|   eval "$FixScript" |   eval "$FixScript" | ||||||
|   make |   make | ||||||
|   echo "Telegram build complete!" |   echo "Telegram build complete!" | ||||||
|  |  | ||||||
|  | @ -11,10 +11,10 @@ Replace () { | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| Replace '\-llzma' '\/usr\/lib\/x86_64\-linux\-gnu\/liblzma\.a' | Replace '\-llzma' '\/usr\/lib\/x86_64\-linux\-gnu\/liblzma\.a' | ||||||
| Replace '\-lssl' '\/usr\/lib\/x86_64\-linux\-gnu\/libssl\.a' | #Replace '\-lssl' '\/usr\/lib\/x86_64\-linux\-gnu\/libssl\.a' | ||||||
| Replace '\-lcrypto' '\/usr\/lib\/x86_64\-linux\-gnu\/libcrypto\.a' | #Replace '\-lcrypto' '\/usr\/lib\/x86_64\-linux\-gnu\/libcrypto\.a' | ||||||
| Replace '\-lgobject\-2\.0' '\/usr\/lib\/x86_64\-linux\-gnu\/libgobject\-2\.0\.a \/usr\/lib\/x86_64\-linux\-gnu\/libffi\.a' | #Replace '\-lgobject\-2\.0' '\/usr\/lib\/x86_64\-linux\-gnu\/libgobject\-2\.0\.a \/usr\/lib\/x86_64\-linux\-gnu\/libffi\.a' | ||||||
| Replace '\-lXi' '\/usr\/lib\/x86_64\-linux\-gnu\/libXi\.a' | Replace '\-lXi' '\/usr\/lib\/x86_64\-linux\-gnu\/libXi\.a \/usr\/lib\/x86_64\-linux\-gnu\/libXext\.a' | ||||||
| Replace '\-lSM' '\/usr\/lib\/x86_64\-linux\-gnu\/libSM\.a' | Replace '\-lSM' '\/usr\/lib\/x86_64\-linux\-gnu\/libSM\.a' | ||||||
| Replace '\-lICE' '\/usr\/lib\/x86_64\-linux\-gnu\/libICE\.a' | Replace '\-lICE' '\/usr\/lib\/x86_64\-linux\-gnu\/libICE\.a' | ||||||
| Replace '\-lfontconfig' '\/usr\/lib\/x86_64\-linux\-gnu\/libfontconfig\.a \/usr\/lib\/x86_64\-linux\-gnu\/libexpat\.a' | Replace '\-lfontconfig' '\/usr\/lib\/x86_64\-linux\-gnu\/libfontconfig\.a \/usr\/lib\/x86_64\-linux\-gnu\/libexpat\.a' | ||||||
|  | @ -28,3 +28,4 @@ Replace '\-lswresample' '\/usr\/local\/lib\/libswresample\.a' | ||||||
| Replace '\-lswscale' '\/usr\/local\/lib\/libswscale\.a' | Replace '\-lswscale' '\/usr\/local\/lib\/libswscale\.a' | ||||||
| Replace '\-lavutil' '\/usr\/local\/lib\/libavutil\.a' | Replace '\-lavutil' '\/usr\/local\/lib\/libavutil\.a' | ||||||
| Replace '\-lva' '\/usr\/local\/lib\/libva\.a' | Replace '\-lva' '\/usr\/local\/lib\/libva\.a' | ||||||
|  | Replace '\-lQt5Network' '\/usr\/local\/Qt-5.5.1\/lib\/libQt5Network.a \/usr\/local\/ssl\/lib\/libssl.a \/usr\/local\/ssl\/lib\/libcrypto.a' | ||||||
|  |  | ||||||
|  | @ -43,4 +43,9 @@ namespace PlatformSpecific { | ||||||
| 		~Initializer(); | 		~Initializer(); | ||||||
| 	}; | 	}; | ||||||
| 
 | 
 | ||||||
|  | 	namespace ThirdParty { | ||||||
|  | 		void start(); | ||||||
|  | 		void finish(); | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -752,9 +752,6 @@ void PsMainWindow::psUpdatedPosition() { | ||||||
| void PsMainWindow::psCreateTrayIcon() { | void PsMainWindow::psCreateTrayIcon() { | ||||||
|     if (!noQtTrayIcon) { |     if (!noQtTrayIcon) { | ||||||
|         cSetSupportTray(QSystemTrayIcon::isSystemTrayAvailable()); |         cSetSupportTray(QSystemTrayIcon::isSystemTrayAvailable()); | ||||||
|         if (!noTryUnity) { |  | ||||||
|             useUnityCount = false; |  | ||||||
|         } |  | ||||||
|         return; |         return; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|  | @ -1241,6 +1238,15 @@ void psShowInFolder(const QString &name) { | ||||||
| namespace PlatformSpecific { | namespace PlatformSpecific { | ||||||
| 
 | 
 | ||||||
| 	Initializer::Initializer() { | 	Initializer::Initializer() { | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | 	Initializer::~Initializer() { | ||||||
|  | 		delete _psEventFilter; | ||||||
|  | 		_psEventFilter = 0; | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | 	namespace ThirdParty { | ||||||
|  | 		void start() { | ||||||
| 			QString cdesktop = QString(getenv("XDG_CURRENT_DESKTOP")).toLower(); | 			QString cdesktop = QString(getenv("XDG_CURRENT_DESKTOP")).toLower(); | ||||||
| 			noQtTrayIcon = (cdesktop == qstr("pantheon")) || (cdesktop == qstr("gnome")); | 			noQtTrayIcon = (cdesktop == qstr("pantheon")) || (cdesktop == qstr("gnome")); | ||||||
| 			tryAppIndicator = (cdesktop == qstr("xfce")); | 			tryAppIndicator = (cdesktop == qstr("xfce")); | ||||||
|  | @ -1253,9 +1259,8 @@ namespace PlatformSpecific { | ||||||
| 			setupUnity(); | 			setupUnity(); | ||||||
| 		} | 		} | ||||||
| 
 | 
 | ||||||
| 	Initializer::~Initializer() { | 		void finish() { | ||||||
| 		delete _psEventFilter; | 		} | ||||||
| 		_psEventFilter = 0; |  | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -861,6 +861,14 @@ namespace PlatformSpecific { | ||||||
| 		objc_finish(); | 		objc_finish(); | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
|  |     namespace ThirdParty { | ||||||
|  |         void start() { | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         void finish() { | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | 
 | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void psNewVersion() { | void psNewVersion() { | ||||||
|  |  | ||||||
|  | @ -2170,6 +2170,14 @@ namespace PlatformSpecific { | ||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
|  | 	namespace ThirdParty { | ||||||
|  | 		void start() { | ||||||
|  | 		} | ||||||
|  | 
 | ||||||
|  | 		void finish() { | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| namespace { | namespace { | ||||||
|  |  | ||||||
|  | @ -267,6 +267,8 @@ namespace { | ||||||
| namespace ThirdParty { | namespace ThirdParty { | ||||||
| 
 | 
 | ||||||
| 	void start() { | 	void start() { | ||||||
|  | 		PlatformSpecific::ThirdParty::start(); | ||||||
|  | 
 | ||||||
| 		if (!RAND_status()) { // should be always inited in all modern OS
 | 		if (!RAND_status()) { // should be always inited in all modern OS
 | ||||||
| 			char buf[16]; | 			char buf[16]; | ||||||
| 			memcpy(buf, &_msStart, 8); | 			memcpy(buf, &_msStart, 8); | ||||||
|  | @ -303,6 +305,8 @@ namespace ThirdParty { | ||||||
| 
 | 
 | ||||||
| 		delete[] _sslLocks; | 		delete[] _sslLocks; | ||||||
| 		_sslLocks = 0; | 		_sslLocks = 0; | ||||||
|  | 
 | ||||||
|  | 		PlatformSpecific::ThirdParty::finish(); | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -288,10 +288,10 @@ CONFIG(release, debug|release) { | ||||||
|     QMAKE_CXXFLAGS_RELEASE -= -O2 |     QMAKE_CXXFLAGS_RELEASE -= -O2 | ||||||
|     QMAKE_CXXFLAGS_RELEASE += -Ofast -flto -fno-strict-aliasing -g |     QMAKE_CXXFLAGS_RELEASE += -Ofast -flto -fno-strict-aliasing -g | ||||||
|     QMAKE_LFLAGS_RELEASE -= -O1 |     QMAKE_LFLAGS_RELEASE -= -O1 | ||||||
|     QMAKE_LFLAGS_RELEASE += -Ofast -flto -g |     QMAKE_LFLAGS_RELEASE += -Ofast -flto -g -rdynamic | ||||||
| } | } | ||||||
| CONFIG(debug, debug|release) { | CONFIG(debug, debug|release) { | ||||||
| 	QMAKE_LFLAGS_DEBUG += -g | 	QMAKE_LFLAGS_DEBUG += -g -rdynamic | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| INCLUDEPATH += ./../../Libraries/QtStatic/qtbase/include/QtGui/5.5.1/QtGui\ | INCLUDEPATH += ./../../Libraries/QtStatic/qtbase/include/QtGui/5.5.1/QtGui\ | ||||||
|  | @ -319,7 +319,7 @@ INCLUDEPATH += "/usr/include/atk-1.0" | ||||||
| INCLUDEPATH += "/usr/include/dee-1.0" | INCLUDEPATH += "/usr/include/dee-1.0" | ||||||
| INCLUDEPATH += "/usr/include/libdbusmenu-glib-0.4" | INCLUDEPATH += "/usr/include/libdbusmenu-glib-0.4" | ||||||
| 
 | 
 | ||||||
| LIBS += -lcrypto -lssl -ldl -llzma -lopenal -lavformat -lavcodec -lswresample -lswscale -lavutil -lopus -lva | LIBS += -ldl -llzma -lopenal -lavformat -lavcodec -lswresample -lswscale -lavutil -lopus -lva | ||||||
| LIBS += ./../../../Libraries/QtStatic/qtbase/plugins/platforminputcontexts/libcomposeplatforminputcontextplugin.a \ | LIBS += ./../../../Libraries/QtStatic/qtbase/plugins/platforminputcontexts/libcomposeplatforminputcontextplugin.a \ | ||||||
|         ./../../../Libraries/QtStatic/qtbase/plugins/platforminputcontexts/libibusplatforminputcontextplugin.a \ |         ./../../../Libraries/QtStatic/qtbase/plugins/platforminputcontexts/libibusplatforminputcontextplugin.a \ | ||||||
|         ./../../../Libraries/QtStatic/qtbase/plugins/platforminputcontexts/libfcitxplatforminputcontextplugin.a |         ./../../../Libraries/QtStatic/qtbase/plugins/platforminputcontexts/libfcitxplatforminputcontextplugin.a | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 John Preston
						John Preston