diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..90d9424 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,17 @@ +# Ignore Visual Studio files +.vs/ +*.user +*.suo +*.VC.db + +# Ignore build directories +x64/ +Debug/ +Release/ + +# Ignore any other temporary files or directories +*.log +*.obj +*.tlog +*.idb +*.pdb diff --git a/BasicGameEngine/BasicGameEngine.vcxproj b/BasicGameEngine/BasicGameEngine.vcxproj index 09c6396..fcb4d69 100644 --- a/BasicGameEngine/BasicGameEngine.vcxproj +++ b/BasicGameEngine/BasicGameEngine.vcxproj @@ -76,6 +76,7 @@ true WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) true + $(ProjectDir)\include Windows @@ -104,6 +105,7 @@ true _DEBUG;_WINDOWS;%(PreprocessorDefinitions) true + $(ProjectDir)\include Windows @@ -127,32 +129,12 @@ - - - - - - - - - - - - - - + + - - - - - - - - - - + + @@ -161,6 +143,13 @@ + + + + + + + diff --git a/BasicGameEngine/CMakeLists.txt b/BasicGameEngine/CMakeLists.txt new file mode 100644 index 0000000..ab98b0c --- /dev/null +++ b/BasicGameEngine/CMakeLists.txt @@ -0,0 +1,24 @@ +cmake_minimum_required(VERSION 3.15) # Specify the minimum version of CMake you want to use +project(BasicGameEngine) + +# Set the C++ standard +set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_STANDARD_REQUIRED True) + +# Include directories +include_directories(include) # Add the include directory + +# Add the source files to the project +file(GLOB SOURCES "src/*.cpp") # Collect all source files + +# Add the executable +add_executable(BasicGameEngine ${SOURCES}) + +# Link any required libraries (if you are using Windows-specific libraries, add them here) +target_link_libraries(BasicGameEngine + PRIVATE + user32 # Add Windows libraries as needed + gdi32 + shell32 + comctl32 +) diff --git a/BasicGameEngine/Dockerfile b/BasicGameEngine/Dockerfile new file mode 100644 index 0000000..70ae9f2 --- /dev/null +++ b/BasicGameEngine/Dockerfile @@ -0,0 +1,11 @@ +# Use a compatible base image for your Windows version +FROM mcr.microsoft.com/windows/nanoserver:1909 + +# Set the working directory +WORKDIR /app + +# Copy the executable from the correct relative location +COPY ./x64/Debug/BasicGameEngine.exe . + +# Set the entry point to run the executable +CMD ["BasicGameEngine.exe"] diff --git a/BasicGameEngine/Dockerfile_MSVC b/BasicGameEngine/Dockerfile_MSVC new file mode 100644 index 0000000..0d831fd --- /dev/null +++ b/BasicGameEngine/Dockerfile_MSVC @@ -0,0 +1,47 @@ +# Use the official Microsoft Visual Studio Build Tools base image +FROM mcr.microsoft.com/windows/servercore:ltsc2019 + +# Set up proxy settings if needed +ENV HTTP_PROXY=http://yourproxy:port +ENV HTTPS_PROXY=http://yourproxy:port + +# Install Visual Studio Build Tools and CMake +RUN powershell -Command " \ + Set-ExecutionPolicy Bypass -Scope Process -Force; \ + [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; \ + $retryCount = 0; \ + $maxRetries = 5; \ + while ($retryCount -lt $maxRetries) { \ + try { \ + Invoke-WebRequest -Uri 'https://aka.ms/vs/17/release/vs_buildtools.exe' -OutFile 'vs_buildtools.exe'; \ + Write-Host 'Downloading Visual Studio Build Tools...'; \ + Start-Process -Wait -FilePath 'vs_buildtools.exe' -ArgumentList '--quiet', '--wait', '--add Microsoft.VisualStudio.Workload.VCTools'; \ + Write-Host 'Visual Studio Build Tools installation completed.'; \ + if (Test-Path 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Tools\\MSVC') { \ + Write-Host 'MSVC installation verified.'; \ + break; \ + } else { \ + Write-Error 'MSVC not found!'; \ + Get-ChildItem 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Tools'; \ + exit 1; \ + } \ + } catch { \ + Write-Host 'Download failed, retrying...'; \ + $retryCount++; \ + Start-Sleep -Seconds 10; \ + } \ + }; \ + if ($retryCount -eq $maxRetries) { \ + Write-Error 'Failed to download Visual Studio Build Tools after multiple attempts.'; \ + exit 1; \ + }; \ + Remove-Item -Force vs_buildtools.exe" + +# Set the working directory +WORKDIR /app + +# Copy the current directory contents into the container at /app +COPY . . + +# Run PowerShell in the container +CMD ["powershell"] \ No newline at end of file diff --git a/BasicGameEngine/RCa18080 b/BasicGameEngine/RCa18080 new file mode 100644 index 0000000..4ff4da5 Binary files /dev/null and b/BasicGameEngine/RCa18080 differ diff --git a/BasicGameEngine/RCb18080 b/BasicGameEngine/RCb18080 new file mode 100644 index 0000000..4ff4da5 Binary files /dev/null and b/BasicGameEngine/RCb18080 differ diff --git a/BasicGameEngine/BasicGameEngine.h b/BasicGameEngine/include/BasicGameEngine.h similarity index 91% rename from BasicGameEngine/BasicGameEngine.h rename to BasicGameEngine/include/BasicGameEngine.h index 199bc0f..d22ccfa 100644 --- a/BasicGameEngine/BasicGameEngine.h +++ b/BasicGameEngine/include/BasicGameEngine.h @@ -1,6 +1,6 @@ #pragma once -#include "resource.h" +#include "..\Resource.h" // Function declarations for tray icon management void AddTrayIcon(HWND hWnd); // Declare the AddTrayIcon function diff --git a/BasicGameEngine/InterprocessComm.h b/BasicGameEngine/include/InterprocessComm.h similarity index 100% rename from BasicGameEngine/InterprocessComm.h rename to BasicGameEngine/include/InterprocessComm.h diff --git a/BasicGameEngine/InterprocessCommMgr.h b/BasicGameEngine/include/InterprocessCommMgr.h similarity index 100% rename from BasicGameEngine/InterprocessCommMgr.h rename to BasicGameEngine/include/InterprocessCommMgr.h diff --git a/BasicGameEngine/SharedMemoryData.h b/BasicGameEngine/include/SharedMemoryData.h similarity index 100% rename from BasicGameEngine/SharedMemoryData.h rename to BasicGameEngine/include/SharedMemoryData.h diff --git a/BasicGameEngine/StatusBar.h b/BasicGameEngine/include/StatusBar.h similarity index 100% rename from BasicGameEngine/StatusBar.h rename to BasicGameEngine/include/StatusBar.h diff --git a/BasicGameEngine/StatusBarMgr.h b/BasicGameEngine/include/StatusBarMgr.h similarity index 100% rename from BasicGameEngine/StatusBarMgr.h rename to BasicGameEngine/include/StatusBarMgr.h diff --git a/BasicGameEngine/TaskBarMgr.h b/BasicGameEngine/include/TaskBarMgr.h similarity index 100% rename from BasicGameEngine/TaskBarMgr.h rename to BasicGameEngine/include/TaskBarMgr.h diff --git a/BasicGameEngine/UserPrivilege.h b/BasicGameEngine/include/UserPrivilege.h similarity index 100% rename from BasicGameEngine/UserPrivilege.h rename to BasicGameEngine/include/UserPrivilege.h diff --git a/BasicGameEngine/UserPrivilegeMgr.h b/BasicGameEngine/include/UserPrivilegeMgr.h similarity index 100% rename from BasicGameEngine/UserPrivilegeMgr.h rename to BasicGameEngine/include/UserPrivilegeMgr.h diff --git a/BasicGameEngine/WindowMutex.h b/BasicGameEngine/include/WindowMutex.h similarity index 100% rename from BasicGameEngine/WindowMutex.h rename to BasicGameEngine/include/WindowMutex.h diff --git a/BasicGameEngine/WindowMutexMgr.h b/BasicGameEngine/include/WindowMutexMgr.h similarity index 100% rename from BasicGameEngine/WindowMutexMgr.h rename to BasicGameEngine/include/WindowMutexMgr.h diff --git a/BasicGameEngine/framework.h b/BasicGameEngine/include/framework.h similarity index 93% rename from BasicGameEngine/framework.h rename to BasicGameEngine/include/framework.h index 33a6be6..bd15182 100644 --- a/BasicGameEngine/framework.h +++ b/BasicGameEngine/include/framework.h @@ -4,7 +4,7 @@ #pragma once -#include "targetver.h" +#include "../targetver.h" #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers // Windows Header Files #include diff --git a/BasicGameEngine/BasicGameEngine.cpp b/BasicGameEngine/src/BasicGameEngine.cpp similarity index 99% rename from BasicGameEngine/BasicGameEngine.cpp rename to BasicGameEngine/src/BasicGameEngine.cpp index 80ced46..5be6bc3 100644 --- a/BasicGameEngine/BasicGameEngine.cpp +++ b/BasicGameEngine/src/BasicGameEngine.cpp @@ -7,7 +7,7 @@ #include #include #include // For std::mutex and std::lock_guard -#include "resource.h" +#include "..\resource.h" #include #include "TaskBarMgr.h" #include "WindowMutexMgr.h" diff --git a/BasicGameEngine/InterprocessComm.cpp b/BasicGameEngine/src/InterprocessComm.cpp similarity index 100% rename from BasicGameEngine/InterprocessComm.cpp rename to BasicGameEngine/src/InterprocessComm.cpp diff --git a/BasicGameEngine/InterprocessCommMgr.cpp b/BasicGameEngine/src/InterprocessCommMgr.cpp similarity index 100% rename from BasicGameEngine/InterprocessCommMgr.cpp rename to BasicGameEngine/src/InterprocessCommMgr.cpp diff --git a/BasicGameEngine/StatusBar.cpp b/BasicGameEngine/src/StatusBar.cpp similarity index 100% rename from BasicGameEngine/StatusBar.cpp rename to BasicGameEngine/src/StatusBar.cpp diff --git a/BasicGameEngine/StatusBarMgr.cpp b/BasicGameEngine/src/StatusBarMgr.cpp similarity index 100% rename from BasicGameEngine/StatusBarMgr.cpp rename to BasicGameEngine/src/StatusBarMgr.cpp diff --git a/BasicGameEngine/TaskBarMgr.cpp b/BasicGameEngine/src/TaskBarMgr.cpp similarity index 95% rename from BasicGameEngine/TaskBarMgr.cpp rename to BasicGameEngine/src/TaskBarMgr.cpp index c0051bd..06a0f08 100644 --- a/BasicGameEngine/TaskBarMgr.cpp +++ b/BasicGameEngine/src/TaskBarMgr.cpp @@ -1,5 +1,5 @@ #include "TaskBarMgr.h" -#include "resource.h" // Include your specific resource header file +#include "..\resource.h" // Include your specific resource header file #include "StatusBarMgr.h" TaskBarMgr::TaskBarMgr() diff --git a/BasicGameEngine/UserPrivilege.cpp b/BasicGameEngine/src/UserPrivilege.cpp similarity index 100% rename from BasicGameEngine/UserPrivilege.cpp rename to BasicGameEngine/src/UserPrivilege.cpp diff --git a/BasicGameEngine/UserPrivilegeMgr.cpp b/BasicGameEngine/src/UserPrivilegeMgr.cpp similarity index 100% rename from BasicGameEngine/UserPrivilegeMgr.cpp rename to BasicGameEngine/src/UserPrivilegeMgr.cpp diff --git a/BasicGameEngine/WindowMutex.cpp b/BasicGameEngine/src/WindowMutex.cpp similarity index 100% rename from BasicGameEngine/WindowMutex.cpp rename to BasicGameEngine/src/WindowMutex.cpp diff --git a/BasicGameEngine/WindowMutexMgr.cpp b/BasicGameEngine/src/WindowMutexMgr.cpp similarity index 100% rename from BasicGameEngine/WindowMutexMgr.cpp rename to BasicGameEngine/src/WindowMutexMgr.cpp diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..e40cc05 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,17 @@ +# Use a compatible base image for your Windows version +FROM mcr.microsoft.com/windows/nanoserver:1909 + +# Set the working directory +WORKDIR /app + +# Set the working directory +WORKDIR /app + +# Copy the executable from the correct location +COPY ../x64/Debug/BasicGameEngine.exe . + +# Expose any necessary ports (if required) +# EXPOSE 8080 + +# Set the entry point to run the executable +CMD ["BasicGameEngine.exe"]