Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linux alpha path fix #72

Merged
merged 3 commits into from
Jul 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading