Hopefully fixed issue with config paths, also adding Debug builds as well as Release autobuilds.

This commit is contained in:
Michael J. Manley
2022-06-22 13:47:12 -07:00
parent deae32e2c6
commit fa9c5ef6c0
10 changed files with 371 additions and 211 deletions

View File

@@ -1,157 +0,0 @@
name: C/C++ CI
on:
push:
branches: [ master, dev ]
pull_request:
branches: [ master, dev ]
jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- name: Ubuntu 64bit (gcc)
os: ubuntu-latest
args: -DUSE_NETWORKING=ON -DCMAKE_BUILD_TYPE=Release -DPCEM_VERSION_STRING="vNext build ${GITHUB_SHA::8}"
artifacts_name: PCem-vNext-Ubuntu-${{ github.run_number }}
artifacts_path: PCem-${{ github.sha }}.tar.bz2
installdeps: >-
libsdl2-dev
libopenal-dev
libwxgtk3.0-gtk3-dev
libpcap-dev
cmake
ninja-build
- name: Windows 32bits (MSYS2)
os: windows-latest
compiler: MINGW32
args: -DUSE_NETWORKING=ON -DCMAKE_BUILD_TYPE=Release -DPCEM_VERSION_STRING="vNext build ${GITHUB_SHA::8}"
artifacts_name: PCem-vNext-Windows-MINGW32-${{ github.run_number }}
artifacts_path: PCem-${{ github.sha }}.zip
installdeps: >-
base-devel
zip
unzip
mingw-w64-i686-ntldd-git
mingw-w64-i686-toolchain
mingw-w64-i686-SDL2
mingw-w64-i686-openal
mingw-w64-i686-wxWidgets
mingw-w64-i686-cmake
mingw-w64-i686-libpcap
mingw-w64-i686-ninja
- name: Windows 64bits (MSYS2)
os: windows-latest
compiler: MINGW64
args: -DUSE_NETWORKING=ON -DCMAKE_BUILD_TYPE=Release -DPCEM_VERSION_STRING="vNext build ${GITHUB_SHA::8}"
artifacts_name: PCem-vNext-Windows-MINGW64-${{ github.run_number }}
artifacts_path: PCem-${{ github.sha }}.zip
installdeps: >-
base-devel
zip
unzip
mingw-w64-x86_64-ntldd-git
mingw-w64-x86_64-toolchain
mingw-w64-x86_64-SDL2
mingw-w64-x86_64-openal
mingw-w64-x86_64-wxWidgets
mingw-w64-x86_64-cmake
mingw-w64-x86_64-libpcap
mingw-w64-x86_64-ninja
runs-on: ${{ matrix.os }}
name: ${{ matrix.name }}
steps:
- uses: actions/checkout@v2
with:
path: temp
fetch-depth: 0
- name: Setup MSYS2 (Windows)
if: runner.os == 'Windows'
# You may pin to the exact commit or the version.
# uses: msys2/setup-msys2@a43b8403533fffe0c157dd8498f021ddec66bff7
uses: msys2/setup-msys2@v2
with:
# Variant of the environment to set by default: MSYS, MINGW32, MINGW64, UCRT64 or CLANG64
msystem: ${{ matrix.compiler }}
# Retrieve and extract base installation from upstream GitHub Releases
release: false # optional, default is true
# Update MSYS2 installation through pacman
update: false
# Install packages after installation through pacman
install: ${{ matrix.installdeps }}
- name: Setup ubuntu dependencies
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install ${{ matrix.installdeps }}
# Copy all the sources to the dist folder, before we start generating intermediate files.
- name: prepare-package (Windows)
if: runner.os == 'Windows'
shell: msys2 {0}
run: |
mkdir dist
mkdir dist/src
cp -R ./temp/* dist/src
rm -Rf ./dist/src/.git
- name: configure (Windows)
if: runner.os == 'Windows'
shell: msys2 {0}
run: |
export INSTALL_PREFIX=$(pwd)/dist
mkdir temp/build
cd temp/build
cmake -G "Ninja" -DMSYS=TRUE -DCMAKE_INSTALL_PREFIX=$INSTALL_PREFIX ${{ matrix.args }} ..
- name: ninja (Windows)
if: runner.os == 'Windows'
shell: msys2 {0}
run: |
cd temp/build
ninja
- name: package (Windows)
if: runner.os == 'Windows'
shell: msys2 {0}
run: |
export INSTALL_PREFIX=$(pwd)/dist
cd temp/build
ninja install
cd $INSTALL_PREFIX
ntldd -R "bin/pcem.exe" | sed -e 's/^[[:blank:]]*//g' | cut -d ' ' -f 3 | grep -E -i '(mingw|clang)(32|64)' | sed -e 's|\\|/|g' | xargs cp --target-directory="bin"
zip -r -9 ${{ matrix.artifacts_path }} *
- name: prepare-package (Linux)
if: runner.os == 'Linux'
run: |
mkdir dist
mkdir dist/src
cp -R ./temp/* dist/src
rm -Rf ./dist/src/.git
- name: configure (Linux)
if: runner.os == 'Linux'
run: |
mkdir temp/build
cd temp/build
cmake -G "Ninja" ${{ matrix.args }} ..
- name: ninja (Linux)
if: runner.os == 'Linux'
run: |
cd temp/build
ninja
- name: package (Linux)
if: runner.os == 'Linux'
run: |
export DESTDIR=$(pwd)/dist
cd temp/build
ninja install
cd $DESTDIR
tar -cjf ${{ matrix.artifacts_path }} *
- name: "Upload GitHub Actions artifacts"
uses: actions/upload-artifact@v2
with:
name: ${{ matrix.artifacts_name }}
path: ./dist/${{ matrix.artifacts_path }}

157
.github/workflows/test-debug-builds.yml vendored Normal file
View File

@@ -0,0 +1,157 @@
name: Test Debug Builds
on:
push:
branches: [master, dev]
pull_request:
branches: [master, dev]
jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- name: Ubuntu 64bit (gcc)
os: ubuntu-latest
args: -DUSE_NETWORKING=ON -DCMAKE_BUILD_TYPE=Debug -DPCEM_VERSION_STRING="vNext build ${GITHUB_SHA::8}"
artifacts_name: PCem-Debug-vNext-Ubuntu-${{ github.run_number }}
artifacts_path: PCem-Debug-${{ github.sha }}.tar.bz2
installdeps: >-
libsdl2-dev
libopenal-dev
libwxgtk3.0-gtk3-dev
libpcap-dev
cmake
ninja-build
- name: Windows 32bits (MSYS2)
os: windows-latest
compiler: MINGW32
args: -DUSE_NETWORKING=ON -DCMAKE_BUILD_TYPE=Debug -DPCEM_VERSION_STRING="vNext build ${GITHUB_SHA::8}"
artifacts_name: PCem-Debug-vNext-Windows-MINGW32-${{ github.run_number }}
artifacts_path: PCem-Debug-${{ github.sha }}.zip
installdeps: >-
base-devel
zip
unzip
mingw-w64-i686-ntldd-git
mingw-w64-i686-toolchain
mingw-w64-i686-SDL2
mingw-w64-i686-openal
mingw-w64-i686-wxWidgets
mingw-w64-i686-cmake
mingw-w64-i686-libpcap
mingw-w64-i686-ninja
- name: Windows 64bits (MSYS2)
os: windows-latest
compiler: MINGW64
args: -DUSE_NETWORKING=ON -DCMAKE_BUILD_TYPE=Debug -DPCEM_VERSION_STRING="vNext build ${GITHUB_SHA::8}"
artifacts_name: PCem-Debug-vNext-Windows-MINGW64-${{ github.run_number }}
artifacts_path: PCem-Debug-${{ github.sha }}.zip
installdeps: >-
base-devel
zip
unzip
mingw-w64-x86_64-ntldd-git
mingw-w64-x86_64-toolchain
mingw-w64-x86_64-SDL2
mingw-w64-x86_64-openal
mingw-w64-x86_64-wxWidgets
mingw-w64-x86_64-cmake
mingw-w64-x86_64-libpcap
mingw-w64-x86_64-ninja
runs-on: ${{ matrix.os }}
name: ${{ matrix.name }}
steps:
- uses: actions/checkout@v2
with:
path: temp
fetch-depth: 0
- name: Setup MSYS2 (Windows)
if: runner.os == 'Windows'
# You may pin to the exact commit or the version.
# uses: msys2/setup-msys2@a43b8403533fffe0c157dd8498f021ddec66bff7
uses: msys2/setup-msys2@v2
with:
# Variant of the environment to set by default: MSYS, MINGW32, MINGW64, UCRT64 or CLANG64
msystem: ${{ matrix.compiler }}
# Retrieve and extract base installation from upstream GitHub Releases
release: false # optional, default is true
# Update MSYS2 installation through pacman
update: false
# Install packages after installation through pacman
install: ${{ matrix.installdeps }}
- name: Setup ubuntu dependencies
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install ${{ matrix.installdeps }}
# Copy all the sources to the dist folder, before we start generating intermediate files.
- name: prepare-package (Windows)
if: runner.os == 'Windows'
shell: msys2 {0}
run: |
mkdir dist
mkdir dist/src
cp -R ./temp/* dist/src
rm -Rf ./dist/src/.git
- name: configure (Windows)
if: runner.os == 'Windows'
shell: msys2 {0}
run: |
export INSTALL_PREFIX=$(pwd)/dist
mkdir temp/build
cd temp/build
cmake -G "Ninja" -DMSYS=TRUE -DCMAKE_INSTALL_PREFIX=$INSTALL_PREFIX ${{ matrix.args }} ..
- name: ninja (Windows)
if: runner.os == 'Windows'
shell: msys2 {0}
run: |
cd temp/build
ninja
- name: package (Windows)
if: runner.os == 'Windows'
shell: msys2 {0}
run: |
export INSTALL_PREFIX=$(pwd)/dist
cd temp/build
ninja install
cd $INSTALL_PREFIX
ntldd -R "bin/pcem.exe" | sed -e 's/^[[:blank:]]*//g' | cut -d ' ' -f 3 | grep -E -i '(mingw|clang)(32|64)' | sed -e 's|\\|/|g' | xargs cp --target-directory="bin"
zip -r -9 ${{ matrix.artifacts_path }} *
- name: prepare-package (Linux)
if: runner.os == 'Linux'
run: |
mkdir dist
mkdir dist/src
cp -R ./temp/* dist/src
rm -Rf ./dist/src/.git
- name: configure (Linux)
if: runner.os == 'Linux'
run: |
mkdir temp/build
cd temp/build
cmake -G "Ninja" ${{ matrix.args }} ..
- name: ninja (Linux)
if: runner.os == 'Linux'
run: |
cd temp/build
ninja
- name: package (Linux)
if: runner.os == 'Linux'
run: |
export DESTDIR=$(pwd)/dist
cd temp/build
ninja install
cd $DESTDIR
tar -cjf ${{ matrix.artifacts_path }} *
- name: 'Upload GitHub Actions artifacts'
uses: actions/upload-artifact@v2
with:
name: ${{ matrix.artifacts_name }}
path: ./dist/${{ matrix.artifacts_path }}

View File

@@ -0,0 +1,157 @@
name: Test Release Builds
on:
push:
branches: [master, dev]
pull_request:
branches: [master, dev]
jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- name: Ubuntu 64bit (gcc)
os: ubuntu-latest
args: -DUSE_NETWORKING=ON -DCMAKE_BUILD_TYPE=Release -DPCEM_VERSION_STRING="vNext build ${GITHUB_SHA::8}"
artifacts_name: PCem-vNext-Ubuntu-${{ github.run_number }}
artifacts_path: PCem-${{ github.sha }}.tar.bz2
installdeps: >-
libsdl2-dev
libopenal-dev
libwxgtk3.0-gtk3-dev
libpcap-dev
cmake
ninja-build
- name: Windows 32bits (MSYS2)
os: windows-latest
compiler: MINGW32
args: -DUSE_NETWORKING=ON -DCMAKE_BUILD_TYPE=Release -DPCEM_VERSION_STRING="vNext build ${GITHUB_SHA::8}"
artifacts_name: PCem-vNext-Windows-MINGW32-${{ github.run_number }}
artifacts_path: PCem-${{ github.sha }}.zip
installdeps: >-
base-devel
zip
unzip
mingw-w64-i686-ntldd-git
mingw-w64-i686-toolchain
mingw-w64-i686-SDL2
mingw-w64-i686-openal
mingw-w64-i686-wxWidgets
mingw-w64-i686-cmake
mingw-w64-i686-libpcap
mingw-w64-i686-ninja
- name: Windows 64bits (MSYS2)
os: windows-latest
compiler: MINGW64
args: -DUSE_NETWORKING=ON -DCMAKE_BUILD_TYPE=Release -DPCEM_VERSION_STRING="vNext build ${GITHUB_SHA::8}"
artifacts_name: PCem-vNext-Windows-MINGW64-${{ github.run_number }}
artifacts_path: PCem-${{ github.sha }}.zip
installdeps: >-
base-devel
zip
unzip
mingw-w64-x86_64-ntldd-git
mingw-w64-x86_64-toolchain
mingw-w64-x86_64-SDL2
mingw-w64-x86_64-openal
mingw-w64-x86_64-wxWidgets
mingw-w64-x86_64-cmake
mingw-w64-x86_64-libpcap
mingw-w64-x86_64-ninja
runs-on: ${{ matrix.os }}
name: ${{ matrix.name }}
steps:
- uses: actions/checkout@v2
with:
path: temp
fetch-depth: 0
- name: Setup MSYS2 (Windows)
if: runner.os == 'Windows'
# You may pin to the exact commit or the version.
# uses: msys2/setup-msys2@a43b8403533fffe0c157dd8498f021ddec66bff7
uses: msys2/setup-msys2@v2
with:
# Variant of the environment to set by default: MSYS, MINGW32, MINGW64, UCRT64 or CLANG64
msystem: ${{ matrix.compiler }}
# Retrieve and extract base installation from upstream GitHub Releases
release: false # optional, default is true
# Update MSYS2 installation through pacman
update: false
# Install packages after installation through pacman
install: ${{ matrix.installdeps }}
- name: Setup ubuntu dependencies
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install ${{ matrix.installdeps }}
# Copy all the sources to the dist folder, before we start generating intermediate files.
- name: prepare-package (Windows)
if: runner.os == 'Windows'
shell: msys2 {0}
run: |
mkdir dist
mkdir dist/src
cp -R ./temp/* dist/src
rm -Rf ./dist/src/.git
- name: configure (Windows)
if: runner.os == 'Windows'
shell: msys2 {0}
run: |
export INSTALL_PREFIX=$(pwd)/dist
mkdir temp/build
cd temp/build
cmake -G "Ninja" -DMSYS=TRUE -DCMAKE_INSTALL_PREFIX=$INSTALL_PREFIX ${{ matrix.args }} ..
- name: ninja (Windows)
if: runner.os == 'Windows'
shell: msys2 {0}
run: |
cd temp/build
ninja
- name: package (Windows)
if: runner.os == 'Windows'
shell: msys2 {0}
run: |
export INSTALL_PREFIX=$(pwd)/dist
cd temp/build
ninja install
cd $INSTALL_PREFIX
ntldd -R "bin/pcem.exe" | sed -e 's/^[[:blank:]]*//g' | cut -d ' ' -f 3 | grep -E -i '(mingw|clang)(32|64)' | sed -e 's|\\|/|g' | xargs cp --target-directory="bin"
zip -r -9 ${{ matrix.artifacts_path }} *
- name: prepare-package (Linux)
if: runner.os == 'Linux'
run: |
mkdir dist
mkdir dist/src
cp -R ./temp/* dist/src
rm -Rf ./dist/src/.git
- name: configure (Linux)
if: runner.os == 'Linux'
run: |
mkdir temp/build
cd temp/build
cmake -G "Ninja" ${{ matrix.args }} ..
- name: ninja (Linux)
if: runner.os == 'Linux'
run: |
cd temp/build
ninja
- name: package (Linux)
if: runner.os == 'Linux'
run: |
export DESTDIR=$(pwd)/dist
cd temp/build
ninja install
cd $DESTDIR
tar -cjf ${{ matrix.artifacts_path }} *
- name: 'Upload GitHub Actions artifacts'
uses: actions/upload-artifact@v2
with:
name: ${{ matrix.artifacts_name }}
path: ./dist/${{ matrix.artifacts_path }}

View File

@@ -106,6 +106,8 @@ message(" PCem Plugin Directory: ${PCEM_PLUGIN_DIR}")
message(" PCem Include File Directory: ${PCEM_INCLUDE_DIR}")
message("***************************************************************")
set(PCEM_DEFINES ${PCEM_DEFINES} PLUGIN_DIR="${CMAKE_INSTALL_PREFIX}/${PCEM_PLUGIN_DIR}")
include(${CMAKE_SOURCE_DIR}/cmake/debugdefines.cmake)
include(${CMAKE_SOURCE_DIR}/cmake/apple.cmake)

View File

@@ -1,5 +1,3 @@
set(PCEM_DEFINES ${PCEM_DEFINES} PLUGIN_DIR="${CMAKE_INSTALL_PREFIX}/${PCEM_PLUGIN_DIR}")
if(CMAKE_BUILD_TYPE STREQUAL "Debug" OR (CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo" AND NOT PCEM_RELDEB_AS_RELEASE))
set(PCEM_DEFINES ${PCEM_DEFINES} DEBUG)

View File

@@ -1,18 +0,0 @@
set(CMAKE_SYSTEM_NAME Windows)
# cross compilers to use for C and C++
set(CMAKE_C_COMPILER ${TOOLCHAIN_PREFIX}-gcc)
set(CMAKE_CXX_COMPILER ${TOOLCHAIN_PREFIX}-g++)
set(CMAKE_Fortran_COMPILER ${TOOLCHAIN_PREFIX}-gfortran)
set(CMAKE_RC_COMPILER ${TOOLCHAIN_PREFIX}-windres)
# target environment on the build host system
# set 1st to dir with the cross compiler's C/C++ headers/libs
set(CMAKE_FIND_ROOT_PATH /usr/${TOOLCHAIN_PREFIX} /usr/${TOOLCHAIN_PREFIX}/sys-root/mingw)
# modify default behavior of FIND_XXX() commands to
# search for headers/libs in the target environment and
# search for programs in the build host environment
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)

View File

@@ -1,4 +0,0 @@
set(TOOLCHAIN_PREFIX i686-w64-mingw32)
set(CMAKE_SYSTEM_PROCESSOR i386)
include(${CMAKE_CURRENT_LIST_DIR}/fedora-mingw.cmake)

View File

@@ -1,4 +0,0 @@
set(TOOLCHAIN_PREFIX x86_64-w64-mingw32)
set(CMAKE_SYSTEM_PROCESSOR x86_64)
include(${CMAKE_CURRENT_LIST_DIR}/fedora-mingw.cmake)

View File

View File

@@ -30,7 +30,8 @@ char plugins_default_path[512];
char nvr_default_path[512];
char get_path_separator() {
char get_path_separator()
{
#ifdef _WIN32
return ';';
#else
@@ -38,16 +39,20 @@ char get_path_separator() {
#endif
}
int get_roms_path(int pos, char *s, int size) {
int get_roms_path(int pos, char *s, int size)
{
int j, i, z, len;
char path_separator;
path_separator = get_path_separator();
len = strlen(roms_paths);
j = 0;
for (i = 0; i < len; i++) {
if (roms_paths[i] == path_separator || i == len - 1) {
if ((pos--) == 0) {
for (i = 0; i < len; i++)
{
if (roms_paths[i] == path_separator || i == len - 1)
{
if ((pos--) == 0)
{
z = (i - j) + ((i == len - 1) ? 1 : 0);
safe_strncpy(s, roms_paths + j, size);
s[(size - 1 < z) ? size - 1 : z] = 0;
@@ -59,7 +64,8 @@ int get_roms_path(int pos, char *s, int size) {
return 0;
}
void set_roms_paths(char *path) {
void set_roms_paths(char *path)
{
char s[512];
int j, i, z, len;
char path_separator[2];
@@ -70,13 +76,16 @@ void set_roms_paths(char *path) {
len = strlen(path);
j = 0;
num_roms_paths = 0;
for (i = 0; i < len; i++) {
if (path[i] == path_separator[0] || i == len - 1) {
for (i = 0; i < len; i++)
{
if (path[i] == path_separator[0] || i == len - 1)
{
z = (i - j) + ((i == len - 1) ? 1 : 0) + 1;
safe_strncpy(s, path + j, z);
s[(511 < z) ? 511 : z] = 0;
append_slash(s, 512);
if (dir_exists(s)) {
if (dir_exists(s))
{
if (num_roms_paths > 0)
strcat(roms_paths, path_separator);
strcat(roms_paths, s);
@@ -87,65 +96,77 @@ void set_roms_paths(char *path) {
}
}
int dir_exists(char *path) {
int dir_exists(char *path)
{
return wx_dir_exists(path);
}
void set_nvr_path(char *s) {
void set_nvr_path(char *s)
{
safe_strncpy(nvr_path, s, 512);
append_slash(nvr_path, 512);
}
void set_logs_path(char *s) {
void set_logs_path(char *s)
{
safe_strncpy(logs_path, s, 512);
append_slash(logs_path, 512);
}
void set_configs_path(char *s) {
void set_configs_path(char *s)
{
safe_strncpy(configs_path, s, 512);
append_slash(configs_path, 512);
}
void set_screenshots_path(char *s) {
void set_screenshots_path(char *s)
{
safe_strncpy(screenshots_path, s, 512);
append_slash(screenshots_path, 512);
}
/* set the default roms paths, this makes them permanent */
void set_default_roms_paths(char *s) {
void set_default_roms_paths(char *s)
{
safe_strncpy(default_roms_paths, s, 4096);
set_roms_paths(s);
}
/* set the default nvr path, this makes it permanent */
void set_default_nvr_path(char *s) {
void set_default_nvr_path(char *s)
{
safe_strncpy(default_nvr_path, s, 512);
set_nvr_path(s);
}
void set_default_nvr_default_path(char *s) {
void set_default_nvr_default_path(char *s)
{
safe_strncpy(nvr_default_path, s, 512);
}
/* set the default logs path, this makes it permanent */
void set_default_logs_path(char *s) {
void set_default_logs_path(char *s)
{
safe_strncpy(default_logs_path, s, 512);
set_logs_path(s);
}
/* set the default configs path, this makes it permanent */
void set_default_configs_path(char *s) {
void set_default_configs_path(char *s)
{
safe_strncpy(default_configs_path, s, 512);
set_configs_path(s);
}
/* set the default screenshots path, this makes it permanent */
void set_default_screenshots_path(char *s) {
void set_default_screenshots_path(char *s)
{
safe_strncpy(default_screenshots_path, s, 512);
set_screenshots_path(s);
}
void paths_loadconfig() {
void paths_loadconfig()
{
char *cfg_roms_paths = config_get_string(CFG_GLOBAL, "Paths", "roms_paths", 0);
char *cfg_nvr_path = config_get_string(CFG_GLOBAL, "Paths", "nvr_path", 0);
char *cfg_configs_path = config_get_string(CFG_GLOBAL, "Paths", "configs_path", 0);
@@ -164,7 +185,8 @@ void paths_loadconfig() {
safe_strncpy(default_screenshots_path, cfg_screenshots_path, 512);
}
void paths_saveconfig() {
void paths_saveconfig()
{
config_set_string(CFG_GLOBAL, "Paths", "roms_paths", default_roms_paths);
config_set_string(CFG_GLOBAL, "Paths", "nvr_path", default_nvr_path);
config_set_string(CFG_GLOBAL, "Paths", "configs_path", default_configs_path);
@@ -172,7 +194,8 @@ void paths_saveconfig() {
config_set_string(CFG_GLOBAL, "Paths", "screenshots_path", default_screenshots_path);
}
void paths_onconfigloaded() {
void paths_onconfigloaded()
{
if (strlen(default_roms_paths) > 0)
set_roms_paths(default_roms_paths);
@@ -192,7 +215,8 @@ void paths_onconfigloaded() {
}
/* initialize default paths */
void paths_init() {
void paths_init()
{
char s[512];
char *p;
@@ -205,21 +229,27 @@ void paths_init() {
/* set up default paths for this session */
append_filename(s, pcem_path, "roms/", 512);
set_roms_paths(s);
set_default_roms_paths(s);
append_filename(s, pcem_path, "nvr/", 512);
set_nvr_path(s);
set_default_nvr_path(s);
append_filename(s, pcem_path, "configs/", 512);
set_configs_path(s);
set_default_configs_path(s);
append_filename(s, pcem_path, "screenshots/", 512);
set_screenshots_path(s);
set_default_screenshots_path(s);
append_filename(s, pcem_path, "logs/", 512);
set_logs_path(s);
set_default_logs_path(s);
append_filename(s, pcem_path, "nvr/default/", 512);
set_default_nvr_default_path(s);
add_config_callback(paths_loadconfig, paths_saveconfig, paths_onconfigloaded);
}
void get_pcem_path(char *s, int size) {
void get_pcem_path(char *s, int size)
{
#ifdef __linux
wx_get_home_directory(s);
strcat(s, ".pcem/");
@@ -242,4 +272,3 @@ void get_pcem_path(char *s, int size) {
strcpy(s, path);
#endif
}