Commit e471e6f7 authored by Michał Glinka's avatar Michał Glinka

Merge branch 'rc' into devel

parents 9ce9aa92 d449fac9
......@@ -36,6 +36,7 @@ add_executable(ddedmn
target_link_libraries(ddedmn
PRIVATE
Szarp2
${XMLRPCEPI_LIBRARIES}
)
add_executable(dpafdmn
......
......@@ -84,8 +84,6 @@
#include "config.h"
#ifdef HAVE_XMLRPC_EPI_H
#include <string>
#include <vector>
#include <algorithm>
......@@ -548,14 +546,3 @@ int main(int argc, char *argv[]) {
dded.Run();
}
#else
#include <iostream>
int main(int argc, char *argv[]) {
std::cerr << "SZARP need to be compiled with xmlrpc-epi library for this program to work" << std::endl;
return 1;
}
#endif
......@@ -5907,7 +5907,7 @@ W skryptach LUA dost
<itemizedlist>
<listitem>
<para>
nazwa parametru,
nazwa parametru (prefiksowana nazw bazy),
</para>
</listitem>
<listitem>
......
......@@ -305,9 +305,19 @@ bool DrawApp::OnInit() {
//wxLog *logger = new wxLogGui();
wxLog::SetActiveTarget(logger);
std::string home_path = getenv("HOME");
m_instance = std::make_unique<FileLocker>(home_path + "/.draw3_defined_lock");
m_instance->checkLockCorrectness();
if(getenv("HOME") != nullptr) {
std::string home_path = getenv("HOME");
if(home_path.empty() == false) {
m_instance = std::make_unique<FileLocker>(home_path + "/.draw3_defined_lock");
m_instance->checkLockCorrectness();
}
else {
m_instance = nullptr;
}
}
else {
m_instance = nullptr;
}
SetMaxCoreDumpLimit();
InitGL();
......@@ -598,6 +608,11 @@ bool DrawApp::OnCmdLineParsed(wxCmdLineParser &parser) {
}
void DrawApp::CheckActiveInstance() {
if(m_instance == nullptr) {
read_only = true;
return;
}
if (m_instance->tryLocking()) {
read_only = false;
} else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment