Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
chrxh committed Dec 29, 2023
2 parents ff086fe + 825c6df commit 18f7b99
Show file tree
Hide file tree
Showing 63 changed files with 1,673 additions and 836 deletions.
7 changes: 5 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,9 @@ add_compile_definitions($<$<COMPILE_LANGUAGE:CXX>:NOMINMAX>)
add_compile_options($<$<COMPILE_LANGUAGE:CUDA>:--Werror=all-warnings>)

add_executable(alien)
add_executable(tests)
add_executable(cli)
add_executable(EngineTests)
add_executable(NetworkTests)

find_package(CUDAToolkit)
find_package(Boost REQUIRED)
Expand All @@ -62,12 +63,14 @@ find_package(CLI11 CONFIG REQUIRED)

add_subdirectory(external/ImFileDialog)
add_subdirectory(source/Base)
add_subdirectory(source/Cli)
add_subdirectory(source/EngineGpuKernels)
add_subdirectory(source/EngineImpl)
add_subdirectory(source/EngineInterface)
add_subdirectory(source/EngineTests)
add_subdirectory(source/Gui)
add_subdirectory(source/Cli)
add_subdirectory(source/Network)
add_subdirectory(source/NetworkTests)

# Copy resources to the build location
add_custom_command(
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ Further information and artwork:
An Nvidia graphics card with compute capability 6.0 or higher is needed. Please check [https://en.wikipedia.org/wiki/CUDA#GPUs_supported](https://en.wikipedia.org/wiki/CUDA#GPUs_supported).

# 💽 Installer
Installer for Windows: [alien-installer.msi](https://alien-project.org/media/files/alien-installer.msi) (Updated: 2023-12-10)
Installer for Windows: [alien-installer.msi](https://alien-project.org/media/files/alien-installer.msi) (Updated: 2023-12-29)

In the case that the program crashes for an unknown reason, please refer to the troubleshooting section in [alien-project.org/downloads.html](https://alien-project.org/downloads.html).

Expand Down
14 changes: 14 additions & 0 deletions RELEASE-NOTES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# Release notes

## [4.6.0] - 2023-12-29
### Added
- gui/browser: support for displaying folders and subfolders
- gui/browser: folders for simulations and genomes are automatically created by parsing their names for `/`
- gui/browser: allow uploading to a selected folder
- gui/browser: show number of simulations per folder

### Changed
- gui/browser: tree view instead of a pure tabular view
- gui/browser: simulations and genomes can be selected for user actions (e.g. deletion)

### Removed
- gui/browser: column for actions removed

## [4.5.1] - 2023-12-16
### Added
- new simulation parameters to reduce energy particle absorption for cells with fewer connections
Expand Down
8 changes: 4 additions & 4 deletions imgui.ini
Original file line number Diff line number Diff line change
Expand Up @@ -274,8 +274,8 @@ Size=556,448
Collapsed=0

[Window][Browser]
Pos=177,203
Size=1287,597
Pos=172,78
Size=1252,825
Collapsed=0

[Window][Login]
Expand All @@ -294,8 +294,8 @@ Size=463,153
Collapsed=0

[Window][Upload simulation]
Pos=733,403
Size=400,218
Pos=641,346
Size=454,354
Collapsed=0

[Window][Upload genome]
Expand Down
6 changes: 3 additions & 3 deletions source/Base/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

add_library(alien_base_lib
add_library(Base
Definitions.cpp
Definitions.h
Exceptions.h
Expand All @@ -25,8 +25,8 @@ add_library(alien_base_lib
VersionChecker.cpp
VersionChecker.h)

target_link_libraries(alien_base_lib Boost::boost)
target_link_libraries(Base Boost::boost)

if (MSVC)
target_compile_options(alien_base_lib PRIVATE "/MP")
target_compile_options(Base PRIVATE "/MP")
endif()
2 changes: 2 additions & 0 deletions source/Base/LoggingService.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ class LoggingService
void unregisterCallBack(LoggingCallBack* callback);

private:
LoggingService() = default;

std::vector<LoggingCallBack*> _callbacks;
std::mutex _mutex;
};
Expand Down
2 changes: 1 addition & 1 deletion source/Base/Resources.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Const
{
std::string const ProgramVersion = "4.5.1";
std::string const ProgramVersion = "4.6.0";
std::string const DiscordLink = "https://discord.gg/7bjyZdXXQ2";

std::string const BasePath = "resources/";
Expand Down
8 changes: 4 additions & 4 deletions source/Cli/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ target_sources(cli
PUBLIC
Main.cpp)

target_link_libraries(cli alien_base_lib)
target_link_libraries(cli alien_engine_gpu_kernels_lib)
target_link_libraries(cli alien_engine_impl_lib)
target_link_libraries(cli alien_engine_interface_lib)
target_link_libraries(cli Base)
target_link_libraries(cli EngineGpuKernels)
target_link_libraries(cli EngineImpl)
target_link_libraries(cli EngineInterface)

target_link_libraries(cli CUDA::cudart_static)
target_link_libraries(cli CUDA::cuda_driver)
Expand Down
8 changes: 4 additions & 4 deletions source/EngineGpuKernels/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

add_library(alien_engine_gpu_kernels_lib
add_library(EngineGpuKernels
Array.cuh
AttackerProcessor.cuh
Base.cuh
Expand Down Expand Up @@ -92,8 +92,8 @@ add_library(alien_engine_gpu_kernels_lib
Util.cuh
)

target_link_libraries(alien_engine_gpu_kernels_lib alien_base_lib)
target_link_libraries(alien_engine_gpu_kernels_lib alien_engine_interface_lib)
target_link_libraries(EngineGpuKernels Base)
target_link_libraries(EngineGpuKernels EngineInterface)

# See https://gitlab.kitware.com/cmake/cmake/-/issues/17520
set_property(TARGET alien_engine_gpu_kernels_lib PROPERTY CUDA_RESOLVE_DEVICE_SYMBOLS ON)
set_property(TARGET EngineGpuKernels PROPERTY CUDA_RESOLVE_DEVICE_SYMBOLS ON)
12 changes: 6 additions & 6 deletions source/EngineImpl/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

add_library(alien_engine_impl_lib
add_library(EngineImpl
AccessDataTOCache.cpp
AccessDataTOCache.h
DescriptionConverter.cpp
Expand All @@ -10,12 +10,12 @@ add_library(alien_engine_impl_lib
SimulationControllerImpl.cpp
SimulationControllerImpl.h)

target_link_libraries(alien_engine_impl_lib alien_base_lib)
target_link_libraries(alien_engine_impl_lib alien_engine_gpu_kernels_lib)
target_link_libraries(EngineImpl Base)
target_link_libraries(EngineImpl EngineGpuKernels)

target_link_libraries(alien_engine_impl_lib CUDA::cudart_static)
target_link_libraries(alien_engine_impl_lib Boost::boost)
target_link_libraries(EngineImpl CUDA::cudart_static)
target_link_libraries(EngineImpl Boost::boost)

if (MSVC)
target_compile_options(alien_engine_impl_lib PRIVATE "/MP")
target_compile_options(EngineImpl PRIVATE "/MP")
endif()
10 changes: 5 additions & 5 deletions source/EngineInterface/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

add_library(alien_engine_interface_lib
add_library(EngineInterface
ArraySizes.h
AuxiliaryData.h
AuxiliaryDataParserService.cpp
Expand Down Expand Up @@ -49,13 +49,13 @@ add_library(alien_engine_interface_lib
StatisticsHistory.h
ZoomLevels.h)

target_link_libraries(alien_engine_interface_lib Boost::boost)
target_link_libraries(alien_engine_interface_lib cereal)
target_link_libraries(EngineInterface Boost::boost)
target_link_libraries(EngineInterface cereal)
target_link_libraries(alien ZLIB::ZLIB)

find_path(ZSTR_INCLUDE_DIRS "zstr.hpp")
target_include_directories(alien_engine_interface_lib PRIVATE ${ZSTR_INCLUDE_DIRS})
target_include_directories(EngineInterface PRIVATE ${ZSTR_INCLUDE_DIRS})

if (MSVC)
target_compile_options(alien_engine_interface_lib PRIVATE "/MP")
target_compile_options(EngineInterface PRIVATE "/MP")
endif()
2 changes: 1 addition & 1 deletion source/EngineInterface/Colors.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ namespace Const
uint32_t const CellFunctionInfoColor = 0x404090;
uint32_t const BranchNumberInfoColor = 0x000000;

uint32_t const NothingnessColor = 0x000000;
uint32_t const VoidColor = 0x000000;
}

template <typename T>
Expand Down
28 changes: 14 additions & 14 deletions source/EngineTests/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
target_sources(tests
target_sources(EngineTests
PUBLIC
AttackerTests.cpp
CellConnectionTests.cpp
Expand All @@ -20,20 +20,20 @@ PUBLIC
Testsuite.cpp
TransmitterTests.cpp)

target_link_libraries(tests alien_base_lib)
target_link_libraries(tests alien_engine_gpu_kernels_lib)
target_link_libraries(tests alien_engine_impl_lib)
target_link_libraries(tests alien_engine_interface_lib)
target_link_libraries(EngineTests Base)
target_link_libraries(EngineTests EngineGpuKernels)
target_link_libraries(EngineTests EngineImpl)
target_link_libraries(EngineTests EngineInterface)

target_link_libraries(tests CUDA::cudart_static)
target_link_libraries(tests CUDA::cuda_driver)
target_link_libraries(tests Boost::boost)
target_link_libraries(tests OpenGL::GL OpenGL::GLU)
target_link_libraries(tests GLEW::GLEW)
target_link_libraries(tests glfw)
target_link_libraries(tests glad::glad)
target_link_libraries(tests GTest::GTest GTest::Main)
target_link_libraries(EngineTests CUDA::cudart_static)
target_link_libraries(EngineTests CUDA::cuda_driver)
target_link_libraries(EngineTests Boost::boost)
target_link_libraries(EngineTests OpenGL::GL OpenGL::GLU)
target_link_libraries(EngineTests GLEW::GLEW)
target_link_libraries(EngineTests glfw)
target_link_libraries(EngineTests glad::glad)
target_link_libraries(EngineTests GTest::GTest GTest::Main)

if (MSVC)
target_compile_options(tests PRIVATE "/MP")
target_compile_options(EngineTests PRIVATE "/MP")
endif()
11 changes: 5 additions & 6 deletions source/Gui/ActivateUserDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,20 @@
#include <imgui.h>

#include "EngineInterface/SimulationController.h"
#include "Network/NetworkService.h"

#include "AlienImGui.h"
#include "MessageDialog.h"
#include "NetworkController.h"
#include "BrowserWindow.h"
#include "CreateUserDialog.h"
#include "StyleRepository.h"

_ActivateUserDialog::_ActivateUserDialog(
SimulationController const& simController,
BrowserWindow const& browserWindow,
NetworkController const& networkController)
BrowserWindow const& browserWindow)
: _AlienDialog("Activate user")
, _simController(simController)
, _browserWindow(browserWindow)
, _networkController(networkController)
{}

_ActivateUserDialog::~_ActivateUserDialog() {}
Expand Down Expand Up @@ -81,10 +79,11 @@ void _ActivateUserDialog::processIntern()

void _ActivateUserDialog::onActivateUser()
{
auto result = _networkController->activateUser(_userName, _password, _userInfo, _confirmationCode);
auto& networkService = NetworkService::getInstance();
auto result = networkService.activateUser(_userName, _password, _userInfo, _confirmationCode);
if (result) {
LoginErrorCode errorCode;
result |= _networkController->login(errorCode, _userName, _password, _userInfo);
result |= networkService.login(errorCode, _userName, _password, _userInfo);
}
if (!result) {
MessageDialog::getInstance().information("Error", "An error occurred on the server. Your entered code may be incorrect.\nPlease try to register again.");
Expand Down
6 changes: 3 additions & 3 deletions source/Gui/ActivateUserDialog.h
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
#pragma once

#include "Network/NetworkService.h"

#include "AlienDialog.h"
#include "Definitions.h"
#include "NetworkController.h"

class _ActivateUserDialog : public _AlienDialog
{
public:
_ActivateUserDialog(SimulationController const& simController, BrowserWindow const& browserWindow, NetworkController const& networkController);
_ActivateUserDialog(SimulationController const& simController, BrowserWindow const& browserWindow);
~_ActivateUserDialog();

void registerCyclicReferences(CreateUserDialogWeakPtr const& createUserDialog);
Expand All @@ -20,7 +21,6 @@ class _ActivateUserDialog : public _AlienDialog

SimulationController _simController;
BrowserWindow _browserWindow;
NetworkController _networkController;
CreateUserDialogWeakPtr _createUserDialog;

std::string _userName;
Expand Down
2 changes: 1 addition & 1 deletion source/Gui/AlienImGui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ void AlienImGui::InputFloat2(InputFloat2Parameters const& parameters, float& val

ImGuiInputTextFlags flags = parameters._readOnly ? ImGuiInputTextFlags_ReadOnly : ImGuiInputTextFlags_None;
ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x - textWidth);
float value[2];
static float value[2];
value[0] = value1;
value[1] = value2;
ImGui::InputFloat2(("##" + parameters._name).c_str(), value, parameters._format.c_str(), flags);
Expand Down
Loading

0 comments on commit 18f7b99

Please sign in to comment.