summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomas Touceda <chiiph@leap.se>2013-04-08 16:17:03 -0300
committerTomas Touceda <chiiph@leap.se>2013-04-08 16:17:03 -0300
commit5a563871fed7c7a368a3aad9bece0c6b469d2234 (patch)
tree8da369cff4a56e8c992132b0b7629ad2dfef12af
parent60ad6a2a9cf28b21ba6a8b3f7eb82224e1212d67 (diff)
Add per platform bundle name to the launcher
-rw-r--r--src/launcher.py12
-rw-r--r--src/main.cpp1
2 files changed, 10 insertions, 3 deletions
diff --git a/src/launcher.py b/src/launcher.py
index be9b0cb..8b6c9a2 100644
--- a/src/launcher.py
+++ b/src/launcher.py
@@ -1,4 +1,5 @@
import os
+import platform
import time
import threading
@@ -6,6 +7,12 @@ from leap.app import main as leap_client
from thandy.ClientCLI import update as thandy_update
+bundles_per_platform = {
+ "Windows" : "/bundleinfo/LEAPClient-win/",
+ "Darwin" : "",
+ "Linux" : "/bundleinfo/LEAPClient/",
+}
+
class Thandy(threading.Thread):
def run(self):
while True:
@@ -19,13 +26,12 @@ class Thandy(threading.Thread):
"updates")
args = [
"--repo=repo/",
- "--debug", # TODO: remove debug
"--install",
- "/bundleinfo/LEAPClient/"
+ bundles_per_platform[platform.system()]
]
thandy_update(args)
except Exception as e:
- print "ERROR1:", e
+ print "ERROR:", e
finally:
time.sleep(60)
diff --git a/src/main.cpp b/src/main.cpp
index b685f60..ca066cd 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1,6 +1,7 @@
#include <iostream>
#include <vector>
#include <string>
+#include <cmath>
#include <boost/python.hpp>
#include <boost/filesystem/operations.hpp>