Don't exit if configDir doesn't exist, fix #19

This commit is contained in:
Gwenhael Le Moine 2024-04-11 21:14:15 +02:00
parent e7e31f72cc
commit 9ffaefed95
No known key found for this signature in database
GPG key ID: FDFE3669426707A7
3 changed files with 8 additions and 8 deletions

View file

@ -105,7 +105,10 @@ pretty-code:
get-roms:
make -C dist/ROMs
install: all get-roms
dist/config.lua: dist/x48ng
$^ --print-config > $@
install: all get-roms dist/config.lua
install -m 755 -d -- $(DESTDIR)$(PREFIX)/bin
install -c -m 755 dist/x48ng $(DESTDIR)$(PREFIX)/bin/x48ng
@ -124,7 +127,6 @@ install: all get-roms
install -m 755 -d -- $(DESTDIR)$(DOCDIR)
cp -R AUTHORS LICENSE README* doc* romdump/ $(DESTDIR)$(DOCDIR)
dist/x48ng --print-config > dist/config.lua
install -c -m 644 dist/config.lua $(DESTDIR)$(DOCDIR)/config.lua
install -m 755 -d -- $(DESTDIR)$(PREFIX)/share/applications

1
dist/config.lua vendored
View file

@ -28,6 +28,7 @@ fullscreen = false
mono = false
gray = false
leave_shift_keys = false
inhibit_shutdown = false
x11_visual = "default"
netbook = false

View file

@ -465,10 +465,8 @@ int parse_args_and_read_config( int argc, char* argv[] )
fprintf( stderr, "\n" );
}
if ( !normalize_config_dir() ) {
if ( !normalize_config_dir() )
fprintf( stderr, "Configuration directory doesn't exist!\n" );
exit( 1 );
}
/**********************/
/* 1. read config.lua */
@ -652,10 +650,9 @@ int parse_args_and_read_config( int argc, char* argv[] )
/* After getting configs and params */
/* normalize config_dir again in case it's been modified */
if ( !normalize_config_dir() ) {
if ( !normalize_config_dir() )
fprintf( stderr, "Configuration directory doesn't exist!\n" );
exit( 1 );
}
normalize_filenames();
print_config |= verbose;