Commit Graph
17 Commits
Author SHA1 Message Date
Vasily b5877cd4e7 Update documentation for building on windows 2018-12-26 22:08:45 +01:00
Vasily 2aa32bafad Change variable expansion in build scripts
Currently the variable expansion sometimes doesn't work when done over
two variables. Inlining the ~dp0 call along with \..\..\ seems to work.

Testing leads me to believe that the Windows command prompt caches
things in a weird way.
2018-12-26 21:58:03 +01:00
Vasily 759bd859bb Merge remote-tracking branch 'origin/master' into new-windows-build 2018-12-26 20:37:10 +01:00
Vasily de8dffe40f Add extra checks for environment vars 2018-12-26 20:23:16 +01:00
Vasily 8d0277f6cf Add quotes to all env vars in appveyor 2018-12-26 20:11:02 +01:00
Vasily fc103633fe Update package script to consider path vars 2018-12-26 20:04:55 +01:00
Vasily 2085d0716b Update appveyor, .gitignore and master build script 2018-12-26 19:38:50 +01:00
username223 afd79cd3e4 Merge pull request #9 from OpenVR-Advanced-Settings/keyboard-alt-tab
Add option to send Alt-Tab as keyboard input
2018-12-26 18:34:11 +01:00
Vasily 43eafba7a7 Add error handling to master 2018-12-26 18:21:11 +01:00
Vasily eee7148c00 New build_windows.cmd
Change names of build scripts
2018-12-26 18:21:02 +01:00
Vasily 8bec43d01e Add new build scripts for windows
The old build scripts used hard coded directory paths, didn't check if
the paths actually existed and didn't differentiate between compiling,
deploying libraries and packaging for release.

The new build scripts are split into three different files. They are all
longer than the old build scripts, but most of the extra lines are
error checking, which the old one lacked.

It was considered writing the build scripts in another language like
Python or Powershell, but the relatively small size of the project and
unlikelihood of the build systems needing to grow massively means that a
very simple imperative language like the Microsoft scripting language is
fine.
2018-12-26 18:10:10 +01:00
username223 940355c168 Merge pull request #5 from OpenVR-Advanced-Settings/cleanup-pro
cleanup .pro file
2018-12-26 00:30:15 +01:00
username223 c3d1ba3e24 Merge branch 'master' into cleanup-pro 2018-12-26 00:24:05 +01:00
Vasily f9784ec62c Resolved merge conflict 2018-12-25 22:00:03 +01:00
Vasily 4438f4cd28 Add table of contents, docs on command line args and building for windows
The current readme lacks a table of contents, which makes finding what
you're looking for difficult because of the large amount of images and
text.

The current documentation on building for windows doesn't mention the
fact that package.cmd also has to be run to create a full build. It is
also lacking in other areas, such as the packaging programs required.

The current documentation doesn't reflect the fact that you can pass
command line arguments to the program.
2018-12-25 21:44:26 +01:00
Vasily 921d1ae828 Refactor manifest remove/install logic in main
The install/remove manifest logic in main is currently duplicated. This
bloats up main and creates unnecessarily large indented logic. The only
thing that is different between the two large if blocks is a single
function call.

Refactoring to test for which function to call at the latest possible
stage reduces code duplication.
2018-12-22 14:45:49 +01:00
Vasily 3935ebcbb4 Refactor command line argument parsing into function
The command line argument parsing is done in a giant for loop in the
main function. This presents readability and extension problems.

Refactor the big for loop into smaller loops inside the function.

In theory this will affect performance slightly at startup, but when considering
the very low amount of possible command line arguments (5, currently) and the low
amount of arguments being passed on a typical launch (0 or 1, mostly),
the readability improvements are very much worth it.

The string literals have also been moved to the "argument" namespace as
constexpr, in order to avoid potential typos in string literals.

Should the amount of command line arguments increase severely, it might
be necessary to create a structure with only one pass through the
argument loop, but such a situation is very unlikely.
2018-12-22 13:33:13 +01:00