Skip to content

Commit de12dcf

Browse files
authored
Merge pull request #60 from capnramses/build.bat
Build.bat
2 parents d639ba5 + dcf7512 commit de12dcf

File tree

132 files changed

+3921
-36000
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

132 files changed

+3921
-36000
lines changed

.github/workflows/c-cpp.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: install_deps
1717
run: sudo apt install libglew-dev libglfw3-dev libfreetype-dev libassimp-dev
1818
- name: build_all
19-
run: ./build_all_linux_osx.sh
19+
run: bash build_all_linux_macos.sh
2020

2121
build_macos:
2222

@@ -27,4 +27,4 @@ jobs:
2727
- name: install_deps
2828
run: brew install glew glfw assimp freetype
2929
- name: build_all
30-
run: ./build_all_linux_osx.sh
30+
run: bash build_all_linux_macos.sh

.gitignore

Lines changed: 72 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -1,71 +1,72 @@
1-
# binary output
2-
*log
3-
screenshot_*
4-
video_frame_*
5-
# compiled binaries
6-
*.out
7-
*.dll
8-
hellot
9-
01_extended_init/extinit
10-
02_shaders/shaders
11-
03_vertex_buffer_objects/vbuffs
12-
04_mats_and_vecs/matsvecs
13-
05_virtual_camera/vcam
14-
06_vcam_with_quaternion/quats
15-
07_ray_picking/raypick
16-
08_phong/phong
17-
09_texture_mapping/texmap
18-
10_screen_capture/scrcap
19-
11_video_capture/vidcap
20-
12_debugging_shaders/debugshdrs
21-
13_mesh_import/meshimp
22-
14_multi_tex/multitex
23-
15_phongtextures/phongtex
24-
16_frag_reject/fragrej
25-
17_alpha_blending/alphablend
26-
18_spotlights/spotlights
27-
19_fog/fog
28-
20_normal_mapping/nmap
29-
cubemap
30-
22_geom_shaders/geomsh
31-
23_tessellation_shaders/tess
32-
24_gui_panels/overlays
33-
25_sprite_sheets/sprites
34-
26_bitmap_fonts/fonts
35-
generate
36-
view
37-
29_particle_systems/particles
38-
32_skinning_part_three/skin
39-
skin
40-
fbuffer*
41-
35_image_kernel/kernel
42-
37_deferred_shading/deferred
43-
38_texture_shadows/shads
44-
38_texture_shadows/apple_notes/command_line
45-
39_texture_mapping_srgb/texmap
46-
41_shader_hot_reload/hotreload
47-
pick
48-
compute
49-
exam*
50-
# custom user data
51-
atlas.meta
52-
atlas.png
53-
freefont-*
54-
*.ttf
55-
greek_*
56-
*.save
57-
# IDE and build systems temporary files
58-
build/
59-
*.osx-e
60-
.vscode
61-
*.gcda
62-
*.gcno
63-
*.swp
64-
*.ilk
65-
*.exe
66-
*.pdb
67-
*.idb
68-
visual_studio/*/Debug/
69-
visual_studio/*/*/Debug/
70-
*.db
71-
*.ipch
1+
# binary output
2+
*log
3+
screenshot_*
4+
video_frame_*
5+
# compiled binaries
6+
*.out
7+
*.dll
8+
hellot
9+
01_extended_init/extinit
10+
02_shaders/shaders
11+
03_vertex_buffer_objects/vbuffs
12+
04_mats_and_vecs/matsvecs
13+
05_virtual_camera/vcam
14+
06_vcam_with_quaternion/quats
15+
07_ray_picking/raypick
16+
08_phong/phong
17+
09_texture_mapping/texmap
18+
10_screen_capture/scrcap
19+
11_video_capture/vidcap
20+
12_debugging_shaders/debugshdrs
21+
13_mesh_import/meshimp
22+
14_multi_tex/multitex
23+
15_phongtextures/phongtex
24+
16_frag_reject/fragrej
25+
17_alpha_blending/alphablend
26+
18_spotlights/spotlights
27+
19_fog/fog
28+
20_normal_mapping/nmap
29+
cubemap
30+
22_geom_shaders/geomsh
31+
23_tessellation_shaders/tess
32+
24_gui_panels/overlays
33+
25_sprite_sheets/sprites
34+
26_bitmap_fonts/fonts
35+
generate
36+
view
37+
29_particle_systems/particles
38+
32_skinning_part_three/skin
39+
skin
40+
fbuffer*
41+
35_image_kernel/kernel
42+
37_deferred_shading/deferred
43+
38_texture_shadows/shads
44+
38_texture_shadows/apple_notes/command_line
45+
39_texture_mapping_srgb/texmap
46+
41_shader_hot_reload/hotreload
47+
pick
48+
compute
49+
exam*
50+
# custom user data
51+
atlas.meta
52+
atlas.png
53+
freefont-*
54+
*.ttf
55+
greek_*
56+
*.save
57+
# IDE and build systems temporary files
58+
build/
59+
*.osx-e
60+
.vscode
61+
*.gcda
62+
*.gcno
63+
*.swp
64+
*.ilk
65+
*.exe
66+
*.pdb
67+
*.idb
68+
visual_studio/*/Debug/
69+
visual_studio/*/*/Debug/
70+
*.db
71+
*.ipch
72+
*.obj

00_hello_triangle/Makefile.linux64

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
BIN = hellot
22
CC = gcc
33
FLAGS = -Wall -pedantic -std=c99
4-
LIBS = -lGLEW -lglfw -lGL -lz
4+
LIBS = -lGLEW -lglfw -lGL
55
SRC = main.c
66

77
all:

00_hello_triangle/build.bat

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
@echo off
2+
REM Build File for MSVC (Visual Studio).
3+
4+
REM This clause is for the global "build_all" batch file, so that you don't need to set the VS edition path in every file first.
5+
IF NOT "%~1"=="" (
6+
echo "Using supplied vcvars:" %1
7+
if not defined DevEnvDir ( call %1 )
8+
GOTO setpaths
9+
)
10+
11+
REM Uncomment whichever one that you have installed:
12+
REM See https://learn.microsoft.com/en-us/cpp/build/building-on-the-command-line?view=msvc-170#developer_command_file_locations
13+
REM call "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" x64
14+
REM call "C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\vcvarsall.bat" x64
15+
REM call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" x64
16+
REM call "C:\Program Files (x86)\Microsoft Visual Studio 13.0\VC\vcvarsall.bat" x64
17+
REM call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x64
18+
REM call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
19+
REM call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat"
20+
call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat"
21+
22+
:setpaths
23+
24+
set LFLAGS=/DEBUG /MACHINE:X64
25+
set INCLUDES=/I "..\third_party\glew-2.1.0\include" /I "..\third_party\glfw-3.4.bin.WIN64\include" /I "..\third_party\assimp\include"
26+
set LIB_PATH_GLFW=/LIBPATH:"..\third_party\glfw-3.4.bin.WIN64\lib-vc2022"
27+
set LIB_PATH_GLEW=/LIBPATH:"..\third_party\glew-2.1.0\lib\Release\x64"
28+
set LIB_PATH_ASSIMP=/LIBPATH:"..\third_party\assimp\lib\"
29+
set SYSTEM_LIBS="kernel32.lib" "user32.lib" "gdi32.lib" "winspool.lib" "comdlg32.lib" "advapi32.lib" "shell32.lib" "ole32.lib" "oleaut32.lib" "uuid.lib" "odbc32.lib" "odbccp32.lib"
30+
set LIBS=%LIB_PATH_GLFW% %LIB_PATH_GLEW% glew32.lib glfw3dll.lib OpenGL32.lib %SYSTEM_LIBS%
31+
set DLL_PATH_GLEW="third_party\glew-2.1.0\bin\Release\x64\glew32.dll"
32+
set DLL_PATH_GLFW="third_party\glfw-3.4.bin.WIN64\lib-vc2019\glfw3.dll"
33+
set DLL_PATH_ASSIMP="third_party\assimp\bin\vs2022\assimp-vc143-mt.dll
34+
set SRC="*.c??"
35+
36+
@echo on
37+
38+
cl %CFLAGS% %SRC% %INCLUDES% /link %LFLAGS% %LIBS% /OUT:"hellot.exe"
39+
40+
copy ..\%DLL_PATH_GLEW% .\
41+
copy ..\%DLL_PATH_GLFW% .\

00_hello_triangle_gl2.1/Makefile.linux64

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
BIN = hellot
22
CC = gcc
33
FLAGS = -Wall -pedantic -std=c99
4-
LIBS = -lGLEW -lglfw -lGL -lz
4+
LIBS = -lGLEW -lglfw -lGL
55
SRC = main.c
66

77
all:

00_hello_triangle_gl2.1/build.bat

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
@echo off
2+
REM Build File for MSVC (Visual Studio).
3+
4+
REM This clause is for the global "build_all" batch file, so that you don't need to set the VS edition path in every file first.
5+
IF NOT "%~1"=="" (
6+
echo "Using supplied vcvars:" %1
7+
if not defined DevEnvDir ( call %1 )
8+
GOTO setpaths
9+
)
10+
11+
REM Uncomment whichever one that you have installed:
12+
REM See https://learn.microsoft.com/en-us/cpp/build/building-on-the-command-line?view=msvc-170#developer_command_file_locations
13+
REM call "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" x64
14+
REM call "C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\vcvarsall.bat" x64
15+
REM call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" x64
16+
REM call "C:\Program Files (x86)\Microsoft Visual Studio 13.0\VC\vcvarsall.bat" x64
17+
REM call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x64
18+
REM call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
19+
REM call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat"
20+
call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat"
21+
22+
:setpaths
23+
24+
set LFLAGS=/DEBUG /MACHINE:X64
25+
set INCLUDES=/I "..\third_party\glew-2.1.0\include" /I "..\third_party\glfw-3.4.bin.WIN64\include" /I "..\third_party\assimp\include"
26+
set LIB_PATH_GLFW=/LIBPATH:"..\third_party\glfw-3.4.bin.WIN64\lib-vc2022"
27+
set LIB_PATH_GLEW=/LIBPATH:"..\third_party\glew-2.1.0\lib\Release\x64"
28+
set LIB_PATH_ASSIMP=/LIBPATH:"..\third_party\assimp\lib\"
29+
set SYSTEM_LIBS="kernel32.lib" "user32.lib" "gdi32.lib" "winspool.lib" "comdlg32.lib" "advapi32.lib" "shell32.lib" "ole32.lib" "oleaut32.lib" "uuid.lib" "odbc32.lib" "odbccp32.lib"
30+
set LIBS=%LIB_PATH_GLFW% %LIB_PATH_GLEW% glew32.lib glfw3dll.lib OpenGL32.lib %SYSTEM_LIBS%
31+
set DLL_PATH_GLEW="third_party\glew-2.1.0\bin\Release\x64\glew32.dll"
32+
set DLL_PATH_GLFW="third_party\glfw-3.4.bin.WIN64\lib-vc2019\glfw3.dll"
33+
set DLL_PATH_ASSIMP="third_party\assimp\bin\vs2022\assimp-vc143-mt.dll
34+
set SRC="*.c??"
35+
36+
@echo on
37+
38+
cl %CFLAGS% %SRC% %INCLUDES% /link %LFLAGS% %LIBS% /OUT:"hellot.exe"
39+
40+
copy ..\%DLL_PATH_GLEW% .\
41+
copy ..\%DLL_PATH_GLFW% .\

01_extended_init/Makefile.linux64

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
BIN = extinit
22
CC = gcc
33
FLAGS = -Wall -pedantic -std=c99
4-
LIBS = -lGLEW -lglfw -lGL -lz
4+
LIBS = -lGLEW -lglfw -lGL
55
SRC = main.c
66

77
all:

01_extended_init/build.bat

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
@echo off
2+
REM Build File for MSVC (Visual Studio).
3+
4+
REM This clause is for the global "build_all" batch file, so that you don't need to set the VS edition path in every file first.
5+
IF NOT "%~1"=="" (
6+
echo "Using supplied vcvars:" %1
7+
if not defined DevEnvDir ( call %1 )
8+
GOTO setpaths
9+
)
10+
11+
REM Uncomment whichever one that you have installed:
12+
REM See https://learn.microsoft.com/en-us/cpp/build/building-on-the-command-line?view=msvc-170#developer_command_file_locations
13+
REM call "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" x64
14+
REM call "C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\vcvarsall.bat" x64
15+
REM call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" x64
16+
REM call "C:\Program Files (x86)\Microsoft Visual Studio 13.0\VC\vcvarsall.bat" x64
17+
REM call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x64
18+
REM call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
19+
REM call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat"
20+
call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat"
21+
22+
:setpaths
23+
24+
set LFLAGS=/DEBUG /MACHINE:X64
25+
set INCLUDES=/I "..\third_party\glew-2.1.0\include" /I "..\third_party\glfw-3.4.bin.WIN64\include" /I "..\third_party\assimp\include"
26+
set LIB_PATH_GLFW=/LIBPATH:"..\third_party\glfw-3.4.bin.WIN64\lib-vc2022"
27+
set LIB_PATH_GLEW=/LIBPATH:"..\third_party\glew-2.1.0\lib\Release\x64"
28+
set LIB_PATH_ASSIMP=/LIBPATH:"..\third_party\assimp\lib\"
29+
set SYSTEM_LIBS="kernel32.lib" "user32.lib" "gdi32.lib" "winspool.lib" "comdlg32.lib" "advapi32.lib" "shell32.lib" "ole32.lib" "oleaut32.lib" "uuid.lib" "odbc32.lib" "odbccp32.lib"
30+
set LIBS=%LIB_PATH_GLFW% %LIB_PATH_GLEW% glew32.lib glfw3dll.lib OpenGL32.lib %SYSTEM_LIBS%
31+
set DLL_PATH_GLEW="third_party\glew-2.1.0\bin\Release\x64\glew32.dll"
32+
set DLL_PATH_GLFW="third_party\glfw-3.4.bin.WIN64\lib-vc2019\glfw3.dll"
33+
set DLL_PATH_ASSIMP="third_party\assimp\bin\vs2022\assimp-vc143-mt.dll
34+
set SRC="*.c??"
35+
36+
@echo on
37+
38+
cl %CFLAGS% %SRC% %INCLUDES% /link %LFLAGS% %LIBS% /OUT:"extinit.exe"
39+
40+
copy ..\%DLL_PATH_GLEW% .\
41+
copy ..\%DLL_PATH_GLFW% .\

02_shaders/Makefile.linux64

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
BIN = shaders
22
CC = gcc
33
FLAGS = -Wall -pedantic -std=c99
4-
LIBS = -lGLEW -lglfw -lGL -lz
4+
LIBS = -lGLEW -lglfw -lGL
55
SRC = main.c gl_utils.c
66

77
all:

02_shaders/build.bat

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
@echo off
2+
REM Build File for MSVC (Visual Studio).
3+
4+
REM This clause is for the global "build_all" batch file, so that you don't need to set the VS edition path in every file first.
5+
IF NOT "%~1"=="" (
6+
echo "Using supplied vcvars:" %1
7+
if not defined DevEnvDir ( call %1 )
8+
GOTO setpaths
9+
)
10+
11+
REM Uncomment whichever one that you have installed:
12+
REM See https://learn.microsoft.com/en-us/cpp/build/building-on-the-command-line?view=msvc-170#developer_command_file_locations
13+
REM call "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" x64
14+
REM call "C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\vcvarsall.bat" x64
15+
REM call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" x64
16+
REM call "C:\Program Files (x86)\Microsoft Visual Studio 13.0\VC\vcvarsall.bat" x64
17+
REM call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x64
18+
REM call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
19+
REM call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat"
20+
call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat"
21+
22+
:setpaths
23+
24+
set LFLAGS=/DEBUG /MACHINE:X64
25+
set INCLUDES=/I "..\third_party\glew-2.1.0\include" /I "..\third_party\glfw-3.4.bin.WIN64\include" /I "..\third_party\assimp\include"
26+
set LIB_PATH_GLFW=/LIBPATH:"..\third_party\glfw-3.4.bin.WIN64\lib-vc2022"
27+
set LIB_PATH_GLEW=/LIBPATH:"..\third_party\glew-2.1.0\lib\Release\x64"
28+
set LIB_PATH_ASSIMP=/LIBPATH:"..\third_party\assimp\lib\"
29+
set SYSTEM_LIBS="kernel32.lib" "user32.lib" "gdi32.lib" "winspool.lib" "comdlg32.lib" "advapi32.lib" "shell32.lib" "ole32.lib" "oleaut32.lib" "uuid.lib" "odbc32.lib" "odbccp32.lib"
30+
set LIBS=%LIB_PATH_GLFW% %LIB_PATH_GLEW% glew32.lib glfw3dll.lib OpenGL32.lib %SYSTEM_LIBS%
31+
set DLL_PATH_GLEW="third_party\glew-2.1.0\bin\Release\x64\glew32.dll"
32+
set DLL_PATH_GLFW="third_party\glfw-3.4.bin.WIN64\lib-vc2019\glfw3.dll"
33+
set DLL_PATH_ASSIMP="third_party\assimp\bin\vs2022\assimp-vc143-mt.dll"
34+
set SRC="*.c??"
35+
36+
@echo on
37+
38+
cl %CFLAGS% %SRC% %INCLUDES% /link %LFLAGS% %LIBS% /OUT:"shaders.exe"
39+
40+
copy ..\%DLL_PATH_GLEW% .\
41+
copy ..\%DLL_PATH_GLFW% .\

0 commit comments

Comments
 (0)