build: trial version target
builds now app and trail target, lib_gui added, istrail function
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
#ifndef INCLUDES_H
|
||||
#define INCLUDES_H
|
||||
|
||||
void setup(int argc, char *argv[]);
|
||||
|
||||
// platform specific include
|
||||
#include "platform_includes/@PLATFORM_INCLUDE@"
|
||||
|
||||
#endif // INCLUDES_H
|
||||
@@ -0,0 +1,12 @@
|
||||
#ifndef INCLUDES_DEFAULT_H
|
||||
#define INCLUDES_DEFAULT_H
|
||||
|
||||
static std::string appSettingsPath = "data/ApplicationSettings.xml";
|
||||
static std::string windowSettingsPath = "data/window_settings.ini";
|
||||
static std::string logPath = "data/log/";
|
||||
|
||||
void setup(int argc, char *argv[])
|
||||
{
|
||||
}
|
||||
|
||||
#endif // INCLUDES_DEFAULT_H
|
||||
@@ -0,0 +1,52 @@
|
||||
#ifndef INCLUDES_MAC_H
|
||||
#define INCLUDES_MAC_H
|
||||
|
||||
#include <CoreFoundation/CoreFoundation.h>
|
||||
#include <QApplication>
|
||||
#include <QDir>
|
||||
|
||||
static std::string appSettingsPath = "data/ApplicationSettings.xml";
|
||||
static std::string windowSettingsPath = "data/window_settings.ini";
|
||||
static std::string logPath = "data/log/";
|
||||
|
||||
void setup(int argc, char *argv[])
|
||||
{
|
||||
// ----------------------------------------------------------------------------
|
||||
// This makes relative paths work in C++ in Xcode by changing directory to the Resources folder inside the .app bundle
|
||||
// source: http://stackoverflow.com/questions/516200/relative-paths-not-working-in-xcode-c
|
||||
CFBundleRef mainBundle = CFBundleGetMainBundle();
|
||||
if (!mainBundle)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
CFStringRef bundleIdentifier = CFBundleGetIdentifier(mainBundle);
|
||||
// std::cout << CFStringGetCStringPtr(id, kCFStringEncodingASCII) << std::endl;
|
||||
if (!bundleIdentifier)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
CFURLRef resourcesURL = CFBundleCopyResourcesDirectoryURL(mainBundle);
|
||||
char path[PATH_MAX];
|
||||
if (CFURLGetFileSystemRepresentation(resourcesURL, TRUE, (UInt8 *)path, PATH_MAX))
|
||||
{
|
||||
chdir(path);
|
||||
}
|
||||
CFRelease(resourcesURL);
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// This makes the mac bundle search in the right place for the cocoa plugin
|
||||
// source: http://qt-project.org/doc/qt-4.8/deployment-mac.html
|
||||
QDir dir(argv[0]);
|
||||
if (dir.cd("../../PlugIns"))
|
||||
{
|
||||
QCoreApplication::setLibraryPaths(QStringList(dir.absolutePath()));
|
||||
// printf("after change, libraryPaths=(%s)\n", QCoreApplication::libraryPaths().join(",").toUtf8().data());
|
||||
}
|
||||
// ----------------------------------------------------------------------------
|
||||
}
|
||||
|
||||
#endif // INCLUDES_MAC_H
|
||||
@@ -0,0 +1,25 @@
|
||||
#ifndef INCLUDES_WINDOWS_H
|
||||
#define INCLUDES_WINDOWS_H
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "vld.h"
|
||||
|
||||
//#define DEPLOY
|
||||
|
||||
#ifdef DEPLOY
|
||||
static std::string appSettingsPath = std::string(std::getenv("APPDATA")) + "/../local/Coati Software/Coati/ApplicationSettings.xml";
|
||||
static std::string windowSettingsPath = std::string(std::getenv("APPDATA")) + "/../local/Coati Software/Coati/window_settings.ini";
|
||||
static std::string logPath = std::string(std::getenv("APPDATA")) + "/../local/Coati Software/Coati/log/";
|
||||
#else
|
||||
static std::string appSettingsPath = "data/ApplicationSettings.xml";
|
||||
static std::string windowSettingsPath = "data/window_settings.ini";
|
||||
static std::string logPath = "data/log/";
|
||||
#endif
|
||||
|
||||
void setup(int argc, char *argv[])
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
#endif // INCLUDES_WINDOWS_H
|
||||
Reference in New Issue
Block a user