This forum is deprecated. Please visit https://github.com/smplayer-dev/smplayer/discussions

Static linking against Qt?

Forum to talk about the development of SMPlayer (code, patches...).

Static linking against Qt?

Postby nikkho » Thu Dec 30, 2010 9:24 am

Probably if you are able to statically link SMPlayer against Qt, distribution size, as well as program load speed would improve.
Any chances of having such feature?

Thanks.
nikkho
 
Posts: 20
Joined: Sat Jan 30, 2010 3:21 pm

Re: Static linking against Qt?

Postby nikkho » Sat Feb 18, 2012 8:55 pm

I have seen MPlayer2 being statically linked against Qt, which makes it single executable, and includes only the functions really needed by the code, thrus saving some disk space (arround 8 MB).
Is there any change future SMPlayer x86 and SMPlayer x64 builds to be statically linked?

Regards.
nikkho
 
Posts: 20
Joined: Sat Jan 30, 2010 3:21 pm

Re: Static linking against Qt?

Postby redxii » Sun Feb 19, 2012 4:11 am

Here's a x64 static exe you can test: http://sourceforge.net/projects/smplaye ... z/download

It isn't very much smaller by itself (-4MB), I had to figure out what compiler flags to use to shrink it. It also has zlib statically.
User avatar
redxii
 
Posts: 520
Joined: Thu Dec 24, 2009 7:06 pm

Re: Static linking against Qt?

Postby nikkho » Sun Feb 19, 2012 8:33 am

Thank you for the build redxii. It works perfectly.
While the old dynamic build was 20,9 MB (SMPlayer.exe + QtCore4.dll + QtGui4.dll + QtNetwork4.dll + QtXml4.dll), this new one is only 9,4 Mb (SMPlayer.exe), so I nice reduction!

Regards.
nikkho
 
Posts: 20
Joined: Sat Jan 30, 2010 3:21 pm

Re: Static linking against Qt?

Postby redxii » Sun Feb 19, 2012 8:51 am

Also imageformats\qjpeg4.dll and zlib1.dll (SVN after 0.7.0). Delete the imageformats folder and zlib1 along with the Qt dlls to make sure it works. I'm not so sure SMPlayer even uses qjpeg4 though, it should be in smplayer.pro but isn't. It isn't configured to compile qjpeg.
User avatar
redxii
 
Posts: 520
Joined: Thu Dec 24, 2009 7:06 pm

Re: Static linking against Qt?

Postby redxii » Sun Feb 19, 2012 9:31 am

Say.. you must have tried the MPlayer2 64-bit? That ****er crashes on every video and type of video I try to play. Did you have any success?
User avatar
redxii
 
Posts: 520
Joined: Thu Dec 24, 2009 7:06 pm

Re: Static linking against Qt?

Postby nikkho » Sun Feb 19, 2012 9:39 am

I will do some tests about deleting imageformats\qjpeg4.dll and zlib1.dll and post the results here later.

As for the x64 version, yes, I was using the x64 of SMPlayer, but not with latest Mplayer builds, they seem to crash since february. I am using MPlayer2 x64 from http://mplayer2.srsfckn.biz/ I guess the problem is not in your SMPlayer x64 build, but in MPlayer itself.

I managed SMplayer x64 to work with MPlayer x86 from december, and as a said, the x64 build of MPlayer2 work perfectly too.
nikkho
 
Posts: 20
Joined: Sat Jan 30, 2010 3:21 pm

Re: Static linking against Qt?

Postby redxii » Sun Feb 19, 2012 9:49 am

MPlayer 2 64-bit crashes can't even play a video. The 32-bit build works fine though.

I really don't prefer MPlayer2 because for some reason he just has to leave out DVD support. If you want DVD support you have to compile it yourself, and on Windows that's quite a bit of trouble enough, as I learned from compiling MPlayer.
User avatar
redxii
 
Posts: 520
Joined: Thu Dec 24, 2009 7:06 pm

Re: Static linking against Qt?

Postby nikkho » Sun Feb 19, 2012 10:26 am

Well I am only using MPlayer2, because it is x64. I am using the build at http://mplayer2.srsfckn.biz/mplayer2-x86_64-20120211.7z with direct3d_shader video output and openal audio output and have experienced no issues.

If interested I can provide you my smplayer.ini file.
nikkho
 
Posts: 20
Joined: Sat Jan 30, 2010 3:21 pm

Re: Static linking against Qt?

Postby nikkho » Sun Feb 19, 2012 11:03 am

I have deleted qjpe4.dll and everuthing goes still fine, thrus saving about 300 Kb. in adition, for some reason I did not have zlib1.dll installed, maybe not comming with your latest build, so I can confirm it is not needed.

Find a screenshot of the working setup, and my smplayer.ini at http://guti.bitacoras.com/_temp/_trash/smplayer.ini, hope this helps.

Image

Thank you very much for your efforts!
nikkho
 
Posts: 20
Joined: Sat Jan 30, 2010 3:21 pm

Next

Return to Development

Who is online

Users browsing this forum: No registered users and 3 guests

cron