Skip to content

Commit 88375d9

Browse files
committed
Update version to v0.21.33
1 parent e4672ce commit 88375d9

File tree

10 files changed

+23
-16
lines changed

10 files changed

+23
-16
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
cmake_minimum_required(VERSION 3.25.2 FATAL_ERROR)
22

33
# ---- Project ----
4-
project(RAYX VERSION 0.21.32)
4+
project(RAYX VERSION 0.21.33)
55
set(CMAKE_CXX_STANDARD 23)
66
set(CMAKE_CXX_STANDARD_REQUIRED ON)
77
set(CMAKE_CUDA_STANDARD 20)

Intern/rayx-core/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,10 +217,10 @@ install(TARGETS ${PROJECT_NAME}
217217
LIBRARY DESTINATION lib
218218
ARCHIVE DESTINATION lib
219219
)
220-
install(DIRECTORY ${CMAKE_SOURCE_DIR}/Data
220+
install(DIRECTORY ${CMAKE_SOURCE_DIR}/Data/
221221
DESTINATION ${INSTALL_DATA_DIR}
222222
FILES_MATCHING PATTERN "*")
223-
install(DIRECTORY ${CMAKE_SOURCE_DIR}/Scripts
223+
install(DIRECTORY ${CMAKE_SOURCE_DIR}/Scripts/
224224
DESTINATION ${INSTALL_DATA_DIR}
225225
FILES_MATCHING PATTERN "*")
226226
include(InstallRequiredSystemLibraries)

Intern/rayx-core/src/Data/Locate.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,17 +61,17 @@ std::filesystem::path getExecutablePath() {
6161
// General method to get the full path based on the base directory (e.g., data or font directory)
6262
std::filesystem::path getFullPath(const std::string& baseDir, const std::string& relativePath) {
6363
#if defined(__linux__)
64-
// First, check in /usr
64+
// First, check in /usr (package install)
6565
std::string path = std::string("/usr/") + baseDir + "/" + relativePath;
6666
if (fileExists(path)) return path;
6767

68-
// Next, check next to the executable
68+
// Next, check next to the executable (built from source)
6969
std::string execDir = getExecutablePath().string();
7070
execDir = execDir.substr(0, execDir.find_last_of("/\\"));
7171
path = execDir + "/" + relativePath;
7272
if (fileExists(path)) return path;
7373

74-
// Lastly, check in /usr/local
74+
// Lastly, check in /usr/local (make install)
7575
path = std::string("/usr/local/") + baseDir + "/" + relativePath;
7676
if (fileExists(path)) return path;
7777
#elif defined(_WIN32)

Intern/rayx-core/src/Data/xml.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,11 +180,18 @@ bool paramPositionNoGroup(const rapidxml::xml_node<>* node, glm::dvec4* out) {
180180

181181
std::filesystem::path Parser::parseEnergyDistributionFile() const {
182182
std::filesystem::path datpath = Parser::parseStr("photonEnergyDistributionFile");
183+
// Check if the path is empty
184+
if (datpath.empty()) {
185+
// Since the photon energy distribution file is optional, return an empty path
186+
RAYX_VERB << "No photon energy distribution file specified.";
187+
return std::filesystem::path(); // Or handle as per your application's logic
188+
}
189+
183190
std::filesystem::path combinedPath = rmlFile.parent_path() / datpath;
184191
try {
185192
combinedPath = std::filesystem::canonical(combinedPath);
186193
} catch (const std::exception& e) {
187-
RAYX_EXIT << "Failed to canonicalize datfile path: " << e.what();
194+
RAYX_EXIT << "Failed to canonicalize datfile path: " << combinedPath.string() << " -- Error: " << e.what();
188195
}
189196

190197
RAYX_VERB << "Combined datfile path: " << combinedPath;

Intern/rayx-core/src/Material/NffTable.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ bool NffTable::load(const char* element, NffTable* out) {
1414

1515
std::transform(elementString.begin(), elementString.end(), elementString.begin(), [](unsigned char c) { return std::tolower(c); });
1616

17-
std::filesystem::path f = getResourcePath("Data/nff/" + elementString + ".nff");
17+
std::filesystem::path f = getResourcePath("nff/" + elementString + ".nff");
1818
RAYX_VERB << "Loading NffTable from " << f;
1919
std::ifstream s(f);
2020

Intern/rayx-core/src/Material/PalikTable.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ bool PalikTable::load(const char* element, PalikTable* out) {
1212
std::string elementString = element;
1313
std::transform(elementString.begin(), elementString.end(), elementString.begin(), [](unsigned char c) { return std::toupper(c); });
1414

15-
std::filesystem::path f = getResourcePath("Data/PALIK/" + elementString + ".NKP");
15+
std::filesystem::path f = getResourcePath("PALIK/" + elementString + ".NKP");
1616
RAYX_VERB << "Loading PalikTable from " << f;
1717
std::ifstream s(f);
1818

Intern/rayx-ui/src/RenderSystem/GridRenderSystem.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ void GridRenderSystem::render(FrameInfo& frameInfo, [[maybe_unused]] const std::
2121

2222
RenderSystem::Input GridRenderSystem::fillInput(VkRenderPass renderPass) const {
2323
return RenderSystem::Input{.renderPass = renderPass,
24-
.vertShaderPath = RAYX::getResourcePath("/Shaders/grid_shader_vert.spv").string(),
25-
.fragShaderPath = RAYX::getResourcePath("/Shaders/grid_shader_frag.spv").string(),
24+
.vertShaderPath = RAYX::getResourcePath("Shaders/grid_shader_vert.spv").string(),
25+
.fragShaderPath = RAYX::getResourcePath("Shaders/grid_shader_frag.spv").string(),
2626
.bindingDescriptions = std::vector<VkVertexInputBindingDescription>{},
2727
.attributeDescriptions = std::vector<VkVertexInputAttributeDescription>{},
2828
.topology = std::nullopt,

Intern/rayx-ui/src/RenderSystem/ObjectRenderSystem.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ void ObjectRenderSystem::render(FrameInfo& frameInfo, const std::vector<RenderOb
3232

3333
RenderSystem::Input ObjectRenderSystem::fillInput(VkRenderPass renderPass) const {
3434
return RenderSystem::Input{.renderPass = renderPass,
35-
.vertShaderPath = RAYX::getResourcePath("/Shaders/shader_vert.spv").string(),
36-
.fragShaderPath = RAYX::getResourcePath("/Shaders/shader_frag.spv").string(),
35+
.vertShaderPath = RAYX::getResourcePath("Shaders/shader_vert.spv").string(),
36+
.fragShaderPath = RAYX::getResourcePath("Shaders/shader_frag.spv").string(),
3737
.bindingDescriptions = TextureVertex::getBindingDescriptions(),
3838
.attributeDescriptions = TextureVertex::getAttributeDescriptions(),
3939
.topology = std::nullopt,

Intern/rayx-ui/src/RenderSystem/RayRenderSystem.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ void RayRenderSystem::render(FrameInfo& frameInfo, const std::vector<RenderObjec
2121

2222
RenderSystem::Input RayRenderSystem::fillInput(VkRenderPass renderPass) const {
2323
return RenderSystem::Input{.renderPass = renderPass,
24-
.vertShaderPath = RAYX::getResourcePath("/Shaders/ray_shader_vert.spv").string(),
25-
.fragShaderPath = RAYX::getResourcePath("/Shaders/ray_shader_frag.spv").string(),
24+
.vertShaderPath = RAYX::getResourcePath("Shaders/ray_shader_vert.spv").string(),
25+
.fragShaderPath = RAYX::getResourcePath("Shaders/ray_shader_frag.spv").string(),
2626
.bindingDescriptions = ColorVertex::getBindingDescriptions(),
2727
.attributeDescriptions = ColorVertex::getAttributeDescriptions(),
2828
.topology = VK_PRIMITIVE_TOPOLOGY_LINE_LIST,

Intern/rayx/src/TerminalApp.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ void TerminalApp::tracePath(const std::filesystem::path& path) {
111111
RAYX_EXIT << "Have you selected .csv exporting?";
112112
}
113113

114-
auto cmd = std::string("python ") + RAYX::getResourcePath("/Scripts/plot.py").string() + " " + file;
114+
auto cmd = std::string("python ") + RAYX::getResourcePath("Scripts/plot.py").string() + " " + file;
115115
auto ret = system(cmd.c_str());
116116
if (ret != 0) {
117117
RAYX_WARN << "received error code while printing";

0 commit comments

Comments
 (0)