diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2f49aae8921ac0f4cabb2824676beb458b05c11b..ee7dc83e9f959566aae36ba79c6d0d1556fc65d7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -38,7 +38,7 @@ stages: - build expire_in: 1 day before_script: - - 'curl.exe -o artifacts.zip --header "JOB-TOKEN: $CI_JOB_TOKEN" "https://git.imp.fu-berlin.de/api/v4/projects/2576/jobs/artifacts/master/download?job=package%20windows%5bcuda%5d"' + - 'curl.exe -o artifacts.zip --header "JOB-TOKEN: $CI_JOB_TOKEN" "https://git.imp.fu-berlin.de/api/v4/projects/2576/jobs/artifacts/master/download?job=package%20windows"' - 7z e artifacts.zip; 7z e *.tar.xz; Remove-Item -Force *.tar.xz; 7z x *.tar; Remove-Item -Force *.tar - New-Item -ItemType Directory -Force 'dependencies' - $name='RF_Interfaces'; Move-Item -Force "$name-*" dependencies/$name @@ -63,13 +63,6 @@ build windows: paths: - build/*.tar.xz expire_in: 1 week - before_script: - - 'curl.exe -o artifacts.zip --header "JOB-TOKEN: $CI_JOB_TOKEN" "https://git.imp.fu-berlin.de/api/v4/projects/2576/jobs/artifacts/master/download?job=package%20windows%5bcuda%5d"' - - 7z e artifacts.zip; 7z e *.tar.xz; Remove-Item -Force *.tar.xz; 7z x *.tar; Remove-Item -Force *.tar - - New-Item -ItemType Directory -Force 'dependencies' - - $name='RF_Interfaces'; Move-Item -Force "$name-*" dependencies/$name - - $env:CMAKE_PREFIX_PATH="$((Get-Item -Path '.').FullName)/dependencies;$env:VCPKG_CUDA_INSTALL_DIR" - - C:/VsDevEnv.ps1 -arch=amd64 script: - ninja -C build package @@ -77,12 +70,25 @@ package ubuntu-18.04: <<: *base_ubuntu_18_04 dependencies: - build ubuntu-18.04 + before_script: + - 'curl -o artifacts.zip --header "JOB-TOKEN: $CI_JOB_TOKEN" "https://git.imp.fu-berlin.de/api/v4/projects/2576/jobs/artifacts/master/download?job=package%20ubuntu-18.04"' + - 7z e artifacts.zip; 7z e '*.tar.xz'; rm *.tar.xz; 7z x '*.tar'; rm *.tar + - mkdir dependencies + - name='RF_Interfaces'; mv $name-* dependencies/$name + - export CMAKE_PREFIX_PATH="$(pwd)/dependencies" <<: *package package windows: <<: *base_windows dependencies: - build windows + before_script: + - 'curl.exe -o artifacts.zip --header "JOB-TOKEN: $CI_JOB_TOKEN" "https://git.imp.fu-berlin.de/api/v4/projects/2576/jobs/artifacts/master/download?job=package%20windows%5bcuda%5d"' + - 7z e artifacts.zip; 7z e *.tar.xz; Remove-Item -Force *.tar.xz; 7z x *.tar; Remove-Item -Force *.tar + - New-Item -ItemType Directory -Force 'dependencies' + - $name='RF_Interfaces'; Move-Item -Force "$name-*" dependencies/$name + - $env:CMAKE_PREFIX_PATH="$((Get-Item -Path '.').FullName)/dependencies;$env:VCPKG_CUDA_INSTALL_DIR" + - C:/VsDevEnv.ps1 -arch=amd64 <<: *package trigger dependents: diff --git a/SrcBehaviorLoader/PluginLoader.cpp b/SrcBehaviorLoader/PluginLoader.cpp index 404d0fe49bbb6f4f12e227bca1d669f2859f58a5..70355ca3c6e4dec0fd4123169d30ca4284d1f8fb 100644 --- a/SrcBehaviorLoader/PluginLoader.cpp +++ b/SrcBehaviorLoader/PluginLoader.cpp @@ -172,7 +172,7 @@ bool endsWith(std::string value, std::string ending) return std::equal(ending.rbegin(), ending.rend(), value.rbegin()); } -std::vector<std::string> PluginLoader::searchDirectoriesForPlugins(std::vector<std::string> list){ +std::vector<std::string> PluginLoader::searchDirectoriesForPlugins(std::vector<std::string> list, std::string suffix){ //Search directories std::vector<std::string> filesFromFolders; @@ -182,12 +182,12 @@ std::vector<std::string> PluginLoader::searchDirectoriesForPlugins(std::vector<s if (!file.empty() && file[file.size() - 1] == '/') { for (auto& p : std::filesystem::directory_iterator(file)) { std::string s = p.path().string(); - if(endsWith(s,".robo_tracker.dll") || endsWith(s,".robo_tracker.so")) + if(endsWith(s,suffix+".dll") || endsWith(s,suffix+".so")) filesFromFolders.push_back(s); } } else { - if(endsWith(f,".robo_tracker.dll") || endsWith(f,".robo_tracker.so")) + if(endsWith(f,suffix+".dll") || endsWith(f,suffix+".so")) filesFromFolders.push_back(f); } } diff --git a/SrcBehaviorLoader/PluginLoader.h b/SrcBehaviorLoader/PluginLoader.h index 439e62e4b1b8caf639fd73cdb8555e77eabdd4b9..b9d4542a769726ed6960fff52d1f1ba35dd59610 100644 --- a/SrcBehaviorLoader/PluginLoader.h +++ b/SrcBehaviorLoader/PluginLoader.h @@ -16,7 +16,7 @@ public: QJsonObject getPluginMetaData() const; static std::vector<std::string> queryRegistryBehaviors(std::string path); - static std::vector<std::string> searchDirectoriesForPlugins(std::vector<std::string> list); + static std::vector<std::string> searchDirectoriesForPlugins(std::vector<std::string> list, std::string suffix); //return oldPath static const char* addDllPath(std::string file);