-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 5628676
Showing
121 changed files
with
4,375 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: Ubuntu Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
env: | ||
BUILD_TYPE: Release | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Install Qt | ||
uses: jurplel/install-qt-action@v2 | ||
|
||
- name: Configure CMake | ||
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} | ||
|
||
- name: Build | ||
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} | ||
- name: Pack Resources | ||
if: startsWith(github.ref, 'refs/tags/v') | ||
run: | | ||
mkdir ${{github.workspace}}/release/ | ||
cp ${{github.workspace}}/build/TDGame ${{github.workspace}}/release/ | ||
cp -r ${{github.workspace}}/resource/maps/ ${{github.workspace}}/release/ | ||
- name: Archive Release | ||
uses: thedoctor0/zip-release@master | ||
if: startsWith(github.ref, 'refs/tags/v') | ||
with: | ||
type: "zip" | ||
directory: ${{github.workspace}}/release/ | ||
filename: "TDGame-Ubuntu-${{github.ref_name}}.zip" | ||
|
||
- name: Upload Release | ||
uses: softprops/action-gh-release@v1 | ||
if: startsWith(github.ref, 'refs/tags/v') | ||
with: | ||
files: "${{github.workspace}}/release/TDGame-Ubuntu-${{github.ref_name}}.zip" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: Windows Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
env: | ||
BUILD_TYPE: Release | ||
|
||
jobs: | ||
build: | ||
runs-on: windows-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up MinGW | ||
uses: egor-tensin/setup-mingw@v2 | ||
with: | ||
platform: x64 | ||
|
||
- name: Install Qt | ||
uses: jurplel/install-qt-action@v2 | ||
with: | ||
arch: "win64_mingw81" | ||
|
||
- name: Configure CMake | ||
run: cmake -G "MinGW Makefiles" -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} | ||
|
||
- name: Build | ||
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} | ||
|
||
- name: Pack Resources | ||
if: startsWith(github.ref, 'refs/tags/v') | ||
run: | | ||
mkdir ${{github.workspace}}\release | ||
Xcopy ${{github.workspace}}\build\TDGame.exe ${{github.workspace}}\release | ||
Xcopy /E /I ${{github.workspace}}\resource\maps ${{github.workspace}}\release\maps | ||
cd ${{env.Qt5_Dir}}/bin/ | ||
./windeployqt.exe ${{github.workspace}}\release\TDGame.exe | ||
- name: Archive Release | ||
uses: thedoctor0/zip-release@master | ||
if: startsWith(github.ref, 'refs/tags/v') | ||
with: | ||
type: "zip" | ||
directory: ${{github.workspace}}/release/ | ||
filename: "TDGame-Windows-${{github.ref_name}}.zip" | ||
|
||
- name: Upload Release | ||
uses: softprops/action-gh-release@v1 | ||
if: startsWith(github.ref, 'refs/tags/v') | ||
with: | ||
files: "${{github.workspace}}/release/TDGame-Windows-${{github.ref_name}}.zip" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Prerequisites | ||
*.d | ||
|
||
# Compiled Object files | ||
*.slo | ||
*.lo | ||
*.o | ||
*.obj | ||
|
||
# Precompiled Headers | ||
*.gch | ||
*.pch | ||
|
||
# Compiled Dynamic libraries | ||
*.so | ||
*.dylib | ||
*.dll | ||
|
||
# Fortran module files | ||
*.mod | ||
*.smod | ||
|
||
# Compiled Static libraries | ||
*.lai | ||
*.la | ||
*.a | ||
*.lib | ||
|
||
# Executables | ||
*.exe | ||
*.out | ||
*.app | ||
|
||
# Custom | ||
**build*/** | ||
**.vscode/ | ||
**.vs/ | ||
**_minted**/** | ||
TDGame.pro.user** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
cmake_minimum_required(VERSION 3.10.0) | ||
project(TDGame LANGUAGES CXX) | ||
|
||
set(CMAKE_CXX_STANDARD 17) | ||
set(CMAKE_CXX_STANDARD_REQUIRED ON) | ||
|
||
set(CMAKE_AUTOMOC ON) | ||
set(CMAKE_AUTORCC ON) | ||
set(CMAKE_AUTOUIC ON) | ||
|
||
include_directories(include) | ||
file(GLOB CMAKE_CXX_SOURCES src/*.cpp src/**/*.cpp) | ||
file(GLOB CMAKE_CXX_HEADERS include/*.h include/**/*.h) | ||
file(GLOB CMAKE_CXX_RESOURCES resource/*.qrc) | ||
|
||
find_package(Qt5 COMPONENTS Widgets Core Gui Multimedia REQUIRED) | ||
|
||
if(WIN32) | ||
message(status "compiling for win32") | ||
add_executable(TDGame WIN32 | ||
${CMAKE_CXX_HEADERS} | ||
${CMAKE_CXX_SOURCES} | ||
${CMAKE_CXX_RESOURCES} | ||
) | ||
else() | ||
add_executable(TDGame | ||
${CMAKE_CXX_HEADERS} | ||
${CMAKE_CXX_SOURCES} | ||
${CMAKE_CXX_RESOURCES} | ||
) | ||
endif() | ||
target_link_libraries(TDGame Qt5::Widgets Qt5::Core Qt5::Gui Qt5::Multimedia) | ||
|
Oops, something went wrong.