Skip to content

Change Windows.h to Linux-compatible windows.h - #17

Open
KojoBailey wants to merge 2 commits into
Kapilarny:launcherfrom
KojoBailey:launcher
Open

Change Windows.h to Linux-compatible windows.h#17
KojoBailey wants to merge 2 commits into
Kapilarny:launcherfrom
KojoBailey:launcher

Conversation

@KojoBailey

Copy link
Copy Markdown
Contributor

Windows is case-insensitive whereas Linux is case-sensitive, so Windows.h is not recognised on Linux whereas windows.h is recognised on both, so can just change #include <Windows.h> to #include <windows.h>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates a Windows header include to use lowercase windows.h to avoid case-sensitivity build failures on case-sensitive filesystems (e.g., Linux), and removes tracked JetBrains .idea/ project metadata from the repository.

Changes:

  • Switch #include <Windows.h> to #include <windows.h> in mem.h.
  • Remove multiple tracked .idea/ files (IDE project configuration).
  • Minor formatting normalization (final #endif line numbering/position in diff).

Reviewed changes

Copilot reviewed 1 out of 13 changed files in this pull request and generated no comments.

Show a summary per file
File Description
libs/main_lib/src/util/mem.h Changes Windows.h include to windows.h (case-sensitivity) and normalizes surrounding header lines.
.idea/vcs.xml Removes tracked IDE VCS mapping config.
.idea/modules.xml Removes tracked IDE modules config.
.idea/misc.xml Removes tracked IDE misc/project settings.
.idea/JAPI_rewrite.iml Removes tracked IDE module file.
.idea/editor.xml Removes tracked IDE editor/inspection settings.
.idea/dictionaries/project.xml Removes tracked IDE dictionary file.
.idea/copilot.data.migration.edit.xml Removes tracked IDE Copilot migration state.
.idea/copilot.data.migration.ask2agent.xml Removes tracked IDE Copilot migration state.
.idea/copilot.data.migration.ask.xml Removes tracked IDE Copilot migration state.
.idea/copilot.data.migration.agent.xml Removes tracked IDE Copilot migration state.
.idea/.name Removes tracked IDE project name file.
.idea/.gitignore Removes tracked IDE-local .gitignore file.
Files not reviewed (12)
  • .idea/.gitignore: Generated file
  • .idea/.name: Generated file
  • .idea/JAPI_rewrite.iml: Generated file
  • .idea/copilot.data.migration.agent.xml: Generated file
  • .idea/copilot.data.migration.ask.xml: Generated file
  • .idea/copilot.data.migration.ask2agent.xml: Generated file
  • .idea/copilot.data.migration.edit.xml: Generated file
  • .idea/dictionaries/project.xml: Generated file
  • .idea/editor.xml: Generated file
  • .idea/misc.xml: Generated file
  • .idea/modules.xml: Generated file
  • .idea/vcs.xml: Generated file
Suppressed comments (4)

libs/main_lib/src/util/mem.h:15

  • mem.h uses Windows-only APIs/types (e.g., GetModuleHandle, PIMAGE_DOS_HEADER, PIMAGE_NT_HEADERS) but includes <windows.h> unconditionally. If this header is included/compiled for any non-Windows target, it will fail even after fixing header case; consider guarding the include and the Windows-specific helpers behind #if defined(_WIN32) and providing a stub or alternative implementation for other platforms.

This issue also appears in the following locations of the same file:

  • line 8
  • line 8
#include <cstdint>
#include <windows.h>
#include <stdint.h>
#include <stdlib.h>
#include <vector>
#include <stdio.h>

#define GAME_SCAN(sig) (uint64_t) PatternScan(GetModuleHandle(nullptr), sig)

libs/main_lib/src/util/mem.h:10

  • The PR description implies fixing Linux case-sensitivity issues for Windows.h, but there are still #include <Windows.h> occurrences elsewhere (e.g., libs/main_lib/src/subsystems/kiero/kiero.cpp, external/toml/toml.hpp, and conditional paths in libs/imgui/imgui.cpp). If the goal is to make Linux (or MinGW-on-Linux) builds succeed, those remaining includes will likely still break on case-sensitive filesystems; consider updating them in this PR or narrowing the description to just mem.h.
#include <cstdint>
#include <windows.h>
#include <stdint.h>

libs/main_lib/src/util/mem.h:14

  • This header calls strlen() but does not include a header that declares it (e.g., <cstring>). Relying on transitive includes from <windows.h> is fragile and can break across compilers/SDKs.
#include <cstdint>
#include <windows.h>
#include <stdint.h>
#include <stdlib.h>
#include <vector>
#include <stdio.h>

.idea/modules.xml:1

  • This PR removes a large set of .idea/ project files in addition to the <Windows.h><windows.h> include change. Since .idea/ is already ignored in the repository .gitignore, these deletions look like unrelated cleanup; consider splitting them into a separate PR or updating the PR title/description to reflect the additional scope.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants