diff --git a/editor-wrapper.sh b/editor-wrapper.sh index 9bf3e04..d11b7fe 100755 --- a/editor-wrapper.sh +++ b/editor-wrapper.sh @@ -18,7 +18,7 @@ function exec_editor() { export ZYPAK_BIN="@ZYPAK_BINDIR@" export ZYPAK_LIB="@ZYPAK_LIBDIR@" export CHROME_WRAPPER="@WRAPPER_PATH@" - exec "@ZYPAK_BINDIR@/zypak-helper" host "@EDITOR_BINARY@" "$@" + exec "@ZYPAK_BINDIR@/zypak-helper" @ZYPAK_ARGS@ "@EDITOR_BINARY@" "$@" else exec "@EDITOR_BINARY@" "$@" fi diff --git a/meson.build b/meson.build index 85bdf24..94e0ece 100644 --- a/meson.build +++ b/meson.build @@ -36,6 +36,11 @@ foreach arg : get_option('editor_args') editor_args += '"@0@"'.format(arg) endforeach +zypak_args = [] +foreach arg : get_option('zypak_args') + zypak_args += '"@0@"'.format(arg) +endforeach + export_envs = [] foreach env : get_option('envs') var = env.split('=') @@ -62,6 +67,7 @@ wrapper_data = configuration_data({ 'WRAPPER_PATH': wrapper_path, 'EDITOR_BINARY': editor_path, 'EDITOR_ARGS': ' '.join(editor_args), + 'ZYPAK_ARGS': ' '.join(zypak_args), 'EXPORT_ENVS': ' && '.join(export_envs), 'EXPORT_ENVS_INNER': ' && '.join(export_envs_inner), 'EDITOR_TITLE': get_option('editor_title'), diff --git a/meson_options.txt b/meson_options.txt index 414206f..f31c9fe 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -8,5 +8,6 @@ option('first_run_template', type: 'string', value: 'first_run.txt') option('sdk_update_template', type: 'string', value: 'sdk_update.txt') option('flagfile_prefix', type: 'string', value: 'flatpak-vscode') option('zypak', type: 'feature', value: 'disabled') +option('zypak_args', type: 'array', value: ['host']) option('envs', type: 'array', value: []) option('envs_inner', type: 'array', value: [])