wbase: woc
mkdir -p bin
cp -a pack/qtbase/lib* bin
+ -cp -a pack/qtbase/*.dll bin
cp -a pack/qtbase/*.qm bin
server: wob
taurus:
-$(MKDIR) bin
cd taurus && $(QMAKE) $(QMCFG) $(QMAKEFLAGS) && $(MAKE)
+ #cd taurus/aurora && bash ./build-gpg.sh
$(COPY) taurus/lib/* bin/
-$(COPY) taurus/aurora/gpg/bin/gpg bin/
-$(COPY) taurus/aurora/gpg/bin/gpg.exe bin/
#include <QtCore/QtGlobal>
-#ifndef MAGICSMOKE_COMMON_LIB_BUILD
+#ifdef MAGICSMOKE_COMMON_LIB_BUILD
#define MAGICSMOKE_COMMON_EXPORT Q_DECL_EXPORT
#else
#define MAGICSMOKE_COMMON_EXPORT Q_DECL_IMPORT
#basics
TEMPLATE = lib
-VERSION = 0.1
+VERSION =
TARGET = magicsmoke-common
include(../basics.pri)
// Description: removes abstract flag from classes that only need to be abstract in PHP
//
//
-// Author: Konrad Rosenbaum <konrad@silmor.de>, (C) 2009-2011
+// Author: Konrad Rosenbaum <konrad@silmor.de>, (C) 2016
//
// Copyright: See README/COPYING.GPL files that come with this distribution
//
//
-#ifndef MAGICSMOKE_MOORDER_H
-#define MAGICSMOKE_MOORDER_H
+#ifndef MAGICSMOKE_KEYVALUE_H
+#define MAGICSMOKE_KEYVALUE_H
#include "MOKeyValuePairAbstract"
#include "misc.h"
WOBJECT(MOKeyValuePair)
public:
MOKeyValuePair(QString k,QString v){setkey(k);setvalue(v);setisnull(false);}
- MOKeyValuePair(QString k,nullptr_t){setkey(k);setisnull(true);}
+ MOKeyValuePair(QString k,std::nullptr_t){setkey(k);setisnull(true);}
inline operator QPair<QString,QString> ()
{
-Subproject commit f2a5d37c76272477abc5f5a1c668b7d1467be0ef
+Subproject commit 3a3c81aaaf035bd578c30ed37aba7875fed6765a
--- /dev/null
+//
+// C++ Interface: Random Number Retriever
+//
+//
+// Author: Konrad Rosenbaum <konrad@silmor.de>, (C) 2016
+//
+// Copyright: See README/COPYING.GPL files that come with this distribution
+//
+//
+
+#include "scrand.h"
+
+#ifdef Q_OS_WIN32
+#include <windows.h>
+//#pragma comment(lib, "advapi32.lib")
+#else
+#include <QFile>
+#endif
+
+#include <QDebug>
+
+namespace MagicSmokeRandom {
+
+/// Get some crypto strength random bytes. May return less than requested.
+QByteArray getRandomBytes(quint8 bytes)
+{
+ if(bytes==0)return QByteArray();
+#if defined(Q_OS_UNIX)||defined(Q_OS_LINUX)||defined(Q_OS_DARWIN)
+ //try urandom, then random
+ QFile fd("/dev/urandom");
+ if(!fd.open(QIODevice::ReadOnly)){
+ fd.setFileName("/dev/random");
+ if(!fd.open(QIODevice::ReadOnly)){
+ qDebug()<<"Unable to open /dev/{u}random - sorry.";
+ return QByteArray();
+ }
+ }
+ QByteArray r=fd.read(bytes);
+ fd.close();
+ return r;
+#elif defined(Q_OS_WIN32)
+ BYTE data[256];
+ HCRYPTPROV hCryptProv=0;
+ if (!::CryptAcquireContextW(&hCryptProv, 0, 0, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT | CRYPT_SILENT)){
+ qDebug()<<"Error: Unable to acquire crypto context.";
+ return QByteArray();
+ }
+ QByteArray r;
+ if(::CryptGenRandom(hCryptProv,bytes,data)){
+ r=QByteArray((const char*)data,bytes);
+ }else{
+ qDebug()<<"Error: Unable to get random numbers from OS.";
+ }
+ if(!::CryptReleaseContext(hCryptProv, 0))
+ qDebug()<<"Warning: unable to release crypto context!";
+ return r;
+#endif
+}
+
+}
#ifndef MAGICSMOKE_SC_RAND_H
#define MAGICSMOKE_SC_RAND_H
-#ifdef Q_OS_WIN32
-#include <windows.h>
-#pragma comment(lib, "advapi32.lib")
-#else
-#include <QFile>
-#endif
-
#include <QByteArray>
namespace MagicSmokeRandom {
/// Get some crypto strength random bytes. May return less than requested.
-inline QByteArray getRandomBytes(quint8 bytes)
-{
- if(bytes==0)return QByteArray();
-#if defined(Q_OS_UNIX)||defined(Q_OS_LINUX)||defined(Q_OS_DARWIN)
- //try urandom, then random
- QFile fd("/dev/urandom");
- if(!fd.open(QIODevice::ReadOnly)){
- fd.setFileName("/dev/random");
- if(!fd.open(QIODevice::ReadOnly)){
- qDebug()<<"Unable to open /dev/{u}random - sorry.";
- return QByteArray();
- }
- }
- QByteArray r=fd.read(bytes);
- fd.close();
- return r;
-#elif defined(Q_OS_WIN32)
- BYTE data[256];
- HCRYPTPROV hCryptProv=0;
- if (!::CryptAcquireContextW(&hProvider, 0, 0, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT | CRYPT_SILENT)){
- qDebug()<<"Error: Unable to acquire crypto context.";
- return QByteArray();
- }
- QByteArray r;
- if(::CryptGenRandom(hCryptProv,bytes,data)){
- r=QByteArray((const char*)data,bytes);
- }else{
- qDebug()<<"Error: Unable to get random numbers from OS.";
- }
- if(!::CryptReleaseContext(hProvider, 0))
- qDebug()<<"Warning: unable to release crypto context!";
- return r;
-#endif
-}
+QByteArray getRandomBytes(quint8 bytes);
}
# Random Stuff
+SOURCES += $$PWD/scrand.cpp
+
win32 {
-#LIBS += -ladvapi32
+ LIBS += -ladvapi32
}
#basics
TEMPLATE = lib
-VERSION = 0.1
+VERSION =
TARGET = magicsmoke-sesscli
include(../basics.pri)
smoke-sc_en.ts
#main source files
-SOURCES = scli.cpp
-HEADERS = scli.h
+SOURCES += scli.cpp
+HEADERS += scli.h
INCLUDEPATH += .
#make sure exports are ok
#basics
TEMPLATE = app
-VERSION = 0.1
+VERSION =
TARGET = magicsmoke-sessman
include(../basics.pri)
smoke-sm_en.ts
#main source files
-SOURCES = sman.cpp login.cpp
-HEADERS = sman.h login.h
+SOURCES += sman.cpp login.cpp
+HEADERS += sman.h login.h
INCLUDEPATH += .
DEPENDPATH += $$INCLUDEPATH