summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJohann Latocha2010-07-07 00:38:57 +0200
committerJohann Latocha2010-07-07 00:38:57 +0200
commitb8931920233f245060be5b837cb3f7dc08a7c02e (patch)
treeeb45228933f717bbc31b8be6b593ec062c090839 /src
parentinitial import of latest svn version (diff)
downloadpvs-b8931920233f245060be5b837cb3f7dc08a7c02e.tar.gz
pvs-b8931920233f245060be5b837cb3f7dc08a7c02e.tar.xz
pvs-b8931920233f245060be5b837cb3f7dc08a7c02e.zip
jjls first git commit ever! (svn changes since r793)
Diffstat (limited to 'src')
-rw-r--r--src/pvsDaemon.cpp21
-rw-r--r--src/version.h4
2 files changed, 13 insertions, 12 deletions
diff --git a/src/pvsDaemon.cpp b/src/pvsDaemon.cpp
index 961e0f3..e87bfe7 100644
--- a/src/pvsDaemon.cpp
+++ b/src/pvsDaemon.cpp
@@ -66,11 +66,13 @@ int main(int argc, char** argv)
{
int frequency = 5;
int port = -1;
- QString homeDir("/home/");
- QString scriptPath = homeDir;
- scriptPath.append(getUserName().append(QString("/.pvs/pvs-vncsrv")));
- QString scriptName;
- scriptName = getFilenameFromPath(scriptPath);
+
+ QFileInfo script;
+ script.setFile("/usr/bin/pvs-vncsrv");
+ if (!script.exists())
+ script.setFile("/usr/local/bin/pvs-vncsrv");
+ if (!script.exists())
+ script.setFile("/home/" + getUserName() + "/.pvs/pvs-vncsrv");
QCoreApplication app(argc, argv);
app.setOrganizationName("openslx");
@@ -259,8 +261,7 @@ int main(int argc, char** argv)
{
if (option_index + 1 < argc)
{
- scriptPath = QString(argv[option_index + 1]);
- scriptName = getFilenameFromPath(scriptPath);
+ script.setFile(QString(argv[option_index + 1]));
option_index++;
continue;
}
@@ -347,13 +348,13 @@ int main(int argc, char** argv)
if (port <= 0)
port = SERVER_PORT_INT;
ConsoleLog writeLine(QString("TCP-Port: ").append(int2String(port)));
- mainClient->setScriptPath(scriptPath);
- ConsoleLog writeLine(QString("VNCScriptPath: ").append(scriptPath));
+ mainClient->setScriptPath(script.filePath());
+ ConsoleLog writeLine(QString("VNCScriptPath: ").append(script.filePath()));
createPolicyDir();
createPolicyFiles();
// long int gr = 0;
- mainClient->setScriptPath(scriptPath);
+ mainClient->setScriptPath(script.filePath());
app.exec();
delete mainClient;
diff --git a/src/version.h b/src/version.h
index c217c07..ac24ac2 100644
--- a/src/version.h
+++ b/src/version.h
@@ -1,2 +1,2 @@
-#define VERSION_STRING "1.9.8.0"
-#define VERSION_NUMBER 1980
+#define VERSION_STRING "2.0.1.0"
+#define VERSION_NUMBER 2010