@@ -372,6 +372,7 @@ fn print_usage() {
372372 SHARUN_WORKING_DIR=/path Specifies the path to the working directory
373373 SHARUN_ALLOW_SYS_VKICD=1 Enables breaking system vulkan/icd.d for vulkan loader
374374 SHARUN_ALLOW_LD_PRELOAD=1 Enables breaking LD_PRELOAD env variable
375+ SHARUN_PRINTENV=1 Print environment variables to stderr
375376 SHARUN_LDNAME=ld.so Specifies the name of the interpreter
376377 SHARUN_DIR Sharun directory" ) ;
377378}
@@ -692,6 +693,9 @@ fn main() {
692693 if dir == "gbm" {
693694 env:: set_var ( "GBM_BACKENDS_PATH" , dir_path)
694695 }
696+ if dir == "xtables" {
697+ env:: set_var ( "XTABLES_LIBDIR" , dir_path)
698+ }
695699 if dir. starts_with ( "spa-" ) {
696700 env:: set_var ( "SPA_PLUGIN_DIR" , dir_path)
697701 }
@@ -850,7 +854,7 @@ fn main() {
850854 match name. to_str ( ) . unwrap ( ) {
851855 "fonts" => {
852856 let fonts_conf = entry_path. join ( "fonts.conf" ) ;
853- if fonts_conf. exists ( ) {
857+ if ! Path :: new ( "/etc/fonts/fonts.conf" ) . exists ( ) && fonts_conf. exists ( ) {
854858 env:: set_var ( "FONTCONFIG_FILE" , fonts_conf)
855859 }
856860 }
@@ -880,6 +884,13 @@ fn main() {
880884 env:: remove_var ( var_name)
881885 }
882886
887+ if get_env_var ( "SHARUN_PRINTENV" ) == "1" {
888+ env:: remove_var ( "SHARUN_PRINTENV" ) ;
889+ for ( k, v) in env:: vars ( ) {
890+ eprintln ! ( "{k}={v}" )
891+ }
892+ }
893+
883894 cfg_if ! {
884895 if #[ cfg( feature = "pyinstaller" ) ] {
885896 let is_pyinstaller_elf = is_elf_section( & elf_bytes, "pydata" ) . unwrap_or( false ) ;
0 commit comments