Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ insert_final_newline = true
indent_style = space
indent_size = 4

[*.{sh,rb,js,yml,yaml,adoc}]
[{*.{sh,rb,js,yml,yaml,adoc},configure}]
indent_style = space
indent_size = 2

Expand Down
21 changes: 18 additions & 3 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,9 @@
*.py text
*.rb text
*.sh text
*.ac text
*.am text

# external sources
tests/doctest.h -diff linguist-vendored
builds/autoconf/m4/ax_*.m4 -diff linguist-vendored
src/external/* -diff linguist-vendored
src/midiprogram.h -diff linguist-vendored
src/midisequencer.* -diff linguist-vendored
Expand All @@ -19,3 +17,20 @@ CMakePresets.json -diff linguist-generated
builds/android/app/src/main/java/org/libsdl/app/*.java -diff linguist-vendored
builds/android/app/src/main/java/org/libsdl/app/SDLActivity.java diff
src/generated/* -diff linguist-generated

.gitattributes export-ignore
.gitignore export-ignore
/.github/ export-ignore
/.tx/ export-ignore
.editorconfig export-ignore
/builds/cmake/.git-hash export-subst

#TODO? .gitmodules export-ignore
#TODO? /builds/libretro/ export-ignore

#TODO: Android is usually built from git, but maybe keep it (e.g. f-droid)?
/builds/android/ export-ignore
/builds/flatpak/ export-ignore
/builds/snap/ export-ignore
/builds/release-helper.sh export-ignore
/builds/make-dist.sh export-ignore
8 changes: 8 additions & 0 deletions .github/config.markdownlint-cli2.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"config": {
// MD012/no-multiple-blanks : Allow 2 consecutive blank lines
"no-multiple-blanks": {
"maximum": 2
}
}
}
1 change: 1 addition & 0 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,6 @@ jobs:
if: steps.changed-files-md.outputs.any_changed == 'true'
uses: DavidAnson/markdownlint-cli2-action@v22
with:
config: '.github/config.markdownlint-cli2.jsonc'
globs: ${{ steps.changed-files-md.outputs.all_changed_files }}
separator: ","
34 changes: 3 additions & 31 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/bin/
/Makefile
/easyrpg-player
/Player.app
*.a
Expand All @@ -9,33 +7,8 @@
*.orig
*.bak

# autotools
/autom4te.cache/
/easyrpg-player-*/
/.libs/
.deps/
Makefile.in
aclocal.m4
config.h
config.h.in
config.status
configure
libtool
/builds/autoconf/aux/
/builds/autoconf/m4/*.m4
!/builds/autoconf/m4/ax_*.m4
!/builds/autoconf/m4/with_pkg.m4
stamp-h1
.dirstamp
*.la
*.lo
/output
/utils
/directorytree
/.version-append
/.version-git

# cmake
/Makefile
CMakeFiles/
CMakeScripts/
CMakeCache.txt
Expand Down Expand Up @@ -88,10 +61,10 @@ build/
# test/run artifacts
easyrpg_log.txt
/*.log
/*.trs
Testing/

# distribution archives
/easyrpg-player-*/
easyrpg-player-*.tar.*
*.zip

Expand All @@ -109,9 +82,8 @@ __MACOSX
/RelWithDebInfo/
/*.build/

# legacy
# legacy, used for PLAYER_BUILD_LIBLCF
/lib/liblcf/
.buildconfig

# Android
*.iml
Expand Down
68 changes: 17 additions & 51 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ include(PlayerConfigureWindows)
include(PlayerFindPackage)
include(PlayerBuildType)
include(PlayerMisc)
include(GetGitRevisionDescription)

# Dependencies provided by CMake Presets
option(PLAYER_FIND_ROOT_PATH_APPEND
Expand Down Expand Up @@ -515,53 +514,24 @@ set(PLAYER_VERSION_FULL ${PLAYER_VERSION})
string(CONCAT PROJECT_VERSION
${PROJECT_VERSION_MAJOR} "." ${PROJECT_VERSION_MINOR} "."
${PROJECT_VERSION_PATCH} "." ${PROJECT_VERSION_TWEAK})

set(PLAYER_VERSION_GIT "")
git_get_exact_tag(GIT_TAG)
# Do not include a hash, if we are building a release tag
if(NOT GIT_TAG)
# otherwise concatenate a version with hash
git_describe(GIT_DESCRIPTION)
if(GIT_DESCRIPTION)
string(REPLACE "-" ";" GIT_DESCRIPTION ${GIT_DESCRIPTION})
list(LENGTH GIT_DESCRIPTION GIT_DESCRIPTION_PARTS)
set(GIT_MESSAGE "Found git info: ")
if(GIT_DESCRIPTION_PARTS EQUAL 3)
list(GET GIT_DESCRIPTION 0 GIT_TAG)
list(GET GIT_DESCRIPTION 1 GIT_COMMITS)
list(GET GIT_DESCRIPTION 2 GIT_HASH)
string(APPEND GIT_MESSAGE "${GIT_COMMITS} commits since tag \"${GIT_TAG}\", ")
string(PREPEND GIT_COMMITS "+")
# strip the g prefix
string(SUBSTRING ${GIT_HASH} 1 -1 GIT_HASH)
else()
# no tags found, only hash
list(GET GIT_DESCRIPTION 0 GIT_HASH)
endif()
set(PLAYER_VERSION_GIT "git${GIT_COMMITS}@${GIT_HASH}")
string(APPEND GIT_MESSAGE "object hash is ${GIT_HASH}")
git_local_changes(GIT_DIRTY)
if(GIT_DIRTY STREQUAL "DIRTY")
string(APPEND PLAYER_VERSION_GIT "-dirty")
string(APPEND GIT_MESSAGE ", you have uncommitted changes")
endif()
string(APPEND PLAYER_VERSION_FULL "-${PLAYER_VERSION_GIT}")

message(STATUS "${GIT_MESSAGE}")
endif()
set(PLAYER_VERSION_DEFS EP_VERSION="${PLAYER_VERSION}"
EP_VERSION_MAJOR=${PROJECT_VERSION_MAJOR} EP_VERSION_MINOR=${PROJECT_VERSION_MINOR}
EP_VERSION_PATCH=${PROJECT_VERSION_PATCH} EP_VERSION_TWEAK=${PROJECT_VERSION_TWEAK})

player_find_gitversion(VERSION_VAR PLAYER_VERSION_GIT
MESSAGE_VAR GIT_STATUS)
if(PLAYER_VERSION_GIT)
string(APPEND PLAYER_VERSION_FULL "-${PLAYER_VERSION_GIT}")
list(APPEND PLAYER_VERSION_DEFS EP_VERSION_GIT="${PLAYER_VERSION_GIT}")
endif()

string(TIMESTAMP PLAYER_DATE "(%Y-%m-%d)")
set(PLAYER_VERSION_APPEND ${PLAYER_DATE} CACHE STRING "Additional version information to include")
set_property(SOURCE src/version.cpp PROPERTY COMPILE_DEFINITIONS
EP_VERSION="${PLAYER_VERSION}";
EP_VERSION_MAJOR=${PROJECT_VERSION_MAJOR};
EP_VERSION_MINOR=${PROJECT_VERSION_MINOR};
EP_VERSION_PATCH=${PROJECT_VERSION_PATCH};
EP_VERSION_TWEAK=${PROJECT_VERSION_TWEAK};
EP_VERSION_APPEND="${PLAYER_VERSION_APPEND}";
EP_VERSION_GIT="${PLAYER_VERSION_GIT}"
)
if(NOT PLAYER_VERSION_APPEND STREQUAL "")
list(APPEND PLAYER_VERSION_DEFS EP_VERSION_APPEND="${PLAYER_VERSION_APPEND}")
endif()

set_property(SOURCE src/version.cpp PROPERTY COMPILE_DEFINITIONS ${PLAYER_VERSION_DEFS})

# Platform setup
if(NINTENDO_3DS)
Expand Down Expand Up @@ -1555,14 +1525,7 @@ find_package(Doxygen)
set(DOXYGEN_STATUS "Unavailable")
if(DOXYGEN_FOUND)
set(DOXYGEN_STATUS "Available (target \"doc\")")
# fake autotools variables
set(PACKAGE_VERSION ${PLAYER_VERSION})
set(DX_DOCDIR ${CMAKE_CURRENT_BINARY_DIR}/doc)
set(srcdir ${CMAKE_CURRENT_SOURCE_DIR})
configure_file(resources/Doxyfile.in resources/Doxyfile @ONLY)
unset(PACKAGE_VERSION)
unset(DX_DOCDIR)
unset(srcdir)

add_custom_target(player_doc
${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/resources/Doxyfile
Expand Down Expand Up @@ -1639,6 +1602,9 @@ endif()

# Print summary
message(STATUS "")
message(STATUS "EasyRPG Player version ${PLAYER_VERSION} has been configured --")
message(STATUS "Git info: ${GIT_STATUS}")
message(STATUS "Build type: ${CMAKE_BUILD_TYPE}")
set(TARGET_STATUS "${PLAYER_TARGET_PLATFORM}")
if(NINTENDO_WIIU)
set(TARGET_STATUS "Wii U (SDL2)")
Expand Down
Loading
Loading