Compare commits
4 Commits
60d2a83df5
...
d01baffb0b
| Author | SHA1 | Date | |
|---|---|---|---|
| d01baffb0b | |||
| 82cda42e75 | |||
| 5755d172cd | |||
| 0dd47f50a0 |
@@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.0)
|
|||||||
cmake_policy(SET CMP0017 NEW) # need include() with .cmake
|
cmake_policy(SET CMP0017 NEW) # need include() with .cmake
|
||||||
project(PIP)
|
project(PIP)
|
||||||
set(PIP_MAJOR 4)
|
set(PIP_MAJOR 4)
|
||||||
set(PIP_MINOR 5)
|
set(PIP_MINOR 6)
|
||||||
set(PIP_REVISION 0)
|
set(PIP_REVISION 0)
|
||||||
set(PIP_SUFFIX )
|
set(PIP_SUFFIX )
|
||||||
set(PIP_COMPANY SHS)
|
set(PIP_COMPANY SHS)
|
||||||
|
|||||||
@@ -147,7 +147,8 @@ void PITerminal::write(const PIByteArray & d) {
|
|||||||
if (PRIVATE->fd == 0) return;
|
if (PRIVATE->fd == 0) return;
|
||||||
// ssize_t wrote = 0;
|
// ssize_t wrote = 0;
|
||||||
// wrote =
|
// wrote =
|
||||||
::write(PRIVATE->fd, d.data(), d.size_s());
|
auto _r = ::write(PRIVATE->fd, d.data(), d.size_s());
|
||||||
|
NO_UNUSED(_r);
|
||||||
// piCout << "wrote" << wrote << d;
|
// piCout << "wrote" << wrote << d;
|
||||||
# endif
|
# endif
|
||||||
# endif
|
# endif
|
||||||
@@ -345,8 +346,8 @@ void PITerminal::getCursor(int & x, int & y) {
|
|||||||
int sz = 0;
|
int sz = 0;
|
||||||
PRIVATE->shm->read(&sz, 4);
|
PRIVATE->shm->read(&sz, 4);
|
||||||
# else
|
# else
|
||||||
x = PRIVATE->cur_x;
|
x = PRIVATE->cur_x;
|
||||||
y = PRIVATE->cur_y;
|
y = PRIVATE->cur_y;
|
||||||
# endif
|
# endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -933,7 +934,7 @@ void PITerminal::destroy() {
|
|||||||
}
|
}
|
||||||
if (PRIVATE->pipe != INVALID_HANDLE_VALUE) CloseHandle(PRIVATE->pipe);
|
if (PRIVATE->pipe != INVALID_HANDLE_VALUE) CloseHandle(PRIVATE->pipe);
|
||||||
if (PRIVATE->hConBuf != INVALID_HANDLE_VALUE) CloseHandle(PRIVATE->hConBuf);
|
if (PRIVATE->hConBuf != INVALID_HANDLE_VALUE) CloseHandle(PRIVATE->hConBuf);
|
||||||
// piCout << "destroy" << size_y;
|
// piCout << "destroy" << size_y;
|
||||||
# else
|
# else
|
||||||
# ifdef HAS_FORKPTY
|
# ifdef HAS_FORKPTY
|
||||||
if (PRIVATE->pid != 0) kill(PRIVATE->pid, SIGKILL);
|
if (PRIVATE->pid != 0) kill(PRIVATE->pid, SIGKILL);
|
||||||
|
|||||||
@@ -129,7 +129,8 @@ void PIWaitEvent::interrupt() {
|
|||||||
#ifdef WINDOWS
|
#ifdef WINDOWS
|
||||||
SetEvent(event);
|
SetEvent(event);
|
||||||
#else
|
#else
|
||||||
::write(pipe_fd[WriteEnd], "", 1);
|
auto _r = ::write(pipe_fd[WriteEnd], "", 1);
|
||||||
|
NO_UNUSED(_r);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -263,7 +263,8 @@ PIByteArray PIFile::readAll(bool forceRead) {
|
|||||||
if (s < 0) return a;
|
if (s < 0) return a;
|
||||||
a.resize(s);
|
a.resize(s);
|
||||||
seekToBegin();
|
seekToBegin();
|
||||||
fread(a.data(), 1, s, PRIVATE->fd);
|
auto _r = fread(a.data(), 1, s, PRIVATE->fd);
|
||||||
|
NO_UNUSED(_r);
|
||||||
seek(cp);
|
seek(cp);
|
||||||
if (s >= 0) a.resize(s);
|
if (s >= 0) a.resize(s);
|
||||||
return a;
|
return a;
|
||||||
@@ -517,10 +518,10 @@ PIFile::FileInfo PIFile::fileInfo(const PIString & path) {
|
|||||||
_stat_struct_ fs;
|
_stat_struct_ fs;
|
||||||
piZeroMemory(fs);
|
piZeroMemory(fs);
|
||||||
_stat_call_(path.data(), &fs);
|
_stat_call_(path.data(), &fs);
|
||||||
int mode = fs.st_mode;
|
int mode = fs.st_mode;
|
||||||
ret.size = fs.st_size;
|
ret.size = fs.st_size;
|
||||||
ret.id_user = fs.st_uid;
|
ret.id_user = fs.st_uid;
|
||||||
ret.id_group = fs.st_gid;
|
ret.id_group = fs.st_gid;
|
||||||
# ifdef ANDROID
|
# ifdef ANDROID
|
||||||
ret.time_access = PIDateTime::fromSystemTime(PISystemTime(fs.st_atime, fs.st_atime_nsec));
|
ret.time_access = PIDateTime::fromSystemTime(PISystemTime(fs.st_atime, fs.st_atime_nsec));
|
||||||
ret.time_modification = PIDateTime::fromSystemTime(PISystemTime(fs.st_mtime, fs.st_mtime_nsec));
|
ret.time_modification = PIDateTime::fromSystemTime(PISystemTime(fs.st_mtime, fs.st_mtime_nsec));
|
||||||
@@ -541,9 +542,9 @@ PIFile::FileInfo PIFile::fileInfo(const PIString & path) {
|
|||||||
# endif
|
# endif
|
||||||
# endif
|
# endif
|
||||||
# ifndef MICRO_PIP
|
# ifndef MICRO_PIP
|
||||||
ret.perm_user = FileInfo::Permissions((mode & S_IRUSR) == S_IRUSR, (mode & S_IWUSR) == S_IWUSR, (mode & S_IXUSR) == S_IXUSR);
|
ret.perm_user = FileInfo::Permissions((mode & S_IRUSR) == S_IRUSR, (mode & S_IWUSR) == S_IWUSR, (mode & S_IXUSR) == S_IXUSR);
|
||||||
ret.perm_group = FileInfo::Permissions((mode & S_IRGRP) == S_IRGRP, (mode & S_IWGRP) == S_IWGRP, (mode & S_IXGRP) == S_IXGRP);
|
ret.perm_group = FileInfo::Permissions((mode & S_IRGRP) == S_IRGRP, (mode & S_IWGRP) == S_IWGRP, (mode & S_IXGRP) == S_IXGRP);
|
||||||
ret.perm_other = FileInfo::Permissions((mode & S_IROTH) == S_IROTH, (mode & S_IWOTH) == S_IWOTH, (mode & S_IXOTH) == S_IXOTH);
|
ret.perm_other = FileInfo::Permissions((mode & S_IROTH) == S_IROTH, (mode & S_IWOTH) == S_IWOTH, (mode & S_IXOTH) == S_IXOTH);
|
||||||
piZeroMemory(fs);
|
piZeroMemory(fs);
|
||||||
_stat_link_(path.data(), &fs);
|
_stat_link_(path.data(), &fs);
|
||||||
mode &= ~S_IFLNK;
|
mode &= ~S_IFLNK;
|
||||||
|
|||||||
@@ -136,7 +136,10 @@ bool PISharedMemory::openDevice() {
|
|||||||
PRIVATE->owner = true;
|
PRIVATE->owner = true;
|
||||||
// piCoutObj << "created" << fd;
|
// piCoutObj << "created" << fd;
|
||||||
}
|
}
|
||||||
if (fd >= 0) ftruncate(fd, dsize);
|
if (fd >= 0) {
|
||||||
|
auto _r = ftruncate(fd, dsize);
|
||||||
|
NO_UNUSED(_r);
|
||||||
|
}
|
||||||
PRIVATE->data = mmap(0, dsize, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
|
PRIVATE->data = mmap(0, dsize, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
|
||||||
::close(fd);
|
::close(fd);
|
||||||
if (PRIVATE->data == MAP_FAILED) {
|
if (PRIVATE->data == MAP_FAILED) {
|
||||||
|
|||||||
@@ -492,7 +492,8 @@ void PIString::buildData(const char * cp) const {
|
|||||||
std::string u8str = ucs2conv.to_bytes((char16_t *)d.data(), (char16_t *)d.data() + d.size());
|
std::string u8str = ucs2conv.to_bytes((char16_t *)d.data(), (char16_t *)d.data() + d.size());
|
||||||
data_ = (char *)malloc(u8str.size() + 1);
|
data_ = (char *)malloc(u8str.size() + 1);
|
||||||
strcpy(data_, u8str.c_str());
|
strcpy(data_, u8str.c_str());
|
||||||
data_size_ = u8str.size();
|
data_[u8str.size()] = '\0';
|
||||||
|
data_size_ = u8str.size();
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,6 +21,7 @@
|
|||||||
|
|
||||||
#include "piincludes_p.h"
|
#include "piincludes_p.h"
|
||||||
#include "piintrospection_threads.h"
|
#include "piintrospection_threads.h"
|
||||||
|
#include "piliterals_time.h"
|
||||||
#include "pitime.h"
|
#include "pitime.h"
|
||||||
#include "pitranslator.h"
|
#include "pitranslator.h"
|
||||||
#ifndef MICRO_PIP
|
#ifndef MICRO_PIP
|
||||||
@@ -827,28 +828,16 @@ bool PIThread::waitForFinish(PISystemTime timeout) {
|
|||||||
// timeout_msecs;
|
// timeout_msecs;
|
||||||
if (!running_) return true;
|
if (!running_) return true;
|
||||||
if (timeout.isNull()) {
|
if (timeout.isNull()) {
|
||||||
while (running_) {
|
for (;;) {
|
||||||
piMinSleep();
|
if (_waitForFinish(PISystemTime::fromMilliseconds(PIP_MIN_MSLEEP))) break;
|
||||||
#ifdef WINDOWS
|
|
||||||
if (!isExists(PRIVATE->thread)) {
|
|
||||||
unlock();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
tmf_.reset();
|
PITimeMeasurer tm;
|
||||||
while (running_ && tmf_.elapsed() < timeout) {
|
while (tm.elapsed() < timeout) {
|
||||||
piMinSleep();
|
if (_waitForFinish(PISystemTime::fromMilliseconds(PIP_MIN_MSLEEP))) return true;
|
||||||
#ifdef WINDOWS
|
|
||||||
if (!isExists(PRIVATE->thread)) {
|
|
||||||
unlock();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
return tmf_.elapsed() < timeout;
|
return tm.elapsed() < timeout;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -859,10 +848,10 @@ bool PIThread::waitForStart(PISystemTime timeout) {
|
|||||||
piMinSleep();
|
piMinSleep();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
tms_.reset();
|
PITimeMeasurer tm;
|
||||||
while (!running_ && tms_.elapsed() < timeout)
|
while (!running_ && tm.elapsed() < timeout)
|
||||||
piMinSleep();
|
piMinSleep();
|
||||||
return tms_.elapsed() < timeout;
|
return tm.elapsed() < timeout;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -919,10 +908,9 @@ void PIThread::_endThread() {
|
|||||||
PIScopeExitCall ec([this] {
|
PIScopeExitCall ec([this] {
|
||||||
terminating = running_ = false;
|
terminating = running_ = false;
|
||||||
tid_ = -1;
|
tid_ = -1;
|
||||||
|
state_notifier.notify();
|
||||||
});
|
});
|
||||||
// while (PRIVATE->starting)
|
// PICout(PICoutManipulators::DefaultControls) << "thread" << this << "stop" << "...";
|
||||||
// piMinSleep();
|
|
||||||
// PICout(PICoutManipulators::DefaultControls) << "thread" << this << "stop" << "...";
|
|
||||||
stopped();
|
stopped();
|
||||||
// PICout(PICoutManipulators::DefaultControls) << "thread" << this << "stop" << "ok";
|
// PICout(PICoutManipulators::DefaultControls) << "thread" << this << "stop" << "ok";
|
||||||
if (lockRun) thread_mutex.lock();
|
if (lockRun) thread_mutex.lock();
|
||||||
@@ -962,10 +950,10 @@ void PIThread::__thread_func__() {
|
|||||||
// PICout(PICoutManipulators::DefaultControls) << "thread" << this << "wait" << "...";
|
// PICout(PICoutManipulators::DefaultControls) << "thread" << this << "wait" << "...";
|
||||||
PIINTROSPECTION_THREAD_WAIT(this);
|
PIINTROSPECTION_THREAD_WAIT(this);
|
||||||
if (delay_.isNotNull()) {
|
if (delay_.isNotNull()) {
|
||||||
tmr_.reset();
|
PITimeMeasurer tm;
|
||||||
double sl(0.);
|
double sl(0.);
|
||||||
while (1) {
|
while (1) {
|
||||||
sl = piMind(delay_.toMilliseconds() - tmr_.elapsed_m(), PIP_MIN_MSLEEP);
|
sl = piMind(delay_.toMilliseconds() - tm.elapsed_m(), PIP_MIN_MSLEEP);
|
||||||
if (terminating) break;
|
if (terminating) break;
|
||||||
if (sl <= 0.) break;
|
if (sl <= 0.) break;
|
||||||
piMSleep(sl);
|
piMSleep(sl);
|
||||||
@@ -1084,3 +1072,17 @@ void PIThread::setThreadName() {
|
|||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool PIThread::_waitForFinish(PISystemTime max_tm) {
|
||||||
|
if (!running_) return true;
|
||||||
|
state_notifier.waitFor(max_tm);
|
||||||
|
if (!running_) return true;
|
||||||
|
#ifdef WINDOWS
|
||||||
|
if (!isExists(PRIVATE->thread)) {
|
||||||
|
unlock();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|||||||
@@ -29,6 +29,7 @@
|
|||||||
#include "piinit.h"
|
#include "piinit.h"
|
||||||
#include "pimutex.h"
|
#include "pimutex.h"
|
||||||
#include "piobject.h"
|
#include "piobject.h"
|
||||||
|
#include "pithreadnotifier.h"
|
||||||
|
|
||||||
class PIThread;
|
class PIThread;
|
||||||
|
|
||||||
@@ -287,9 +288,9 @@ protected:
|
|||||||
llong tid_ = -1;
|
llong tid_ = -1;
|
||||||
void * data_ = nullptr;
|
void * data_ = nullptr;
|
||||||
mutable PIMutex thread_mutex;
|
mutable PIMutex thread_mutex;
|
||||||
PITimeMeasurer tmf_, tms_, tmr_;
|
|
||||||
PIThread::Priority priority_ = piNormal;
|
PIThread::Priority priority_ = piNormal;
|
||||||
ThreadFunc ret_func = nullptr;
|
ThreadFunc ret_func = nullptr;
|
||||||
|
PIThreadNotifier state_notifier;
|
||||||
PRIVATE_DECLARATION(PIP_EXPORT)
|
PRIVATE_DECLARATION(PIP_EXPORT)
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@@ -297,6 +298,7 @@ private:
|
|||||||
void _beginThread();
|
void _beginThread();
|
||||||
void _runThread();
|
void _runThread();
|
||||||
void _endThread();
|
void _endThread();
|
||||||
|
bool _waitForFinish(PISystemTime max_tm);
|
||||||
|
|
||||||
PIByteArray createThreadName(int size = 16) const;
|
PIByteArray createThreadName(int size = 16) const;
|
||||||
void setThreadName();
|
void setThreadName();
|
||||||
|
|||||||
@@ -115,6 +115,19 @@ void PIThreadNotifier::wait() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool PIThreadNotifier::waitFor(PISystemTime timeout) {
|
||||||
|
bool ret = false;
|
||||||
|
m.lock();
|
||||||
|
if (cnt == 0) v.waitFor(m, timeout);
|
||||||
|
if (cnt > 0) {
|
||||||
|
cnt--;
|
||||||
|
ret = true;
|
||||||
|
}
|
||||||
|
m.unlock();
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//! \~\details
|
//! \~\details
|
||||||
//! \~english
|
//! \~english
|
||||||
//! If many threads waiting, then notify randomly one.\n
|
//! If many threads waiting, then notify randomly one.\n
|
||||||
|
|||||||
@@ -37,6 +37,11 @@ public:
|
|||||||
//! \~russian Начать ожидание, продолжает когда другой поток вызовет \a notify()
|
//! \~russian Начать ожидание, продолжает когда другой поток вызовет \a notify()
|
||||||
void wait();
|
void wait();
|
||||||
|
|
||||||
|
//! \~english Start waiting no longer than "timeout", return \b true if other thread call \a notify(), \b false if timeout expired
|
||||||
|
//! \~russian Начать ожидание не дольше чем "timeout", возвращает \b true когда другой поток вызовал \a notify(), \b false если таймаут
|
||||||
|
//! истек
|
||||||
|
bool waitFor(PISystemTime timeout);
|
||||||
|
|
||||||
//! \~english Notify one waiting thread, which waiting on \a wait() function
|
//! \~english Notify one waiting thread, which waiting on \a wait() function
|
||||||
//! \~russian Уведомить один из ожидающих потоков, которые висят на методе \a wait()
|
//! \~russian Уведомить один из ожидающих потоков, которые висят на методе \a wait()
|
||||||
void notify();
|
void notify();
|
||||||
|
|||||||
@@ -317,6 +317,14 @@ PISystemTime PITimeMeasurer::elapsed() const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
PISystemTime PITimeMeasurer::elapsedAndReset() {
|
||||||
|
auto ct = PISystemTime::current(true);
|
||||||
|
auto ret = ct - t_st;
|
||||||
|
t_st = ct;
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// PISystemTime::Frequency
|
// PISystemTime::Frequency
|
||||||
|
|
||||||
PISystemTime PISystemTime::Frequency::toSystemTime() const {
|
PISystemTime PISystemTime::Frequency::toSystemTime() const {
|
||||||
|
|||||||
@@ -501,43 +501,24 @@ public:
|
|||||||
//! \~russian Возвращает в PISystemTime время, прошедшее с последнего вызова \a reset(), либо создания измерителя.
|
//! \~russian Возвращает в PISystemTime время, прошедшее с последнего вызова \a reset(), либо создания измерителя.
|
||||||
PISystemTime elapsed() const;
|
PISystemTime elapsed() const;
|
||||||
|
|
||||||
double reset_time_n() const { return t_st.toNanoseconds(); }
|
//! \~\brief
|
||||||
double reset_time_u() const { return t_st.toMicroseconds(); }
|
//! \~english Returns PISystemTime elapsed from last \a reset() execution or from timer measurer creation and call \a reset().
|
||||||
double reset_time_m() const { return t_st.toMilliseconds(); }
|
//! \~russian Возвращает в PISystemTime время, прошедшее с последнего вызова \a reset(), либо создания измерителя, и вызывает \a
|
||||||
double reset_time_s() const { return t_st.toSeconds(); }
|
//! reset().
|
||||||
|
PISystemTime elapsedAndReset();
|
||||||
|
|
||||||
//! \~\brief
|
//! \~\brief
|
||||||
//! \~english Returns time mark of last \a reset() execution or timer measurer creation.
|
//! \~english Returns time mark of last \a reset() execution or timer measurer creation.
|
||||||
//! \~russian Возвращает отметку времени последнего вызова \a reset(), либо создания измерителя.
|
//! \~russian Возвращает отметку времени последнего вызова \a reset(), либо создания измерителя.
|
||||||
PISystemTime reset_time() { return t_st; }
|
PISystemTime reset_time() DEPRECATEDM("use PISystemTime::resetTime()") { return t_st; }
|
||||||
|
|
||||||
//! \~\brief
|
//! \~\brief
|
||||||
//! \~english Returns nanoseconds representation of current system time.
|
//! \~english Returns time mark of last \a reset() execution or timer measurer creation.
|
||||||
//! \~russian Возвращает в наносекундах системное время.
|
//! \~russian Возвращает отметку времени последнего вызова \a reset(), либо создания измерителя.
|
||||||
static double elapsed_system_n() { return PISystemTime::current(true).toNanoseconds(); }
|
PISystemTime resetTime() const { return t_st; }
|
||||||
|
|
||||||
//! \~\brief
|
|
||||||
//! \~english Returns microseconds representation of current system time.
|
|
||||||
//! \~russian Возвращает в микросекундах системное время.
|
|
||||||
static double elapsed_system_u() { return PISystemTime::current(true).toMicroseconds(); }
|
|
||||||
|
|
||||||
//! \~\brief
|
|
||||||
//! \~english Returns milliseconds representation of current system time.
|
|
||||||
//! \~russian Возвращает в милисекундах системное время.
|
|
||||||
static double elapsed_system_m() { return PISystemTime::current(true).toMilliseconds(); }
|
|
||||||
|
|
||||||
//! \~\brief
|
|
||||||
//! \~english Returns seconds representation of current system time.
|
|
||||||
//! \~russian Возвращает в секундах системное время.
|
|
||||||
static double elapsed_system_s() { return PISystemTime::current(true).toSeconds(); }
|
|
||||||
|
|
||||||
//! \~\brief
|
|
||||||
//! \~english Returns time mark of current system time.
|
|
||||||
//! \~russian Возвращает системное время.
|
|
||||||
static PISystemTime elapsed_system() { return PISystemTime::current(true); }
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
PISystemTime t_st, t_cur;
|
PISystemTime t_st;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // PITIME_H
|
#endif // PITIME_H
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ void setCommands() {
|
|||||||
cmd_copydir = "cp -rf ";
|
cmd_copydir = "cp -rf ";
|
||||||
ign_err_suffix = " 2> /dev/null";
|
ign_err_suffix = " 2> /dev/null";
|
||||||
# ifdef MAC_OS
|
# ifdef MAC_OS
|
||||||
qplatforms = "cocoa";
|
qplatforms = "cocoa";
|
||||||
# else
|
# else
|
||||||
qplatforms = "xcb,wayland";
|
qplatforms = "xcb,wayland";
|
||||||
# endif
|
# endif
|
||||||
@@ -381,7 +381,8 @@ void copyWildcard(const PIString & from, const PIString & to) {
|
|||||||
PIFile::FileInfo fi(from);
|
PIFile::FileInfo fi(from);
|
||||||
system(("robocopy \"" + fi.dir() + "\" \"" + to + "\" \"" + fi.name() + "\" /E /NJH /NJS /NP /NDL /NS /NC /NFL 1> NUL").data());
|
system(("robocopy \"" + fi.dir() + "\" \"" + to + "\" \"" + fi.name() + "\" /E /NJH /NJS /NP /NDL /NS /NC /NFL 1> NUL").data());
|
||||||
#else
|
#else
|
||||||
system((cmd_copy + from + " \"" + to + "/\"" + cmd_suffix).data());
|
auto _r = system((cmd_copy + from + " \"" + to + "/\"" + cmd_suffix).data());
|
||||||
|
NO_UNUSED(_r);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -797,13 +798,14 @@ int main(int argc, char * argv[]) {
|
|||||||
if (need_cp) {
|
if (need_cp) {
|
||||||
piCout << "copy" << l;
|
piCout << "copy" << l;
|
||||||
if (!fake) {
|
if (!fake) {
|
||||||
system((cmd_copy + "\"" + l + "\" \"" + out_dir + "\"" + cmd_suffix).data());
|
auto _r = system((cmd_copy + "\"" + l + "\" \"" + out_dir + "\"" + cmd_suffix).data());
|
||||||
if (strip.isNotEmpty()) {
|
if (strip.isNotEmpty()) {
|
||||||
if (!otool.isEmpty()) // Apple
|
if (!otool.isEmpty()) // Apple
|
||||||
system((strip + " -S \"" + out_dir + fi.name() + "\"").data());
|
_r = system((strip + " -S \"" + out_dir + fi.name() + "\"").data());
|
||||||
else
|
else
|
||||||
system((strip + " --strip-unneeded \"" + out_dir + fi.name() + "\"").data());
|
_r = system((strip + " --strip-unneeded \"" + out_dir + fi.name() + "\"").data());
|
||||||
}
|
}
|
||||||
|
NO_UNUSED(_r);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -812,7 +814,10 @@ int main(int argc, char * argv[]) {
|
|||||||
PIString fd = findLib(f);
|
PIString fd = findLib(f);
|
||||||
if (!fd.isEmpty()) {
|
if (!fd.isEmpty()) {
|
||||||
piCout << "copy framework" << f;
|
piCout << "copy framework" << f;
|
||||||
if (!fake) system((cmd_copydir + "\"" + fd + "\" \"" + out_dir + "\"" + cmd_suffix).data());
|
if (!fake) {
|
||||||
|
auto _r = system((cmd_copydir + "\"" + fd + "\" \"" + out_dir + "\"" + cmd_suffix).data());
|
||||||
|
NO_UNUSED(_r);
|
||||||
|
}
|
||||||
} else
|
} else
|
||||||
miss_frameworks << f;
|
miss_frameworks << f;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user