File tree Expand file tree Collapse file tree 16 files changed +445
-187
lines changed
Expand file tree Collapse file tree 16 files changed +445
-187
lines changed Original file line number Diff line number Diff line change 1+ name : Release
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+
8+ permissions :
9+ contents : write
10+
11+ jobs :
12+ release :
13+ runs-on : windows-latest
14+
15+ steps :
16+ - name : Checkout repository
17+ uses : actions/checkout@v4
18+
19+ - name : Setup MSVC Developer Command Prompt
20+ uses : TheMrMilchmann/setup-msvc-dev@v3
21+ with :
22+ arch : x64
23+
24+ - name : Install ninja-build tool
25+ uses : seanmiddleditch/gha-setup-ninja@v5
26+
27+ - name : Build project
28+ run : |
29+ mkdir build
30+ cd build
31+ cmake .. -G Ninja -DCMAKE_BUILD_TYPE=MinSizeRel
32+ cmake --build . --target install --config MinSizeRel
33+
34+ - name : Zip the build
35+ run : |
36+ cd install
37+ 7z a ../Operating-System-Project.x64.zip *
38+
39+ - name : GH Release
40+ uses : softprops/action-gh-release@v2
41+ with :
42+ name : Operating-System-Project
43+ tag_name : 1.0.0
44+ files : |
45+ Operating-System-Project.x64.zip
Original file line number Diff line number Diff line change 11# Ẩn tất cả các file có đuôi .exe (file thực thi)
2- # *.exe -> Phiên bản mới: Cho phép tải về file thực thi
2+ * .exe
33
44# Ẩn thư mục .vscode
5- # .vscode/ -> Phiên bản mới: Cho phép tải về thư mục .vscode
5+ .vscode /
66
77# Ẩn file lịch sử và mọi thứ liên quan
88history.txt
@@ -12,4 +12,8 @@ hello.txt
1212.image /
1313
1414# Ẩn thư mục Private
15- Private /
15+ Private /
16+
17+ build /
18+ out /
19+ install /
Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ cmake_minimum_required (VERSION 3.10.2)
2+
3+ project (Operating-System -Project VERSION 1.0.0)
4+
5+ set (CMAKE_CXX_STANDARD 17)
6+ set (CMAKE_CXX_STANDARD_REQUIRED True )
7+
8+ set (CMAKE_INSTALL_PREFIX "${CMAKE_SOURCE_DIR} /install" )
9+
10+ add_executable (Operating-System -Project main.cpp)
11+ add_definitions (-DNOMINMAX)
12+
13+ install (TARGETS Operating-System -Project RUNTIME DESTINATION .)
14+
15+ add_subdirectory (Process)
16+
17+ install (DIRECTORY Testcase/ DESTINATION Testcase FILES_MATCHING PATTERN "*" )
18+
19+ install (DIRECTORY Document/ DESTINATION Document FILES_MATCHING PATTERN "*" )
Original file line number Diff line number Diff line change 1+ cmake_minimum_required (VERSION 3.10.2)
2+
3+ file (GLOB PROCESS_SOURCES *.cpp *.c)
4+
5+ foreach (SOURCE_FILE ${PROCESS_SOURCES} )
6+ get_filename_component (EXECUTABLE_NAME ${SOURCE_FILE} NAME_WE )
7+
8+ add_executable (${EXECUTABLE_NAME} ${SOURCE_FILE} )
9+ add_definitions (-D_CRT_SECURE_NO_WARNINGS)
10+
11+ install (TARGETS ${EXECUTABLE_NAME} RUNTIME DESTINATION Process)
12+ endforeach ()
13+
14+ set_target_properties (countdown PROPERTIES LINK_FLAGS "/SUBSYSTEM:WINDOWS" )
You can’t perform that action at this time.
0 commit comments