Skip to content

Commit

Permalink
add vrmanifest file
Browse files Browse the repository at this point in the history
  • Loading branch information
I5UCC committed Sep 21, 2022
1 parent 50909c2 commit 645a72a
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 4 deletions.
2 changes: 2 additions & 0 deletions src/ThumbParamsOSC.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ def resource_path(relative_path):
# Init OpenVR and Actionsets
application = openvr.init(openvr.VRApplication_Utility)
action_path = os.path.join(resource_path(ovrConfig["BindingsFolder"]), ovrConfig["ActionManifestFile"])
appmanifest_path = os.path.join(os.path.join(resource_path(ovrConfig["AppManifestFile"])))
openvr.VRApplications().addApplicationManifest(appmanifest_path)
openvr.VRInput().setActionManifestPath(action_path)
actionSetHandle = openvr.VRInput().getActionSetHandle(ovrConfig["ActionSetHandle"])

Expand Down
19 changes: 19 additions & 0 deletions src/app.vrmanifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"source": "builtin",
"applications": [
{
"app_key": "i5ucc.ThumbParamsOSC",
"launch_type": "binary",
"binary_path_windows": "./ThumbParamsOSC_NoConsole.exe",
"is_dashboard_overlay": true,
"action_manifest_path": "./bindings/thumbparams_actions.json",

"strings": {
"en_us": {
"name": "VRCThumbParamsOSC",
"description": "OpenVR ThumbParams implementation to send touched face buttons over OSC"
}
}
}
]
}
2 changes: 1 addition & 1 deletion src/bindings/knuckles_thumbparams_bindings.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"action_manifest_version" : 0,
"alias_info" : {},
"app_key" : "system.generated.thumbparamsosc.exe",
"app_key" : "i5ucc.ThumbParamsOSC",
"bindings" : {
"/actions/thumbparams" : {
"sources" : [
Expand Down
2 changes: 1 addition & 1 deletion src/bindings/touch_thumbparams_bindings.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"action_manifest_version" : 0,
"alias_info" : {},
"app_key" : "system.generated.thumbparamsosc.exe",
"app_key" : "i5ucc.ThumbParamsOSC",
"bindings" : {
"/actions/thumbparams" : {
"sources" : [
Expand Down
1 change: 1 addition & 0 deletions src/ovrConfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"BindingsFolder": "bindings",
"AppManifestFile": "app.vrmanifest",
"ActionManifestFile": "thumbparams_actions.json",
"ActionSetHandle": "/actions/thumbparams",
"ButtonActions":
Expand Down
4 changes: 2 additions & 2 deletions src/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# "packages": ["os"] is used as example only
packages = ["os", "json", "traceback", "openvr", "sys", "time", "ctypes", "argparse", "pythonosc"]
exclude = ["tkinter", "asyncio", "concurrent", "html", "http", "lib2to3", "multiprocessing", "test", "unittest", "xmlrpc"]
file_include = ["config.json", "ovrConfig.json", "Run Debug Mode.bat", "openvr/", "bindings/"]
file_include = ["config.json", "ovrConfig.json", "Run Debug Mode.bat", "openvr/", "bindings/", "app.vrmanifest"]
bin_excludes = ["_bz2.pyd", "_decimal.pyd", "_hashlib.pyd", "_lzma.pyd", "_queue.pyd", "_ssl.pyd", "libcrypto-1_1.dll", "libssl-1_1.dll", "ucrtbase.dll", "VCRUNTIME140.dll"]

build_exe_options = {"packages": packages, "excludes": exclude, "include_files": file_include, "bin_excludes": bin_excludes}
Expand All @@ -15,5 +15,5 @@
version="0.3.1",
description="ThumbParamsOSC",
options={"build_exe": build_exe_options},
executables=[Executable("ThumbParamsOSC.py", base=False, icon="icon.ico")],
executables=[Executable("ThumbParamsOSC.py", targetName="ThumbParamsOSC.exe", base=False, icon="icon.ico"), Executable("ThumbParamsOSC.py", targetName="ThumbParamsOSC_NoConsole.exe", base="Win32GUI", icon="icon.ico")],
)

0 comments on commit 645a72a

Please sign in to comment.