Remove dependency on std::filesystem and fix a compilation error.
This commit is contained in:
parent
fd9b2184bf
commit
74cab50cee
4 changed files with 20 additions and 13 deletions
|
@ -27,7 +27,6 @@ target_compile_options(applen PRIVATE
|
|||
${NCURSESW_CFLAGS_OTHER}
|
||||
${LIBEVDEV_CFLAGS_OTHER}
|
||||
)
|
||||
target_compile_features(applen PUBLIC cxx_std_17)
|
||||
|
||||
target_link_libraries(applen PRIVATE
|
||||
${NCURSESW_LIBRARIES}
|
||||
|
@ -36,11 +35,5 @@ target_link_libraries(applen PRIVATE
|
|||
appleii
|
||||
)
|
||||
|
||||
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9.0)
|
||||
target_link_libraries(applen PRIVATE
|
||||
stdc++fs
|
||||
)
|
||||
endif()
|
||||
|
||||
add_custom_target(copy-resources ALL
|
||||
COMMAND cmake -E copy_directory ${CMAKE_SOURCE_DIR}/resource ${CMAKE_BINARY_DIR}/resource)
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
#include "frontends/ncurses/configuration.h"
|
||||
|
||||
#include "Log.h"
|
||||
#include "linux/windows/files.h"
|
||||
|
||||
#include <boost/property_tree/ini_parser.hpp>
|
||||
#include <filesystem>
|
||||
|
||||
class Configuration
|
||||
{
|
||||
|
@ -31,7 +31,7 @@ std::shared_ptr<Configuration> Configuration::instance;
|
|||
|
||||
Configuration::Configuration(const std::string & filename) : myFilename(filename)
|
||||
{
|
||||
if (std::filesystem::exists(filename))
|
||||
if (GetFileAttributes(myFilename.c_str()) != INVALID_FILE_ATTRIBUTES)
|
||||
{
|
||||
boost::property_tree::ini_parser::read_ini(myFilename, myINI);
|
||||
}
|
||||
|
|
16
source/linux/duplicates/Speaker.cpp
Normal file
16
source/linux/duplicates/Speaker.cpp
Normal file
|
@ -0,0 +1,16 @@
|
|||
#include "StdAfx.h"
|
||||
|
||||
#include "YamlHelper.h"
|
||||
#include "Common.h"
|
||||
|
||||
void SpkrLoadSnapshot(YamlLoadHelper&)
|
||||
{
|
||||
}
|
||||
|
||||
void SpkrSaveSnapshot(YamlSaveHelper&)
|
||||
{
|
||||
}
|
||||
|
||||
void SpkrUpdate_Timer()
|
||||
{
|
||||
}
|
|
@ -113,10 +113,8 @@ HANDLE CreateFile(LPCTSTR lpFileName,
|
|||
|
||||
DWORD GetFileAttributes(const char * filename)
|
||||
{
|
||||
const int exists = access(filename, F_OK);
|
||||
if (exists)
|
||||
return INVALID_FILE_ATTRIBUTES;
|
||||
|
||||
// minimum is R_OK
|
||||
// no point checking F_OK as it is useless
|
||||
const int read = access(filename, R_OK);
|
||||
if (read)
|
||||
return INVALID_FILE_ATTRIBUTES;
|
||||
|
|
Loading…
Add table
Reference in a new issue