This is the installer for the RasPlex project
Planned features include:
References:
Setup:
Unpack the sources, and configure/build as such:
perl Configure mingw no-shared no-asm --prefix=/c/OpenSSL
make depend
make
make install
If asked to choose a compiler, abviously choose mingw. It'll install a fuckload of manpages for some reason. Maybe you can figure out how to make it not, but i neven tried.
There might be an undocumented step that i'm missing, if there is, please add it here.
You should end up with a lib folder containing "libcrypto.a" and "libssl.a". Woot!
Crack open the included "windows/windows-build-qt-static.ps1", which is a... sigh... powershell script.
Notice the configure line:
cmd /c 'configure.bat -static -debug-and-release -platform win32-g++ -prefix $QtDir -qt-zlib -qt-pcre -qt-libpng -qt-libjpeg -qt-freetype -opengl desktop -qt-sql-sqlite -no-openssl -opensource -confirm-license -make libs -nomake tools -nomake examples -nomake tests -no-accessibility -no-openvg -no-nis -no-iconv -no-inotify -no-fontconfig -qt-zlib -no-icu -no-gif -no-libjpeg -no-freetype -no-vcproj -no-plugin-manifests -no-dbus -no-audio-backend -no-qml-debug -no-directwrite -no-native-gestures -no-mp -no-rtti -no-c++11 -no-opengl -system-zlib -openssl-linked OPENSSL_LIBS="-lssl -lcrypto" -L C:\Openssl\lib -I C:\Openssl\include
This is the most important part. The openssl-linked will tell it to use the statically linked libs, instead of relying on dynamic. The include and lib paths much match your installation. Everything else is mostly to remove dependencies to supped up build time.
Either run this powershell script or pull out the important bits using your powerful human brain, which has the distinct advantage of not involving powershell.
This will generate a new qmake in the Qt directory, which knows how to statically compile. Use this one instead of the default.
For example, mine was at "C:\Qt\Static\blahblahblah\Src\qtbase\bin\qmake.exe"
Verify you can run qmake, and you're done!
Command line:
From the rasplex-installer source directory, run qmake as generated above from Qt shell (Qt 5.2.1 for desktop (MinGW 4.7)), then run mingw32-make:
C:\Qt\Qt-5.0.2\5.0.2\Src\bin\qmake
C:\Qt\Static\blahblahblah\Src\qtbase\bin\qmake.exe
mingw32-make
Using Qt creator:
The static libs make the exe quite large, so it's a good idea to compress it using upx
This should take it from about 12MB down to about 6MB
You'll need to use Qt 5.2+, at time of writing we were using the betas
Make sure to install everything (including source components).
You can't really do a static build very easily... so we just use "macdeployqt", which is located inside "Clang/bin" directory of whereever you installed Qt.
Just open the project in Qt creator and build.
To bundle for osx, use "macdeployqt" on the target app. This should take a few seconds, and bloats the app up to about 20MB. This is because it copies in al the Qt frameworks.
Next, merge the included osx/GetRasplex.app, to get all the app goodies (script to run as admin, icon, etc). GetRasplex.app was created by just opening main.scpt in apple script editor, and exporting it as an app, then overwriting our own icon into the app. We save the skelaton for ease of deployment.
It should look like this:
path-to-qt/clang/bin/macdeployqt build.blahblah-Release/rasplex-installer.app
cp -r build.blahblah/rasplex-installer.app /tmp/GetRasplex.app
cp -r osx/GetRasplex.app/ /tmp/GetRasplex.app
Now, to shrink it down, go ahead and grab dmgcreator, and add GetRasplex.app to it, selecting "zlib" compression.
This should take the bundle down to about 8MB from 20. Not bad.
You'll need to use Qt 5.2+, at time of writing we were using the betas
Make sure to install everything (including source components).
Go to the source directory where you installed qt, and enter "qtbase". Run the following configure command (works on 5.2.1 on ubuntu):
OPENSSL_LIBS="-lssl -lcrypto" ./configure -static -release -opensource -nomake tools -nomake examples -no-accessibility -no-openvg -no-nis -no-iconv -no-directfb -no-icu -no-gif -no-libjpeg -strip -no-dbus -no-audio-backend -no-qml-debug -no-c++11 -system-zlib -no-linuxfb -no-eglfs -no-sql-mysql -no-sql-odbc -no-cups -no-glib -no-qml-debug -no-javascript-jit -no-mtdev -qt-sql-sqlite -qt-xcb -confirm-license -fontconfig -openssl-linked
make -j `nproc`
This command is designed to minimize external dependencies, check against doconf.linux file first, as it may be more up-to-date than this readme. When the make is done, you'll have a static Qt and a qmake you can use that knows how to handle static builds.
From the rasplex-installer source dir, simply run the qmake you generated above (usually at qtbase/bin/qmake), then run make.
path-to-qt-sources/qtbase/bin/qmake
make -j `nproc`
Install upx from your package manager, or from their site, whatever is easier. Then just run upx on the output from the build. This should bring the installer down from about 17MB to about 6.