Skip to content
Open
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
17 changes: 17 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -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
37 changes: 13 additions & 24 deletions BasicGameEngine/BasicGameEngine.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<AdditionalIncludeDirectories>$(ProjectDir)\include</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
Expand Down Expand Up @@ -104,6 +105,7 @@
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<AdditionalIncludeDirectories>$(ProjectDir)\include</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
Expand All @@ -127,32 +129,12 @@
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="BasicGameEngine.h" />
<ClInclude Include="framework.h" />
<ClInclude Include="InterprocessComm.h" />
<ClInclude Include="InterprocessCommMgr.h" />
<ClInclude Include="Resource.h" />
<ClInclude Include="SharedMemoryData.h" />
<ClInclude Include="StatusBar.h" />
<ClInclude Include="StatusBarMgr.h" />
<ClInclude Include="targetver.h" />
<ClInclude Include="TaskBarMgr.h" />
<ClInclude Include="UserPrivilege.h" />
<ClInclude Include="UserPrivilegeMgr.h" />
<ClInclude Include="WindowMutex.h" />
<ClInclude Include="WindowMutexMgr.h" />
<ClInclude Include="include\**\*.h" />
<ClCompile Include="src\**\*.cpp" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="BasicGameEngine.cpp" />
<ClCompile Include="InterprocessComm.cpp" />
<ClCompile Include="InterprocessCommMgr.cpp" />
<ClCompile Include="StatusBar.cpp" />
<ClCompile Include="StatusBarMgr.cpp" />
<ClCompile Include="TaskBarMgr.cpp" />
<ClCompile Include="UserPrivilege.cpp" />
<ClCompile Include="UserPrivilegeMgr.cpp" />
<ClCompile Include="WindowMutex.cpp" />
<ClCompile Include="WindowMutexMgr.cpp" />
<ClInclude Include="targetver.h" />
<ClInclude Include="Resource.h" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="BasicGameEngine.rc" />
Expand All @@ -161,6 +143,13 @@
<Image Include="BasicGameEngine.ico" />
<Image Include="small.ico" />
</ItemGroup>
<ItemGroup>
<Text Include="CMakeLists.txt" />
<Text Include="Dockerfile" />
</ItemGroup>
<ItemGroup>
<None Include="Dockerfile_MSVC" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
Expand Down
24 changes: 24 additions & 0 deletions BasicGameEngine/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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
)
11 changes: 11 additions & 0 deletions BasicGameEngine/Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]
47 changes: 47 additions & 0 deletions BasicGameEngine/Dockerfile_MSVC
Original file line number Diff line number Diff line change
@@ -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"]
Binary file added BasicGameEngine/RCa18080
Binary file not shown.
Binary file added BasicGameEngine/RCb18080
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -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
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -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 <windows.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include <iostream>
#include <thread>
#include <mutex> // For std::mutex and std::lock_guard
#include "resource.h"
#include "..\resource.h"
#include <shellapi.h>
#include "TaskBarMgr.h"
#include "WindowMutexMgr.h"
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -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()
Expand Down
File renamed without changes.
17 changes: 17 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]