Month: November 2017

How to build static Qt application on Windows (even with Qt Creator)

I started working on a new Qt project and everything went very well. But once the project reached a good state, I had to start publishing builds of my application. Most Linux users have Qt installed, or they can install it very easily (usually it’s available in their repository). But it’s a different story on Windows.

In most cases, you want a static built Qt program. Because it will run just fine by itself, without the need of installing anything else.

Solution:

  1. Install MSYS2: http://www.msys2.org/
  2. Update the system, with “pacman -Syu”, and install all the packages. Once the update is done, open up Task Manager and kill “bash.exe” and “pacman.exe”.
  3. Install the recommended packages ( https://wiki.qt.io/MinGW-64-bit ):
    pacman -S base-devel git mercurial cvs wget p7zip
    pacman -S perl ruby python2 mingw-w64-i686-toolchain mingw-w64-x86_64-toolchain
    pacman -S mingw-w64-i686-qt5-static mingw-w64-x86_64-qt5-static
  4. Install Qt Creator (yes, trust me on this one):
    mingw64/mingw-w64-x86_64-qt-creator
  5. Done!

Now you can simply start Qt Creator from the MSYS folder. Located at: msysfolder/mingw64/bin/qtcreator.exe
This Qt Creator will detect the static Qt installation in the msys folder, and you can already compile your project, because this Qt Creator will use your existing Qt Creator settings. You can simply switch between the two Qt Creators, they will cause no issues whatsoever. Just switch “build configuration” at the bottom-left, and that’s it.

This setup provides an easy, robust static Qt compilation environment.

{ Add a Comment }

How to configure Parsec for best quality + performance! (BUILD 137-1)

This will be our best friend from now on: https://parsec.tv/config

How to edit and apply the new config:

  1. Start the Parsec client
  2. Click Settings
  3. Click Advanced Settings (config.txt) on the bottom

Now we can move on.
First and foremost, you have to edit the config on both your server and client!
You can include the server settings in your client.
If you do NOT want your client to become a host, set “app_host to 0” simply.


My  configuration (you can just include all the client options too and vice versa):


# For help and a full list of settings visit: https://parsec.tv/config/

# All configuration settings must appear on a new line.
# Comments are allowed after a '#' character (end-of-line style).
# All whitespace, besides the newline character '\n', is ignored.
# All settings passed via the command line, or via the website, take precedence.
# The configuration file will be overwritten by the application when changing settings.

# EDIT THIS AS NEEDED
# This sets the MAX resolution.
# Mine is 2560x1080. According to the site, DO NOT EXCEEED 2K, that is 2560x1440.
server_resolution_x=1920
server_resolution_y=1080

# You can force refresh rate.
# By default it uses server rate, so it should be OK by default.
# server_refresh_rate=60

# Audio delay - modify if you have to, but leave it if you can.
# client_audio_buffer=20000

# By default, if an admin is connecting to a host PC, Parsec mutes the audio on the host
# computer's speakers. If you'd like to turn this default off, please set the 
# server_admin_mute value to 0.
# server_admin_mute=1

# Set this to "warp" to have the newer (preview) version, you have to add this on both sides.
# If it messes your client/server up, you have to re-download Parsec!
# app_channel=release

# If you manually manage port forwarding for the server, you'll need to forward ports 8000-8002
# for UDP traffic on the server network. 
# If you would like to invite others to join your gaming session, you need to increase the ports
# forwarded by 3 for each concurrent connection. For instance, if you have 5 friends connecting to your server,
# you should forward ports 8000-8014.
# network_server_start_port=8000

# Highest video quality
app_lan_quality = 3
app_wan_quality = 3

# Since I have 100mbps internet.
# It will use a lot less usually, so don't worry much
encoder_bitrate = 100
# Disable fps limit (this is default btw)
encoder_fps=0

# Encoder Video Output quality
# Higher value = worse picture
# 3 is very good, 25 is default
encoder_min_qp = 0

# Encoder quality
# Lower value = worse picture
# 3 is very good, 1 is worst
# I use 3, never noticed much impact from it
encoder_quality = 3

# Enable hosting
app_host = 1

# Edit as needed, but never exceed 2560x1440.
server_resolution_x=1920
server_resolution_y=1080

 

That’s all folks. This config works like a charm for me. I have a sharp picture with no latency and no noticeable slowdowns.
Mind you, the slowest hardware I use as a client is a Core2Duo mobile processor. So if you use something very weak, you might have to edit this here and there.

I also went for max quality, because I never noticed much performance drop from higher values at all. Again, your mileage may vary.
Learning how to configure Parsec only takes like 15 minutes. Just read the linked page, and copy values, adjust them to your needs. Simple as that.

{ 1 Comment }