Skip to content
Snippets Groups Projects
Commit 9d37c69a authored by Simon McVittie's avatar Simon McVittie
Browse files

runtime: Communicate whether we're going to run in a Flatpak subsandbox

parent 1e7e83c9
No related branches found
No related tags found
1 merge request!203pressure-vessel: Add experimental code path for Flatpak sub-sandboxing
...@@ -40,6 +40,8 @@ ...@@ -40,6 +40,8 @@
* @PV_RUNTIME_FLAGS_IMPORT_VULKAN_LAYERS: Include host Vulkan layers * @PV_RUNTIME_FLAGS_IMPORT_VULKAN_LAYERS: Include host Vulkan layers
* @PV_RUNTIME_FLAGS_COPY_RUNTIME: Copy the runtime and modify the copy * @PV_RUNTIME_FLAGS_COPY_RUNTIME: Copy the runtime and modify the copy
* @PV_RUNTIME_FLAGS_UNPACK_ARCHIVE: Source is an archive, not a deployment * @PV_RUNTIME_FLAGS_UNPACK_ARCHIVE: Source is an archive, not a deployment
* @PV_RUNTIME_FLAGS_FLATPAK_SUBSANDBOX: The runtime will be used in a
* Flatpak subsandbox
* @PV_RUNTIME_FLAGS_NONE: None of the above * @PV_RUNTIME_FLAGS_NONE: None of the above
* *
* Flags affecting how we set up the runtime. * Flags affecting how we set up the runtime.
...@@ -53,6 +55,7 @@ typedef enum ...@@ -53,6 +55,7 @@ typedef enum
PV_RUNTIME_FLAGS_IMPORT_VULKAN_LAYERS = (1 << 4), PV_RUNTIME_FLAGS_IMPORT_VULKAN_LAYERS = (1 << 4),
PV_RUNTIME_FLAGS_COPY_RUNTIME = (1 << 5), PV_RUNTIME_FLAGS_COPY_RUNTIME = (1 << 5),
PV_RUNTIME_FLAGS_UNPACK_ARCHIVE = (1 << 6), PV_RUNTIME_FLAGS_UNPACK_ARCHIVE = (1 << 6),
PV_RUNTIME_FLAGS_FLATPAK_SUBSANDBOX = (1 << 7),
PV_RUNTIME_FLAGS_NONE = 0 PV_RUNTIME_FLAGS_NONE = 0
} PvRuntimeFlags; } PvRuntimeFlags;
...@@ -64,6 +67,7 @@ typedef enum ...@@ -64,6 +67,7 @@ typedef enum
| PV_RUNTIME_FLAGS_IMPORT_VULKAN_LAYERS \ | PV_RUNTIME_FLAGS_IMPORT_VULKAN_LAYERS \
| PV_RUNTIME_FLAGS_COPY_RUNTIME \ | PV_RUNTIME_FLAGS_COPY_RUNTIME \
| PV_RUNTIME_FLAGS_UNPACK_ARCHIVE \ | PV_RUNTIME_FLAGS_UNPACK_ARCHIVE \
| PV_RUNTIME_FLAGS_FLATPAK_SUBSANDBOX \
) )
typedef struct _PvRuntime PvRuntime; typedef struct _PvRuntime PvRuntime;
......
...@@ -1899,6 +1899,9 @@ main (int argc, ...@@ -1899,6 +1899,9 @@ main (int argc,
if (opt_copy_runtime) if (opt_copy_runtime)
flags |= PV_RUNTIME_FLAGS_COPY_RUNTIME; flags |= PV_RUNTIME_FLAGS_COPY_RUNTIME;
if (flatpak_subsandbox != NULL)
flags |= PV_RUNTIME_FLAGS_FLATPAK_SUBSANDBOX;
if (opt_runtime != NULL) if (opt_runtime != NULL)
{ {
/* already checked for mutually exclusive options */ /* already checked for mutually exclusive options */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment