naev 0.11.5
env.c
1/*
2 * See Licensing and Copyright notice in naev.h
3 */
5#include <assert.h>
6#include <limits.h>
7#include <stdlib.h>
10#include "env.h"
11
12#include "log.h"
13#include "nstring.h"
14
15env_t env;
16
17void env_detect( int argc, char **argv )
18{
19 (void) argc;
20 static short once = 0;
21 assert( once == 0 );
22 once = 1;
23
24 env.appimage = getenv( "APPIMAGE" );
25 if (env.appimage != NULL) {
26 env.isAppImage = 1;
27 env.argv0 = getenv( "ARGV0" );
28 env.appdir = getenv( "APPDIR" );
29 }
30 else {
31 env.isAppImage = 0;
32 env.argv0 = argv[0];
33 }
34}
Definition env.h:10