Skip to content

Commit

Permalink
Merge pull request #72 from namreeb/linux_alpha_path_fix
Browse files Browse the repository at this point in the history
Linux alpha path fix
  • Loading branch information
namreeb authored Jul 24, 2024
2 parents 7a1b98d + 7b547ba commit c494bbc
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
8 changes: 3 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@
/utility/Debug/*.pdb
/utility/Debug/*.obj
/utility/Debug
/ipch/ANTTWEAKBAR-5f4de96b/*.ipch
/*.sdf
/ipch/STORMLIB-4af47af8/*.ipch
/utility/*.user
/.vs/maps/v14/*.suo
/MapViewer/x64/Debug/*.pdb
Expand Down Expand Up @@ -40,7 +38,6 @@
/pathfind/x64/Debug
/utility/x64/Debug
/maps.VC.db
/ipch/STORMLIB_VS15-5647bf9b/*.ipch
/MapBuilder/x64/Release
/MapViewer/x64/Release
/RecastDetourBuild/x64/Release
Expand All @@ -50,12 +47,13 @@
/pathfind/*.user
/gos.csv
/.vs
/ipch/STORMLIB_VS15-933783c6/*.ipch
/.vscode
/MapViewer/Include/pixelShader.hpp
/MapViewer/Include/vertexShader.hpp
/CMakeSettings.json
/out
/build
/*.idea
/*.ipch
/cmake-build-debug
/cmake-build-release
/cmake-build-release
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,10 @@ endif()
# This is just easier than copying over the DLLs
if (MSVC)
set(STORM_USE_BUNDLED_LIBRARIES ON CACHE BOOL "")
elseif(CMAKE_BUILD_TYPE STREQUAL "Debug")
add_definitions(-D_DEBUG)
endif()

add_subdirectory(stormlib EXCLUDE_FROM_ALL)
if (NAMIGATOR_BUILD_C_API)
install(TARGETS storm ARCHIVE DESTINATION lib)
Expand Down
7 changes: 6 additions & 1 deletion parser/MpqManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,12 @@ MpqManager::OpenFile(const std::string& file)

for (auto const& i : MpqHandles)
{
if (i.first != file_lower)
// if we are on Linux, the mpq filenames will use forward slashes
// instead of backslashes. this code could be cleaner.
std::string mpqPath = i.first;
std::replace(mpqPath.begin(), mpqPath.end(), '/', '\\');

if (mpqPath != file_lower)
continue;

// if we have found a match, there should be exactly two files in this
Expand Down

0 comments on commit c494bbc

Please sign in to comment.