From c4018319e891eb9df4d6b5467f420d99c5f622aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Touceda?= Date: Fri, 15 Nov 2013 13:55:34 -0300 Subject: Hotfix logfile condition --- src/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main.cpp') diff --git a/src/main.cpp b/src/main.cpp index e528289..ba770ce 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -163,7 +163,7 @@ main(int argc, char** argv) "import encodings.idna\n" // we need to make sure this is imported "sys.argv.append('--standalone')\n" "sys.argv.append('--debug')\n" - "if any(map(lambda x: x.startswith('--logfile') or x.startswith('-l'), sys.argv))\n" + "if not any(map(lambda x: x.startswith('--logfile') or x.startswith('-l'), sys.argv)):\n" " sys.argv.append('--logfile=bitmask.log')\n", global, global); py::exec_file("apps/launcher.py", -- cgit v1.2.3 From 5aa163f1519e96bdc16892d4073a86bd19df3bd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Touceda?= Date: Fri, 22 Nov 2013 14:04:14 -0300 Subject: Fix paths --- src/main.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/main.cpp') diff --git a/src/main.cpp b/src/main.cpp index ba770ce..66abb12 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -118,7 +118,8 @@ main(int argc, char** argv) fs::path full_path(fs::current_path()); updateIfNeeded(); - auto pypath = full_path.string() + ":" + full_path.string() + "/lib/"; + auto pypath = full_path.string() + "/apps/:" + full_path.string() + "/lib/"; + std::cout << pypath << std::endl; #if not defined _WIN32 && not defined _WIN64 fs::path fromCore("./lib/libQtCore.so.4"); fs::path toCore("./lib/libQtCore.NOTUSED"); @@ -155,8 +156,8 @@ main(int argc, char** argv) py::exec( "import sys\n" - "sys.path = [_pwd + '/lib',\n" - " _pwd + '/apps',\n" + "sys.path = [_pwd + '/apps',\n" + " _pwd + '/lib',\n" " _pwd + '/apps/eip',\n" " _pwd]\n" "import os\n" -- cgit v1.2.3 From ffc7b0eeb5d77b0fcd45ce44f4ebf3256ca4e8fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Touceda?= Date: Tue, 13 May 2014 16:32:28 -0300 Subject: Properly calculate the bundle directory --- src/main.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/main.cpp') diff --git a/src/main.cpp b/src/main.cpp index 66abb12..78aba3a 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -94,14 +94,14 @@ mergeDirectories(const fs::path &source, } void -updateIfNeeded() +updateIfNeeded(fs::path &full_path) { - fs::path updatePath(fs::current_path() / fs::path(UPDATES_DIR)); + fs::path updatePath(full_path / fs::path(UPDATES_DIR)); if (fs::exists(updatePath)) { std::cout << "Found updates, merging directories before doing anything..." << std::endl; - mergeDirectories(updatePath, fs::current_path()); + mergeDirectories(updatePath, full_path); fs::remove_all(updatePath); } else @@ -115,9 +115,9 @@ int main(int argc, char** argv) { try { - fs::path full_path(fs::current_path()); + fs::path full_path(fs::system_complete(argv[0]).parent_path()); - updateIfNeeded(); + updateIfNeeded(full_path); auto pypath = full_path.string() + "/apps/:" + full_path.string() + "/lib/"; std::cout << pypath << std::endl; #if not defined _WIN32 && not defined _WIN64 -- cgit v1.2.3 From 3b45e320964edee7cd9b114935ead200ff8e9c3a Mon Sep 17 00:00:00 2001 From: Ruben Pollan Date: Fri, 19 Sep 2014 11:51:43 -0500 Subject: Prevent incompatibility issues with c++11 Set BOOST_NO_CXX11_SCOPED_ENUMS fixes it --- src/main.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/main.cpp') diff --git a/src/main.cpp b/src/main.cpp index 78aba3a..d2f744a 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -5,8 +5,10 @@ #include #include +#define BOOST_NO_CXX11_SCOPED_ENUMS #include #include +#undef BOOST_NO_CXX11_SCOPED_ENUMS #include #include -- cgit v1.2.3 From 4615bd0e23288c2d5943c95babcad80305ad6f4b Mon Sep 17 00:00:00 2001 From: Ruben Pollan Date: Sun, 21 Sep 2014 14:19:03 -0500 Subject: Make symlinks instead of moving libraries around The updater has problems with moving files, as it things that the dissapear file is missing and needs to be updated. Instead we keep libQt* libs as lib/libQt*.non-ubuntu and make symlinks to them in case of needed by the platform. --- src/main.cpp | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'src/main.cpp') diff --git a/src/main.cpp b/src/main.cpp index d2f744a..eb709e9 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -3,6 +3,7 @@ #include #include #include +#include #include #define BOOST_NO_CXX11_SCOPED_ENUMS @@ -123,23 +124,25 @@ main(int argc, char** argv) auto pypath = full_path.string() + "/apps/:" + full_path.string() + "/lib/"; std::cout << pypath << std::endl; #if not defined _WIN32 && not defined _WIN64 - fs::path fromCore("./lib/libQtCore.so.4"); - fs::path toCore("./lib/libQtCore.NOTUSED"); - fs::path fromGui("./lib/libQtGui.so.4"); - fs::path toGui("./lib/libQtGui.NOTUSED"); + chdir("lib"); + fs::path fromCore("libQtCore.non-ubuntu"); + fs::path toCore("libQtCore.so.4"); + fs::path fromGui("libQtGui.non-ubuntu"); + fs::path toGui("libQtGui.so.4"); try { auto desk = std::string(getenv("DESKTOP_SESSION")); if(boost::starts_with(desk, "ubuntu")) { - fs::rename(fromCore, toCore); - fs::rename(fromGui, toGui); + fs::remove(toCore); + fs::remove(toGui); } else { - fs::rename(toCore, fromCore); - fs::rename(toGui, fromGui); + fs::create_symlink(fromCore, toCore); + fs::create_symlink(fromGui, toGui); } } catch(...) { } + chdir(".."); setenv("PYTHONPATH", pypath.c_str(), 1); #endif -- cgit v1.2.3 From a3f95c3ca516af4146f1bdf1c95fa1e2d133033f Mon Sep 17 00:00:00 2001 From: Ivan Alejandro Date: Tue, 23 Sep 2014 19:12:54 -0300 Subject: Revert "Prevent incompatibility issues with c++11" This reverts commit 3b45e320964edee7cd9b114935ead200ff8e9c3a. Remove define/undef since they cause an error in the launcher's compilation with the current bundler script that uses boost 1.56.0 --- src/main.cpp | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/main.cpp') diff --git a/src/main.cpp b/src/main.cpp index eb709e9..e7169c2 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -6,10 +6,8 @@ #include #include -#define BOOST_NO_CXX11_SCOPED_ENUMS #include #include -#undef BOOST_NO_CXX11_SCOPED_ENUMS #include #include -- cgit v1.2.3