The page was not made with Arch in mind.
The currently required were tested on Manjaro, more packages may be
explicitly required due to the bare-bones nature of Arch.
Adds simple logging calls makes debugging easier.
The initial build script was basically ported over directly from
Windows. It was written because I at the time didn't understand
compiling on Linux, and the existing standards, very well.
Moving as many build components into a program specifically made for
building C++ makes everything much easier.
The old build script is still used on CI where control flow can only be
changed using environment variables.
`bear` and `clang-format` are only used on the CI, there's no reason to
include them here.
This enables a `sudo make install` that copies the build directory to
the PREFIX directory (/opt/OpenVR-AdvancedSettings/AdvancedSettings by
default).
The entire directory is being copied because Qt is incredibly weird
about how the INSTALLS variable works. From testing it appears that only
files that exist before the build process has started (even the
file_copy process) will be eligible for installation.
If the /OpenVR-AdvancedSettings/ directory is excluded, Qt will attempt
to remove the /opt/ folder on `make uninstall`, this is obviously not
desirable.
`qmake` is better suited for finding `windeployqt`, since it's in the same
directory as `qmake` on windows.
`qmake` is also better suited for finding the build target
(release/debug) vs third party scripts.
`windeployqt` is being forced to run in `cmd` because the syntax is
different for running executables in powershell, which means
`windeployqt` won't be executed and runtime or package errors will
occur.
With the removal of the windeployqt call the deploy step is no longer
needed for building on Windows, since all previous deploy tasks are now
handle by Qmake.
Described in commit 97e203fd89e7cb54c7ce96ce779b2e8cb6ac1374
The python functions are no longer needed since the python script
doesn't handle file copy any more.
Described in commit 97e203fd89e7cb54c7ce96ce779b2e8cb6ac1374
The linux directory in package_files is included even on Windows install
for simplicity and because it takes up less than 1KB.
Manually creating an RC file was the Qt 4 way. The Qt 5 way is just
giving it an icon.
When an RC_FILE isn't manually created Qt will attempt to create one. If
there are non-integers in the version number the compilation will crash.
AdvancedSettings_resource.rc is a build artifact on Windows.
This allows Qmake to use the version number as well as not requiring all
other uses of the version string to strip double quotes from it. This
also reduces the fragility of the version string as it was required to
be a valid C++ char*, even in contexts where that wouldn't matter.
On Ubuntu 16.04 and 18.04 it is not possible to get Qt 5.12 from the
official repo. You will need to get it from
https://launchpad.net/~beineri/+archive/ubuntu/opt-qt-5.12.2-bionic
which places the files in /opt. This leads qmake to including the files
as non system headers, which makes them spam errors. Adding them as
-isystem headers first prevents this.
Encapsulating compiler specific options in a separate file
makes it easier to reason about what is going to happen on
a specific qmake call.
clang-msvc and msvc are separate because they don't support
exactly the same compiler switches.
All images have been moved to the /img/ folder in order to fully
separate qml from images. The .qrc file allows qml to use the images by
appending the qrc:/ prefix before the abstract path to the image.
Note that the .qrc file is also check at compile time, which further
enhances the confidence the lack of errors.
Some of the images are not used in the QML, but instead directly passed
through to the OpenVR API. These have not been added to the .qrc file.
The QRC file is a platform independant way of referring to resource
files. It allows the program to access resources in an abstract way
instead of the direct file path.
This is the first step towards moving all files to the new system.
Elements work like they've always done, this just moves the commonly
used components away from the global namespace.
The qmldir file still does something, although at this point it is
unknown exactly how it's used and whether or not it could be changed to
simplify imports across the block.
The popups have been moved inside the scope of the ProfileButtons. Since
the popups open based on the location of their parents, they are
currently opening underneath where they used to open.
Since the profiles and ptt settings do not work anyway, this is seen as
acceptable.
For now the way to go is to have the mirror device and audio device
selectors as different components instead of trying to inherit from a
single component and filling in the necessary function calls.
This is because some function calls are nested inside other components
and would be very messy. Perhaps in future commits the selectors will
inherit from a single parent.
Setting the default audio profile has also been moved into the separate
dialog box. This should not change anything and no bugs were found in
testing, however I have no idea how objects in QML/C++ are initialized
or if our current codebase is created with this in mind.
This removes the massively indented logic in the previous version.
Notice that individual components will still be imported with an
import "utilities_page". Therefore anything except UtilitiesPage.qml
should be in a separate folder.
The QML at the moment is a giant mess. Moving pages into individual
folders and properly abstracting the sub components of the pages will
allow for much easier development and better error messages.
Additionally it will prevent polluting the global namespace. Really, all
the reasons for avoiding globally available values and using
abstractions in regular programming also come into play here.
The codecvt header has been deprecatd for C++17, but no replacement has
been specified in the standard. It is possible to use the Windows
specific MultiByteToWideChar() and WideCharToMultiByte() from
<Windows.h> instead, however the codecvt header still works so there's
no reason to change it until a proper replacement has been specified in
the standard.
It is additionally necessary to manually set the standard for clang-msvc
to C++17.
Keeping the action name, handle and type together allows for better
error messages and limited run time type checking, to ensure that the
wrong function isn't called.
It is necessary to initialize the manifest in a class, since the Actions
depend on this being set.
Several files have been moved around to be more consistent.
In order to test new system:
Build and deploy application.
Copy both files from IVRInput/ dir into the bin/win64 folder.
Change const std::string m_actionManifestPath in steamivrinput.h to be
directly to your action_manifest.json file.
Run and turn on a Vive controller. Press the menu button. If logs say
"NEXT SONG SET!" it works.
The OpenVR init code is currently being run in the OverlayController
constructor. Member objects that are initialized before the
OverlayController (ideally all of them) can't use OpenVR APIs before the
first line of the OverlayController constructor. Implementing the OpenVR
Init code as a class means that it is able to initialize before all the
other objects and allow them to use OpenVR APIs in their constructors.
The class has been placed in a folder called "overlaycontroller" to
signify that it should only be used by the OverlayController.
openvr_init.h uses #pragma once despite it being unofficial since it is
supported on all modern compilers.
The copy constructor, copy assignment operator, move constructor and
move assignment operator have been explicitly deleted in order to make
sure nobody tries to use the object in an unintended way, and to
document that these functions should not be automatically created.
The version error messages have been replaced with a single lambda,
since they were all identical.
The version error text should maybe tell the user to update Advanced
Settings instead of OpenVR, since Advanced Settings contains the version
strings in the binary.
No other exit functions were documented on the official docs besides
VR_Shutdown().
The old QML was a giant mess of implementation details and logic.
Reducing the buttons to only 2 essential properties allows the
MediaControllerKeys object to be more easily understood.
Moving the MediaControllerKeys into its own QML file allows the
resulting page to be more easily understood and individual pieces
swapped in and out.
The current QML directory structure is non-existent, breaking parts down
into cohesive folders will allow for easier understanding of the bigger
picture.
.pngs were chosen because the .svgs were only available in black. Qt
currently does not have an easy way of changing colors. The rest of the
interface icons are white, so getting them in white was necessary.
win32-clang-msvc has an error when compiling with /WX. The moc_predefs.h
file is not being built correctly, while without /WX it works. The
change should be reverted to enabling /WX for all msvc compilers when
the clang-msvc issue is fixed.
Update path to clang-format in appveyor file
Retry CI on Python script
Python script failed on CI due to run-clang-format.py: error: [Error 5]
Access is denied. Research says attempting again might solve the
problem.
Update logging dependency from 9.84 to 9.89
This is the newest version that doesn't lead to compile errors. It has
also reduced the amount of "-Wexpansion-to-defined" errors on clang-msvc
by about 80 (from ~400 to 320).
Update easylogging license file
Originally came as LICENCE.txt (notice C instead of S in LICENSE),
renamed to better fit into the git history.
Move logging defines to QMAKE instead of logging.h
Defines done outside of easylogging++.h does not work according to
official documentation
(https://github.com/zuhd-org/easyloggingpp/blob/master/README.md#configuration-macros)
"NOTE: All the macros can be defined in one of the following ways:
1. Define macros using -D option of compiler, for example in case of
g++ you will do g++ source.cpp ... -DELPP_SYSLOG -DELPP_THREAD_SAFE
... (recommended way)
2. Define macros inside "easylogging++.h" (defining macros in other
files won't work)"
Linking to this issue:
https://github.com/zuhd-org/easyloggingpp/issues/590#issuecomment-346753951
We are using the developer recommended way of defining them by command
line.
What is assumed to be the intention of enabling debug logs before
including easylogging++ never actually did anything, hence this define
is dropped. Newer versions of easylogging++ uses the macro
ELPP_DISABLE_DEBUG_LOGS to _disable_ debug logs. Leaving that macro
undefined satisfies the original intent.
Move easylogging++ include into necessary files
logging.h previously had logic to enable debug logging even on release
builds. This logic was moved to the QMAKE file, hence the logging.h file
is no longer necessary.
Update easylogging++ to 9.96.7, turn on /WX for clang-msvc
Updating from easylogging++ 9.89 to 9.96.7 turns it from a header only
library to one requiring a source file. It has been added to sources
near the other third party includes in the QMAKE to signify that it
isn't a first party file.
Updating easylogging++ also means that clang-msvc can compile without
any warnings, hence turning on warnings as errors for that compiler as
well, to avoid any regressions.
updated to current
fixed formatting
fixed ptt add bug/compilerwarnings/c++14 target
cleaned up .pro file
fixed casting back to c++ style
added default profile and ptt profile view
fixed c++ casts
fixed logic error on getDevice functions
Updating from easylogging++ 9.89 to 9.96.7 turns it from a header only
library to one requiring a source file. It has been added to sources
near the other third party includes in the QMAKE to signify that it
isn't a first party file.
Updating easylogging++ also means that clang-msvc can compile without
any warnings, hence turning on warnings as errors for that compiler as
well, to avoid any regressions.
logging.h previously had logic to enable debug logging even on release
builds. This logic was moved to the QMAKE file, hence the logging.h file
is no longer necessary.
Defines done outside of easylogging++.h does not work according to
official documentation
(https://github.com/zuhd-org/easyloggingpp/blob/master/README.md#configuration-macros)
"NOTE: All the macros can be defined in one of the following ways:
1. Define macros using -D option of compiler, for example in case of
g++ you will do g++ source.cpp ... -DELPP_SYSLOG -DELPP_THREAD_SAFE
... (recommended way)
2. Define macros inside "easylogging++.h" (defining macros in other
files won't work)"
Linking to this issue:
https://github.com/zuhd-org/easyloggingpp/issues/590#issuecomment-346753951
We are using the developer recommended way of defining them by command
line.
What is assumed to be the intention of enabling debug logs before
including easylogging++ never actually did anything, hence this define
is dropped. Newer versions of easylogging++ uses the macro
ELPP_DISABLE_DEBUG_LOGS to _disable_ debug logs. Leaving that macro
undefined satisfies the original intent.