mirror of
https://github.com/Ed94/HandmadeHero.git
synced 2025-01-09 20:53:33 -08:00
Day 1 complete.
This commit is contained in:
parent
4949c36097
commit
3ace9435bf
2
.vscode/launch.json
vendored
2
.vscode/launch.json
vendored
@ -10,7 +10,7 @@
|
||||
"name" : "Debug handmade win32 msvc",
|
||||
"program": "${workspaceFolder}/build/handmade_win32.exe",
|
||||
"args": [],
|
||||
"cwd": "${workspaceFolder}/project",
|
||||
"cwd": "${workspaceFolder}/data",
|
||||
"visualizerFile": "${workspaceFolder}/scripts/handmade.natvis"
|
||||
}
|
||||
]
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 68369f571a33e32679f3878d266de64bc9ef7f84
|
||||
Subproject commit 0a6995a2cb6217d01b463bb4416c5d30c075333b
|
@ -7,5 +7,7 @@ int CALLBACK WinMain(
|
||||
int nShowCmd
|
||||
)
|
||||
{
|
||||
MessageBox( 0, L"First message!", L"Handmade Hero", MB_OK | MB_ICONINFORMATION );
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -3,4 +3,10 @@ Alternative header for windows.h
|
||||
*/
|
||||
|
||||
#include "windows/windows_base.h"
|
||||
#include "windows/window.h"
|
||||
|
||||
#ifdef UNICODE
|
||||
constexpr auto MessageBox = MessageBoxW;
|
||||
#else
|
||||
constexpr auto MessageBox = MessageBoxA;
|
||||
#endif // !UNICODE
|
||||
|
@ -47,6 +47,11 @@ function run-compiler
|
||||
{
|
||||
param( $compiler, $unit, $compiler_args )
|
||||
|
||||
$compiler_args += @(
|
||||
($flag_define + 'UNICODE'),
|
||||
($flag_define + '_UNICODE')
|
||||
)
|
||||
|
||||
write-host "`Compiling $unit"
|
||||
write-host "Compiler config:"
|
||||
$compiler_args | ForEach-Object {
|
||||
@ -330,12 +335,15 @@ if ( $false ) {
|
||||
|
||||
#region Handmade Runtime
|
||||
|
||||
$lib_user32 = 'User32.lib'
|
||||
|
||||
$unit = Join-Path $path_project 'handmade_win32.cpp'
|
||||
$executable = Join-Path $path_build 'handmade_win32.exe'
|
||||
|
||||
$compiler_args = @()
|
||||
|
||||
$linker_args = @(
|
||||
$lib_user32,
|
||||
$flag_link_win_subsystem_windows
|
||||
)
|
||||
|
||||
|
@ -19,13 +19,13 @@ if (-not (Test-Path $path_temp)) {
|
||||
New-Item -ItemType Directory -Path $path_temp
|
||||
}
|
||||
|
||||
#pragma region gencpp
|
||||
#region gencpp
|
||||
Invoke-WebRequest -Uri $url -OutFile $destinationZip
|
||||
Expand-Archive -Path $destinationZip -DestinationPath $path_temp
|
||||
Move-Item -Path (Join-Path $path_temp "gen.hpp") -Destination $path_deps -Force
|
||||
#pragma endregion gencpp
|
||||
#endregion gencpp
|
||||
|
||||
#pragma region windows modular headers
|
||||
#region windows modular headers
|
||||
$repo = 'https://github.com/Leandros/WindowsHModular.git'
|
||||
|
||||
Push-Location $path_temp
|
||||
@ -37,6 +37,6 @@ if ( -not(test-path $path_deps_windows)) {
|
||||
Copy-Item -Recurse .\WindowsHModular\include\win32\* $path_deps_windows
|
||||
Remove-Item (Get-ChildItem -Path $path_deps_windows -Exclude '*.h' -Recurse -Force)
|
||||
Pop-Location
|
||||
#pragma endregion windows modular headers
|
||||
#endregion windows modular headers
|
||||
|
||||
Remove-Item $path_temp -Recurse -Force
|
||||
|
Loading…
Reference in New Issue
Block a user