~igor-cali/bilancio/trunk-a18

« back to all changes in this revision

Viewing changes to src/platformsetup.cpp

  • Committer: Igor Calì
  • Date: 2024-04-07 15:42:12 UTC
  • Revision ID: igor.cali0@gmail.com-20240407154212-za8iy8efo91nwmz9
[Desktop] Code security harneded based on Flawfinder checks; [Android] Code security hardening baseline based on Insider checks.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/***************************************************************
2
2
 * Name:      platformsetup.cpp
3
3
 * Purpose:   Specific definition for OS platform
4
 
 * Author:    Igor Cal� (igor.cali0@gmail.com)
 
4
 * Author:    Igor Calì (igor.cali0@gmail.com)
5
5
 * Created:   2022-04-27
6
 
 * Copyright: Igor Cal� (igor.cali0@gmail.com)
 
6
 * Copyright: Igor Calì (igor.cali0@gmail.com)
7
7
 * License:             GNU
8
8
 **************************************************************/
9
9
 
10
10
#ifndef PLATFORMSETUP_CPP_INCLUDED
11
11
#define PLATFORMSETUP_CPP_INCLUDED
12
 
 
13
 
#include <wx/string.h>
14
 
 
 
12
 
 
13
#include <wx/string.h>
 
14
 
15
15
#ifdef __WXMSW__
16
16
  #include <wx/filefn.h>
17
17
  #include "platformsetup.h"
18
 
 
19
 
  wxString DataDir = wxGetCwd() + L"\\";
20
 
  wxString ShareDir = DataDir;
21
 
#else
22
 
        #ifdef __FLATPAK__
23
 
                // TODO (igor#1#): Check if can be retrieved programmatically
24
 
                wxString DataDir = L"/var/lib/flatpak/app/com.igisw.openmoneybox/current/active/files/etc/openmoneybox/";               // Program data directory
25
 
                wxString ShareDir = L"/var/lib/flatpak/app/com.igisw.openmoneybox/current/active/files/share/";                 // OS shared durectory
26
 
        #else
27
 
                wxString DataDir = L"/etc/openmoneybox/";               // Program data directory
28
 
                wxString ShareDir = L"/usr/share/";                     // OS shared durectory
29
 
        #endif // _FLATPAK
 
18
 
 
19
  wxString DataDir = wxGetCwd() + L"\\";
 
20
  wxString ShareDir = DataDir;
 
21
#else
 
22
        #ifdef __FLATPAK__
 
23
                // TODO (igor#1#): Check if can be retrieved programmatically
 
24
                wxString DataDir = L"/var/lib/flatpak/app/com.igisw.openmoneybox/current/active/files/etc/openmoneybox/";               // Program data directory
 
25
                wxString ShareDir = L"/var/lib/flatpak/app/com.igisw.openmoneybox/current/active/files/share/";                 // OS shared durectory
 
26
        #else
 
27
                wxString DataDir = L"/etc/openmoneybox/";               // Program data directory
 
28
                wxString ShareDir = L"/usr/share/";                     // OS shared durectory
 
29
        #endif // _FLATPAK
30
30
#endif // __WXMSW__
31
 
 
32
 
#ifdef __WXGTK__
33
 
        wxString Console = "xterm -hold -e ";   // Console prompt
34
 
#endif // __WXGTK__
 
31
 
 
32
#ifdef __WXGTK__
 
33
        wxString Console = "xterm -hold -e ";   // Console prompt
 
34
#endif // __WXGTK__
35
35
 
36
36
#endif  // PLATFORMSETUP_CPP_INCLUDED