Compare commits
2 Commits
0a71bdc1c0
...
gitea-ci
| Author | SHA1 | Date | |
|---|---|---|---|
| 8e7058625d | |||
| 7a6cf0e487 |
@@ -1,6 +1,6 @@
|
||||
---
|
||||
BasedOnStyle: Google
|
||||
AlignAfterOpenBracket: Align
|
||||
AlignAfterOpenBracket: AlwaysBreak
|
||||
AlignArrayOfStructures: Left
|
||||
AlignConsecutiveAssignments: None
|
||||
AlignConsecutiveDeclarations: None
|
||||
@@ -9,6 +9,7 @@ AlignEscapedNewlines: Left
|
||||
AlignOperands: Align
|
||||
AlignTrailingComments: true
|
||||
AllowAllArgumentsOnNextLine: true
|
||||
AllowAllParametersOfDeclarationOnNextLine: true
|
||||
AllowShortBlocksOnASingleLine: Never
|
||||
AllowShortCaseLabelsOnASingleLine: false
|
||||
AllowShortFunctionsOnASingleLine: Inline
|
||||
@@ -20,11 +21,8 @@ InsertBraces: true
|
||||
IndentAccessModifiers: true
|
||||
EmptyLineAfterAccessModifier: Never
|
||||
EmptyLineBeforeAccessModifier: LogicalBlock
|
||||
BinPackArguments: false
|
||||
BinPackParameters: false
|
||||
AllowAllParametersOfDeclarationOnNextLine: true
|
||||
ExperimentalAutoDetectBinPacking: false
|
||||
BreakBeforeBraces: Linux
|
||||
BinPackArguments: true
|
||||
BinPackParameters: true
|
||||
BreakBeforeBinaryOperators: NonAssignment
|
||||
BreakBeforeTernaryOperators: true
|
||||
BreakConstructorInitializers: AfterColon
|
||||
@@ -60,7 +58,7 @@ SpaceAfterTemplateKeyword: true
|
||||
SpaceBeforeAssignmentOperators: true
|
||||
SpaceBeforeCpp11BracedList: true
|
||||
SpaceBeforeCtorInitializerColon: true
|
||||
SpaceBeforeParens: ControlStatementsExceptControlMacros
|
||||
SpaceBeforeParens: Never
|
||||
SpaceBeforeRangeBasedForLoopColon: true
|
||||
SpacesBeforeTrailingComments: 2
|
||||
SpaceInEmptyParentheses: false
|
||||
|
||||
145
.clang-tidy
@@ -139,149 +139,8 @@ readability-redundant-smartptr-get,
|
||||
readability-redundant-string-cstr,
|
||||
readability-redundant-string-init,
|
||||
readability-simplify-subscript-expr,
|
||||
readability-static-accessed-through-instance,
|
||||
readability-static-definition-in-anonymous-namespace,
|
||||
readability-string-compare,
|
||||
readability-uniqueptr-delete-release,
|
||||
readability-use-anyofallof'
|
||||
CheckOptions:
|
||||
bugprone-argument-comment.CommentBoolLiterals: '0'
|
||||
bugprone-argument-comment.CommentCharacterLiterals: '0'
|
||||
bugprone-argument-comment.CommentFloatLiterals: '0'
|
||||
bugprone-argument-comment.CommentIntegerLiterals: '0'
|
||||
bugprone-argument-comment.CommentNullPtrs: '0'
|
||||
bugprone-argument-comment.CommentStringLiterals: '0'
|
||||
bugprone-argument-comment.CommentUserDefinedLiterals: '0'
|
||||
bugprone-argument-comment.IgnoreSingleArgument: '0'
|
||||
bugprone-argument-comment.StrictMode: '0'
|
||||
bugprone-assert-side-effect.AssertMacros: assert,NSAssert,NSCAssert
|
||||
bugprone-assert-side-effect.CheckFunctionCalls: 'false'
|
||||
bugprone-assert-side-effect.IgnoredFunctions: __builtin_expect
|
||||
bugprone-dangling-handle.HandleClasses: 'std::basic_string_view;std::experimental::basic_string_view'
|
||||
bugprone-dynamic-static-initializers.HeaderFileExtensions: ';h;hh;hpp;hxx'
|
||||
bugprone-lambda-function-name.IgnoreMacros: 'false'
|
||||
bugprone-misplaced-widening-cast.CheckImplicitCasts: 'false'
|
||||
bugprone-not-null-terminated-result.WantToUseSafeFunctions: 'true'
|
||||
bugprone-reserved-identifier.AggressiveDependentMemberLookup: 'false'
|
||||
bugprone-reserved-identifier.AllowedIdentifiers: ''
|
||||
bugprone-reserved-identifier.Invert: 'false'
|
||||
bugprone-sizeof-expression.WarnOnSizeOfCompareToConstant: 'true'
|
||||
bugprone-sizeof-expression.WarnOnSizeOfConstant: 'true'
|
||||
bugprone-sizeof-expression.WarnOnSizeOfIntegerExpression: 'false'
|
||||
bugprone-sizeof-expression.WarnOnSizeOfPointerToAggregate: 'true'
|
||||
bugprone-sizeof-expression.WarnOnSizeOfThis: 'true'
|
||||
bugprone-string-constructor.LargeLengthThreshold: '8388608'
|
||||
bugprone-string-constructor.StringNames: '::std::basic_string;::std::basic_string_view'
|
||||
bugprone-string-constructor.WarnOnLargeLength: 'true'
|
||||
bugprone-suspicious-enum-usage.StrictMode: 'false'
|
||||
bugprone-suspicious-include.HeaderFileExtensions: ';h;hh;hpp;hxx'
|
||||
bugprone-suspicious-include.ImplementationFileExtensions: 'c;cc;cpp;cxx'
|
||||
bugprone-suspicious-missing-comma.MaxConcatenatedTokens: '5'
|
||||
bugprone-suspicious-missing-comma.RatioThreshold: '0.200000'
|
||||
bugprone-suspicious-missing-comma.SizeThreshold: '5'
|
||||
bugprone-suspicious-string-compare.StringCompareLikeFunctions: ''
|
||||
bugprone-suspicious-string-compare.WarnOnImplicitComparison: 'true'
|
||||
bugprone-suspicious-string-compare.WarnOnLogicalNotComparison: 'false'
|
||||
bugprone-too-small-loop-variable.MagnitudeBitsUpperLimit: '16'
|
||||
bugprone-unhandled-self-assignment.WarnOnlyIfThisHasSuspiciousField: 'true'
|
||||
bugprone-unused-return-value.AllowCastToVoid: 'false'
|
||||
bugprone-unused-return-value.CheckedFunctions: '::std::async;::std::launder;::std::remove;::std::remove_if;::std::unique;::std::unique_ptr::release;::std::basic_string::empty;::std::vector::empty;::std::back_inserter;::std::distance;::std::find;::std::find_if;::std::inserter;::std::lower_bound;::std::make_pair;::std::map::count;::std::map::find;::std::map::lower_bound;::std::multimap::equal_range;::std::multimap::upper_bound;::std::set::count;::std::set::find;::std::setfill;::std::setprecision;::std::setw;::std::upper_bound;::std::vector::at;::bsearch;::ferror;::feof;::isalnum;::isalpha;::isblank;::iscntrl;::isdigit;::isgraph;::islower;::isprint;::ispunct;::isspace;::isupper;::iswalnum;::iswprint;::iswspace;::isxdigit;::memchr;::memcmp;::strcmp;::strcoll;::strncmp;::strpbrk;::strrchr;::strspn;::strstr;::wcscmp;::access;::bind;::connect;::difftime;::dlsym;::fnmatch;::getaddrinfo;::getopt;::htonl;::htons;::iconv_open;::inet_addr;::isascii;::isatty;::mmap;::newlocale;::openat;::pathconf;::pthread_equal;::pthread_getspecific;::pthread_mutex_trylock;::readdir;::readlink;::recvmsg;::regexec;::scandir;::semget;::setjmp;::shm_open;::shmget;::sigismember;::strcasecmp;::strsignal;::ttyname'
|
||||
bugprone-unused-return-value.CheckedReturnTypes: '::std::error_code;::std::error_condition;::std::errc;::std::expected;::boost::system::error_code'
|
||||
cert-dcl16-c.NewSuffixes: 'L;LL;LU;LLU'
|
||||
cert-err33-c.AllowCastToVoid: 'true'
|
||||
cert-err33-c.CheckedFunctions: '::aligned_alloc;::asctime_s;::at_quick_exit;::atexit;::bsearch;::bsearch_s;::btowc;::c16rtomb;::c32rtomb;::calloc;::clock;::cnd_broadcast;::cnd_init;::cnd_signal;::cnd_timedwait;::cnd_wait;::ctime_s;::fclose;::fflush;::fgetc;::fgetpos;::fgets;::fgetwc;::fopen;::fopen_s;::fprintf;::fprintf_s;::fputc;::fputs;::fputwc;::fputws;::fread;::freopen;::freopen_s;::fscanf;::fscanf_s;::fseek;::fsetpos;::ftell;::fwprintf;::fwprintf_s;::fwrite;::fwscanf;::fwscanf_s;::getc;::getchar;::getenv;::getenv_s;::gets_s;::getwc;::getwchar;::gmtime;::gmtime_s;::localtime;::localtime_s;::malloc;::mbrtoc16;::mbrtoc32;::mbsrtowcs;::mbsrtowcs_s;::mbstowcs;::mbstowcs_s;::memchr;::mktime;::mtx_init;::mtx_lock;::mtx_timedlock;::mtx_trylock;::mtx_unlock;::printf_s;::putc;::putwc;::raise;::realloc;::remove;::rename;::scanf;::scanf_s;::setlocale;::setvbuf;::signal;::snprintf;::snprintf_s;::sprintf;::sprintf_s;::sscanf;::sscanf_s;::strchr;::strerror_s;::strftime;::strpbrk;::strrchr;::strstr;::strtod;::strtof;::strtoimax;::strtok;::strtok_s;::strtol;::strtold;::strtoll;::strtoul;::strtoull;::strtoumax;::strxfrm;::swprintf;::swprintf_s;::swscanf;::swscanf_s;::thrd_create;::thrd_detach;::thrd_join;::thrd_sleep;::time;::timespec_get;::tmpfile;::tmpfile_s;::tmpnam;::tmpnam_s;::tss_create;::tss_get;::tss_set;::ungetc;::ungetwc;::vfprintf;::vfprintf_s;::vfscanf;::vfscanf_s;::vfwprintf;::vfwprintf_s;::vfwscanf;::vfwscanf_s;::vprintf_s;::vscanf;::vscanf_s;::vsnprintf;::vsnprintf_s;::vsprintf;::vsprintf_s;::vsscanf;::vsscanf_s;::vswprintf;::vswprintf_s;::vswscanf;::vswscanf_s;::vwprintf_s;::vwscanf;::vwscanf_s;::wcrtomb;::wcschr;::wcsftime;::wcspbrk;::wcsrchr;::wcsrtombs;::wcsrtombs_s;::wcsstr;::wcstod;::wcstof;::wcstoimax;::wcstok;::wcstok_s;::wcstol;::wcstold;::wcstoll;::wcstombs;::wcstombs_s;::wcstoul;::wcstoull;::wcstoumax;::wcsxfrm;::wctob;::wctrans;::wctype;::wmemchr;::wprintf_s;::wscanf;::wscanf_s;'
|
||||
cert-msc51-cpp.DisallowedSeedTypes: 'time_t,std::time_t'
|
||||
cert-oop54-cpp.WarnOnlyIfThisHasSuspiciousField: 'false'
|
||||
cert-str34-c.CharTypdefsToIgnore: ''
|
||||
cert-str34-c.DiagnoseSignedUnsignedCharComparisons: 'false'
|
||||
cppcoreguidelines-non-private-member-variables-in-classes.IgnoreClassesWithAllMemberVariablesBeingPublic: 'true'
|
||||
cppcoreguidelines-pro-type-member-init.IgnoreArrays: 'false'
|
||||
cppcoreguidelines-pro-type-member-init.UseAssignment: 'false'
|
||||
cppcoreguidelines-pro-type-static-cast-downcast.StrictMode: 'true'
|
||||
google-readability-braces-around-statements.ShortStatementLines: '1'
|
||||
google-readability-function-size.StatementThreshold: '800'
|
||||
google-readability-namespace-comments.ShortNamespaceLines: '10'
|
||||
google-readability-namespace-comments.SpacesBeforeComments: '2'
|
||||
hicpp-multiway-paths-covered.WarnOnMissingElse: 'false'
|
||||
llvm-else-after-return.WarnOnConditionVariables: 'false'
|
||||
llvm-else-after-return.WarnOnUnfixable: 'false'
|
||||
llvm-qualified-auto.AddConstToQualified: 'false'
|
||||
misc-throw-by-value-catch-by-reference.CheckThrowTemporaries: 'true'
|
||||
misc-throw-by-value-catch-by-reference.WarnOnLargeObjects: 'false'
|
||||
misc-uniqueptr-reset-release.IncludeStyle: llvm
|
||||
modernize-avoid-bind.PermissiveParameterList: 'false'
|
||||
modernize-deprecated-headers.CheckHeaderFile: 'false'
|
||||
modernize-loop-convert.IncludeStyle: llvm
|
||||
modernize-loop-convert.MakeReverseRangeFunction: ''
|
||||
modernize-loop-convert.MakeReverseRangeHeader: ''
|
||||
modernize-loop-convert.MaxCopySize: '16'
|
||||
modernize-loop-convert.MinConfidence: reasonable
|
||||
modernize-loop-convert.NamingStyle: CamelCase
|
||||
modernize-loop-convert.UseCxx20ReverseRanges: 'true'
|
||||
modernize-make-shared.IgnoreDefaultInitialization: 'true'
|
||||
modernize-make-shared.IgnoreMacros: 'true'
|
||||
modernize-make-shared.IncludeStyle: llvm
|
||||
modernize-make-shared.MakeSmartPtrFunction: 'std::make_shared'
|
||||
modernize-make-shared.MakeSmartPtrFunctionHeader: '<memory>'
|
||||
modernize-make-unique.IgnoreDefaultInitialization: 'true'
|
||||
modernize-make-unique.IgnoreMacros: 'true'
|
||||
modernize-make-unique.IncludeStyle: llvm
|
||||
modernize-make-unique.MakeSmartPtrFunction: 'std::make_unique'
|
||||
modernize-make-unique.MakeSmartPtrFunctionHeader: '<memory>'
|
||||
modernize-pass-by-value.IncludeStyle: llvm
|
||||
modernize-pass-by-value.ValuesOnly: 'false'
|
||||
modernize-raw-string-literal.DelimiterStem: lit
|
||||
modernize-raw-string-literal.ReplaceShorterLiterals: 'false'
|
||||
modernize-replace-auto-ptr.IncludeStyle: llvm
|
||||
modernize-replace-disallow-copy-and-assign-macro.MacroName: DISALLOW_COPY_AND_ASSIGN
|
||||
modernize-replace-random-shuffle.IncludeStyle: llvm
|
||||
modernize-use-auto.MinTypeNameLength: '5'
|
||||
modernize-use-auto.RemoveStars: 'false'
|
||||
modernize-use-bool-literals.IgnoreMacros: 'true'
|
||||
modernize-use-emplace.ContainersWithPush: '::std::stack;::std::queue;::std::priority_queue'
|
||||
modernize-use-emplace.ContainersWithPushBack: '::std::vector;::std::list;::std::deque'
|
||||
modernize-use-emplace.ContainersWithPushFront: '::std::forward_list;::std::list;::std::deque'
|
||||
modernize-use-emplace.EmplacyFunctions: 'vector::emplace_back;vector::emplace;deque::emplace;deque::emplace_front;deque::emplace_back;forward_list::emplace_after;forward_list::emplace_front;list::emplace;list::emplace_back;list::emplace_front;set::emplace;set::emplace_hint;map::emplace;map::emplace_hint;multiset::emplace;multiset::emplace_hint;multimap::emplace;multimap::emplace_hint;unordered_set::emplace;unordered_set::emplace_hint;unordered_map::emplace;unordered_map::emplace_hint;unordered_multiset::emplace;unordered_multiset::emplace_hint;unordered_multimap::emplace;unordered_multimap::emplace_hint;stack::emplace;queue::emplace;priority_queue::emplace'
|
||||
modernize-use-emplace.IgnoreImplicitConstructors: 'false'
|
||||
modernize-use-emplace.SmartPointers: '::std::shared_ptr;::std::unique_ptr;::std::auto_ptr;::std::weak_ptr'
|
||||
modernize-use-emplace.TupleMakeFunctions: '::std::make_pair;::std::make_tuple'
|
||||
modernize-use-emplace.TupleTypes: '::std::pair;::std::tuple'
|
||||
modernize-use-equals-default.IgnoreMacros: 'true'
|
||||
modernize-use-equals-delete.IgnoreMacros: 'true'
|
||||
modernize-use-nodiscard.ReplacementString: '[[nodiscard]]'
|
||||
modernize-use-noexcept.ReplacementString: ''
|
||||
modernize-use-noexcept.UseNoexceptFalse: 'true'
|
||||
modernize-use-nullptr.IgnoredTypes: 'std::_CmpUnspecifiedParam::;^std::__cmp_cat::__unspec'
|
||||
modernize-use-nullptr.NullMacros: 'NULL'
|
||||
modernize-use-override.AllowOverrideAndFinal: 'false'
|
||||
modernize-use-override.FinalSpelling: final
|
||||
modernize-use-override.IgnoreDestructors: 'true'
|
||||
modernize-use-override.IgnoreTemplateInstantiations: 'false'
|
||||
modernize-use-override.OverrideSpelling: override
|
||||
modernize-use-transparent-functors.SafeMode: 'false'
|
||||
performance-faster-string-find.StringLikeClasses: '::std::basic_string;::std::basic_string_view'
|
||||
performance-for-range-copy.AllowedTypes: ''
|
||||
performance-for-range-copy.WarnOnAllAutoCopies: 'false'
|
||||
performance-inefficient-string-concatenation.StrictMode: 'false'
|
||||
performance-inefficient-vector-operation.EnableProto: 'false'
|
||||
performance-inefficient-vector-operation.VectorLikeClasses: '::std::vector'
|
||||
performance-move-const-arg.CheckMoveToConstRef: 'true'
|
||||
performance-move-const-arg.CheckTriviallyCopyableMove: 'true'
|
||||
performance-no-automatic-move.AllowedTypes: ''
|
||||
performance-type-promotion-in-math-fn.IncludeStyle: llvm
|
||||
performance-unnecessary-copy-initialization.AllowedTypes: ''
|
||||
performance-unnecessary-copy-initialization.ExcludedContainerTypes: ''
|
||||
performance-unnecessary-value-param.AllowedTypes: ''
|
||||
performance-unnecessary-value-param.IncludeStyle: llvm
|
||||
portability-simd-intrinsics.Std: ''
|
||||
portability-simd-intrinsics.Suggest: 'false'
|
||||
readability-avoid-const-params-in-decls.IgnoreMacros: 'true'
|
||||
readability-braces-around-statements.ShortStatementLines: '0'
|
||||
readability-const-return-type.IgnoreMacros: 'true'
|
||||
readability-container-size-empty.ExcludedComparisonTypes: '::std::array'
|
||||
readability-inconsistent-declaration-parameter-name.IgnoreMacros: 'true'
|
||||
readability-inconsistent-declaration-parameter-name.Strict: 'false'
|
||||
readability-redundant-declaration.IgnoreMacros: 'true'
|
||||
readability-redundant-smartptr-get.IgnoreMacros: 'true'
|
||||
readability-redundant-string-init.StringNames: '::std::basic_string_view;::std::basic_string'
|
||||
readability-simplify-subscript-expr.Types: '::std::basic_string;::std::basic_string_view;::std::vector;::std::array;::std::span'
|
||||
readability-uniqueptr-delete-release.PreferResetCall: 'false'
|
||||
readability-use-anyofallof'
|
||||
331
.gitea/workflows/all-builds.yml
Normal file
@@ -0,0 +1,331 @@
|
||||
name: All Builds
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
QT_VERSION: 6.6.0
|
||||
|
||||
jobs:
|
||||
Qtk:
|
||||
env:
|
||||
CONFIG: -DQTK_SUBMODULES=ON -DQTK_DEBUG=OFF -DQTK_CCACHE=OFF -DQTK_GUI=ON -DQTK_PLUGINS=OFF -DQTK_EXAMPLE=ON
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-latest, macos-latest]
|
||||
include:
|
||||
- os: ubuntu-latest
|
||||
cmake: -DCMAKE_PREFIX_PATH=/home/runner/work/qtk/Qt/$QT_VERSION/gcc_64/ $CONFIG
|
||||
flags: -j $(nproc)
|
||||
- os: windows-latest
|
||||
cmake: -DCMAKE_PREFIX_PATH=D:/a/qtk/qtk/Qt/$QT_VERSION/mingw81_64/ $CONFIG
|
||||
flags: ''
|
||||
- os: macos-latest
|
||||
cmake: -DCMAKE_PREFIX_PATH=/home/runner/work/qtk/Qt/$QT_VERSION/gcc_64/ $CONFIG
|
||||
flags: -j $(nproc)
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Install Debian packaging dependencies
|
||||
if: matrix.os == 'ubuntu-latest'
|
||||
run: |
|
||||
apt update -y
|
||||
apt install libxcb-cursor0 python3 -y
|
||||
|
||||
- name: Install Qt
|
||||
uses: jurplel/install-qt-action@v2
|
||||
with:
|
||||
version: ${{ env.QT_VERSION }}
|
||||
|
||||
# Windows
|
||||
|
||||
- name: Chocolatey Action
|
||||
if: matrix.os == 'windows-latest'
|
||||
uses: crazy-max/ghaction-chocolatey@v2
|
||||
with:
|
||||
args: install pkgconfiglite --checksum e87b5ea3c9142256af60f2d5b917aa63b571e6a0 --checksum-type sha1
|
||||
|
||||
- name: Configure Qtk Application
|
||||
shell: bash
|
||||
run: cmake -B build/ ${{ matrix.cmake }}
|
||||
|
||||
- name: Build Qtk Application
|
||||
shell: bash
|
||||
run: cmake --build build/ --config Release --target qtk_gui ${{ matrix.flags }}
|
||||
|
||||
- name: Build Qtk Example
|
||||
if: matrix.os != 'windows-latest'
|
||||
shell: bash
|
||||
run: cmake --build build/ --config Release --target qtk_example ${{ matrix.flags }}
|
||||
|
||||
# Packaging
|
||||
|
||||
- name: Install Qtk Application
|
||||
shell: bash
|
||||
run: cmake --install build/ --config Release --component qtk_gui
|
||||
|
||||
- name: Package Qtk Application
|
||||
shell: bash
|
||||
run: cmake --build build/ --target package --config Release
|
||||
|
||||
- name: Package Qtk (DEB)
|
||||
if: matrix.os == 'ubuntu-latest'
|
||||
shell: bash
|
||||
run: |
|
||||
cd build
|
||||
cpack -C Release -G DEB
|
||||
|
||||
- name: Upload package artifacts (DEB)
|
||||
if: matrix.os == 'ubuntu-latest'
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: qtk-gui-${{ matrix.os }}
|
||||
path: |
|
||||
build/packages/*.deb
|
||||
|
||||
- name: Package Qtk (WIN)
|
||||
if: matrix.os == 'windows-latest'
|
||||
shell: bash
|
||||
run: |
|
||||
cd build
|
||||
cpack -C Release -G NSIS
|
||||
|
||||
- name: Upload package artifacts (WIN)
|
||||
if: matrix.os == 'windows-latest'
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: qtk-gui-${{ matrix.os }}
|
||||
path: |
|
||||
build/packages/*.exe
|
||||
|
||||
- name: Package Qtk (OSX)
|
||||
if: matrix.os == 'macos-latest'
|
||||
shell: bash
|
||||
run: |
|
||||
cd build
|
||||
cpack -C Release -G TGZ
|
||||
|
||||
- name: Upload package artifacts (OSX)
|
||||
if: matrix.os == 'macos-latest'
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: qtk-gui-${{ matrix.os }}
|
||||
path: |
|
||||
build/packages/*.tar.gz
|
||||
|
||||
- name: Upload Qtk install directory
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: qtk-gui-${{ matrix.os }}-install
|
||||
path: install/*
|
||||
|
||||
# TODO: Enable after trimming resources.
|
||||
# - name: Package Qtk Application Sources
|
||||
# if: matrix.os != 'macos-latest'
|
||||
# shell: bash
|
||||
# run: |
|
||||
# cmake --build build/ --target package_source
|
||||
#
|
||||
# - name: Upload package artifacts
|
||||
# uses: actions/upload-artifact@v3
|
||||
# with:
|
||||
# name: qtk-${{ matrix.os }}-packages
|
||||
# path: |
|
||||
# build/packages/*
|
||||
# !build/packages/_CPack_Packages/*
|
||||
|
||||
Qtk-Library:
|
||||
env:
|
||||
CONFIG: -DQTK_SUBMODULES=ON -DQTK_DEBUG=OFF -DQTK_CCACHE=OFF -DQTK_GUI=OFF -DQTK_PLUGINS=OFF -DQTK_EXAMPLE=OFF
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-latest, macos-latest]
|
||||
include:
|
||||
- os: ubuntu-latest
|
||||
cmake: -DCMAKE_PREFIX_PATH=/home/runner/work/qtk/Qt/$QT_VERSION/gcc_64/ $CONFIG
|
||||
flags: -j $(nproc)
|
||||
- os: windows-latest
|
||||
cmake: -DCMAKE_PREFIX_PATH=D:/a/qtk/qtk/Qt/$QT_VERSION/mingw81_64/ $CONFIG
|
||||
flags: ''
|
||||
- os: macos-latest
|
||||
cmake: -DCMAKE_PREFIX_PATH=/home/runner/work/qtk/Qt/$QT_VERSION/gcc_64/ $CONFIG
|
||||
flags: -j $(nproc)
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Install Qt
|
||||
uses: jurplel/install-qt-action@v2
|
||||
with:
|
||||
version: ${{ env.QT_VERSION }}
|
||||
|
||||
# Windows
|
||||
|
||||
- name: Chocolatey Action
|
||||
if: matrix.os == 'windows-latest'
|
||||
uses: crazy-max/ghaction-chocolatey@v2
|
||||
with:
|
||||
args: install pkgconfiglite --checksum e87b5ea3c9142256af60f2d5b917aa63b571e6a0 --checksum-type sha1
|
||||
|
||||
- name: Configure Qtk Library
|
||||
shell: bash
|
||||
run: cmake -B build/ ${{ matrix.cmake }}
|
||||
|
||||
- name: Build Qtk Library
|
||||
shell: bash
|
||||
run: cmake --build build/ --config Release --target qtk_library -- ${{ matrix.flags }}
|
||||
|
||||
# Packaging
|
||||
|
||||
- name: Install Qtk Library
|
||||
shell: bash
|
||||
run: cmake --install build/ --config Release --prefix=$(pwd)/install --component qtk_library
|
||||
|
||||
- name: Package Qtk Library
|
||||
shell: bash
|
||||
run: cmake --build build/ --target package --config Release
|
||||
|
||||
- name: Package Qtk Library (DEB)
|
||||
if: matrix.os == 'ubuntu-latest'
|
||||
shell: bash
|
||||
run: |
|
||||
cd build
|
||||
cpack -C Release -G DEB
|
||||
|
||||
- name: Upload package artifacts (DEB)
|
||||
if: matrix.os == 'ubuntu-latest'
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: libqtk-${{ matrix.os }}
|
||||
path: |
|
||||
build/packages/*.deb
|
||||
|
||||
- name: Package Qtk Library (WIN)
|
||||
if: matrix.os == 'windows-latest'
|
||||
shell: bash
|
||||
run: |
|
||||
cd build
|
||||
cpack -C Release -G NSIS
|
||||
|
||||
- name: Upload package artifacts (WIN)
|
||||
if: matrix.os == 'windows-latest'
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: qtk-${{ matrix.os }}
|
||||
path: |
|
||||
build/packages/*.exe
|
||||
|
||||
- name: Package Qtk Library (OSX)
|
||||
if: matrix.os == 'macos-latest'
|
||||
shell: bash
|
||||
run: |
|
||||
cd build
|
||||
cpack -C Release -G TGZ
|
||||
|
||||
- name: Upload package artifacts (OSX)
|
||||
if: matrix.os == 'macos-latest'
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: qtk-${{ matrix.os }}
|
||||
path: |
|
||||
build/packages/*.tar.gz
|
||||
|
||||
- name: Upload libqtk install
|
||||
uses: actions/upload-artifact@v3
|
||||
if: always()
|
||||
with:
|
||||
name: libqtk-${{ matrix.os }}-install
|
||||
path: install/*
|
||||
|
||||
Qtk-Plugins:
|
||||
env:
|
||||
CONFIG: -DQTK_SUBMODULES=ON -DQTK_DEBUG=OFF -DQTK_CCACHE=OFF -DQTK_GUI=OFF -DQTK_PLUGINS=ON -DQTK_EXAMPLE=OFF
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-latest, macos-latest]
|
||||
include:
|
||||
- os: ubuntu-latest
|
||||
cmake: -DCMAKE_PREFIX_PATH=/home/runner/work/qtk/Qt/$QT_VERSION/gcc_64/ $CONFIG
|
||||
flags: -j $(nproc)
|
||||
- os: windows-latest
|
||||
cmake: -DCMAKE_PREFIX_PATH=D:/a/qtk/qtk/Qt/$QT_VERSION/mingw81_64/ $CONFIG
|
||||
flags: ''
|
||||
- os: macos-latest
|
||||
cmake: -DCMAKE_PREFIX_PATH=/home/runner/work/qtk/Qt/$QT_VERSION/gcc_64/ $CONFIG
|
||||
flags: -j $(nproc)
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Install Qt
|
||||
uses: jurplel/install-qt-action@v2
|
||||
with:
|
||||
version: ${{ env.QT_VERSION }}
|
||||
|
||||
- name: Chocolatey Action
|
||||
if: matrix.os == 'windows-latest'
|
||||
uses: crazy-max/ghaction-chocolatey@v2
|
||||
with:
|
||||
args: install pkgconfiglite --checksum e87b5ea3c9142256af60f2d5b917aa63b571e6a0 --checksum-type sha1
|
||||
|
||||
- name: Configure Qtk Plugins
|
||||
shell: bash
|
||||
run: cmake -B build/ ${{ matrix.cmake }}
|
||||
|
||||
- name: Build Qtk Plugins
|
||||
shell: bash
|
||||
run: cmake --build build/ --config Release --target qtk_plugins -- ${{ matrix.flags }}
|
||||
|
||||
# Packaging
|
||||
|
||||
- name: Install Qtk Plugins
|
||||
shell: bash
|
||||
run: cmake --install build/ --config Release --component qtk_plugins
|
||||
|
||||
Qtk-Assimp-Targets:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-latest]
|
||||
include:
|
||||
- os: ubuntu-latest
|
||||
cmake: -DCMAKE_PREFIX_PATH=/home/runner/work/qtk/Qt/$QT_VERSION/gcc_64/
|
||||
- os: macos-latest
|
||||
cmake: -DCMAKE_PREFIX_PATH=/home/runner/work/qtk/Qt/$QT_VERSION/gcc_64/
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Install Qt
|
||||
uses: jurplel/install-qt-action@v2
|
||||
with:
|
||||
version: ${{ env.QT_VERSION }}
|
||||
|
||||
- name: Install Assimp MacOS
|
||||
if: matrix.os == 'macos-latest'
|
||||
shell: bash
|
||||
run: |
|
||||
brew install assimp
|
||||
|
||||
- name: Install Assimp Ubuntu
|
||||
if: matrix.os == 'ubuntu-latest'
|
||||
shell: bash
|
||||
run: |
|
||||
apt install libassimp-dev
|
||||
|
||||
- name: Configure Qtk
|
||||
shell: bash
|
||||
run: cmake -B build/ ${{ matrix.cmake }} -DQTK_CCACHE=OFF -DQTK_ASSIMP_NEW_INTERFACE=ON
|
||||
|
||||
- name: Build Qtk
|
||||
shell: bash
|
||||
run: cmake --build build/ --config Release
|
||||
76
.gitea/workflows/linting.yml
Normal file
@@ -0,0 +1,76 @@
|
||||
name: Linting
|
||||
|
||||
on:
|
||||
push:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
Tidy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Install Assimp Ubuntu
|
||||
run: |
|
||||
python3 --version
|
||||
|
||||
- name: Install Assimp Ubuntu
|
||||
run: |
|
||||
apt update -y
|
||||
apt install libassimp-dev -y
|
||||
|
||||
- name: Install Qt
|
||||
uses: jurplel/install-qt-action@v3
|
||||
with:
|
||||
version: '6.5.0'
|
||||
|
||||
- name: Build Qtk
|
||||
run: |
|
||||
cmake -B build -DQTK_SUBMODULES=OFF -DQTK_CCACHE=OFF -DQTK_PLUGINS=OFF -DQTK_GUI=ON
|
||||
cmake --build build --target qtk_gui -- -j $(nproc)
|
||||
|
||||
- uses: cpp-linter/cpp-linter-action@v2
|
||||
id: linter
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
# Use clang-tools 14
|
||||
version: '14'
|
||||
# Don't use clang-format with this action
|
||||
# + Set to `file` to use .clang-format (Qtk formats with clang 15)
|
||||
style: ''
|
||||
# Use .clang-tidy file
|
||||
tidy-checks: ''
|
||||
# Check the entire repo for source files to tidy
|
||||
files-changed-only: false
|
||||
# Ignore qtk build and external assimp directories
|
||||
ignore: '.github|build|extern/assimp/assimp'
|
||||
# Point to compile_commands.json produced by build
|
||||
database: 'build'
|
||||
# Use thread comments as feedback
|
||||
thread-comments: true
|
||||
# Show file annotations on GH
|
||||
file-annotations: true
|
||||
|
||||
- name: Fail CI if checks don't pass
|
||||
if: steps.linter.outputs.checks-failed != 0
|
||||
run: exit 1
|
||||
|
||||
Format:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
path:
|
||||
- 'src'
|
||||
- 'app'
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Setup docker
|
||||
uses: crazy-max/ghaction-setup-docker@v3
|
||||
|
||||
- name: clang-format Check
|
||||
uses: jidicula/clang-format-action@v4.9.0
|
||||
with:
|
||||
clang-format-version: '15'
|
||||
check-path: ${{ matrix.path }}
|
||||
@@ -1,22 +1,15 @@
|
||||
name: Build
|
||||
name: All Builds
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- '*'
|
||||
# Runs on tag so the release workflow can use its artifact.
|
||||
tags:
|
||||
- "v*"
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
|
||||
|
||||
env:
|
||||
QT_VERSION: 6.6.0
|
||||
|
||||
jobs:
|
||||
Qtk:
|
||||
name: Qtk Applications
|
||||
env:
|
||||
CONFIG: -DQTK_SUBMODULES=ON -DQTK_DEBUG=OFF -DQTK_CCACHE=OFF -DQTK_GUI=ON -DQTK_PLUGINS=OFF -DQTK_EXAMPLE=ON
|
||||
strategy:
|
||||
@@ -36,10 +29,10 @@ jobs:
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Install Qt
|
||||
uses: jurplel/install-qt-action@v4
|
||||
uses: jurplel/install-qt-action@v2
|
||||
with:
|
||||
version: ${{ env.QT_VERSION }}
|
||||
|
||||
@@ -89,7 +82,7 @@ jobs:
|
||||
|
||||
- name: Upload package artifacts (DEB)
|
||||
if: matrix.os == 'ubuntu-latest'
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: qtk-gui-${{ matrix.os }}
|
||||
path: |
|
||||
@@ -102,19 +95,9 @@ jobs:
|
||||
cd build
|
||||
cpack -C Release -G NSIS
|
||||
|
||||
- name: Upload logs on failure (WIN)
|
||||
if: failure()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: Build-Logs
|
||||
path: |
|
||||
D:\a\qtk\qtk\build\packages\_CPack_Packages\win64\NSIS\NSISOutput.log
|
||||
D:\a\qtk\qtk\build\CMakeFiles\CMakeOutput.log
|
||||
D:\a\qtk\qtk\build\CMakeFiles\CMakeError.log
|
||||
|
||||
- name: Upload package artifacts (WIN)
|
||||
if: matrix.os == 'windows-latest'
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: qtk-gui-${{ matrix.os }}
|
||||
path: |
|
||||
@@ -129,16 +112,16 @@ jobs:
|
||||
|
||||
- name: Upload package artifacts (OSX)
|
||||
if: matrix.os == 'macos-latest'
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: qtk-gui-${{ matrix.os }}
|
||||
path: |
|
||||
build/packages/*.tar.gz
|
||||
|
||||
- name: Upload Qtk install directory
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: qtk-gui-${{ matrix.os }}-archive
|
||||
name: qtk-gui-${{ matrix.os }}-install
|
||||
path: install/*
|
||||
|
||||
# TODO: Enable after trimming resources.
|
||||
@@ -149,7 +132,7 @@ jobs:
|
||||
# cmake --build build/ --target package_source
|
||||
#
|
||||
# - name: Upload package artifacts
|
||||
# uses: actions/upload-artifact@v4
|
||||
# uses: actions/upload-artifact@v3
|
||||
# with:
|
||||
# name: qtk-${{ matrix.os }}-packages
|
||||
# path: |
|
||||
@@ -157,7 +140,6 @@ jobs:
|
||||
# !build/packages/_CPack_Packages/*
|
||||
|
||||
Qtk-Library:
|
||||
name: Qtk library
|
||||
env:
|
||||
CONFIG: -DQTK_SUBMODULES=ON -DQTK_DEBUG=OFF -DQTK_CCACHE=OFF -DQTK_GUI=OFF -DQTK_PLUGINS=OFF -DQTK_EXAMPLE=OFF
|
||||
strategy:
|
||||
@@ -177,10 +159,10 @@ jobs:
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Install Qt
|
||||
uses: jurplel/install-qt-action@v4
|
||||
uses: jurplel/install-qt-action@v2
|
||||
with:
|
||||
version: ${{ env.QT_VERSION }}
|
||||
|
||||
@@ -219,7 +201,7 @@ jobs:
|
||||
|
||||
- name: Upload package artifacts (DEB)
|
||||
if: matrix.os == 'ubuntu-latest'
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: libqtk-${{ matrix.os }}
|
||||
path: |
|
||||
@@ -232,21 +214,11 @@ jobs:
|
||||
cd build
|
||||
cpack -C Release -G NSIS
|
||||
|
||||
- name: Upload logs on failure (WIN)
|
||||
if: failure()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: Build-Logs
|
||||
path: |
|
||||
D:\a\qtk\qtk\build\packages\_CPack_Packages\win64\NSIS\NSISOutput.log
|
||||
D:\a\qtk\qtk\build\CMakeFiles\CMakeOutput.log
|
||||
D:\a\qtk\qtk\build\CMakeFiles\CMakeError.log
|
||||
|
||||
- name: Upload package artifacts (WIN)
|
||||
if: matrix.os == 'windows-latest'
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: libqtk-${{ matrix.os }}
|
||||
name: qtk-${{ matrix.os }}
|
||||
path: |
|
||||
build/packages/*.exe
|
||||
|
||||
@@ -259,21 +231,20 @@ jobs:
|
||||
|
||||
- name: Upload package artifacts (OSX)
|
||||
if: matrix.os == 'macos-latest'
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: libqtk-${{ matrix.os }}
|
||||
name: qtk-${{ matrix.os }}
|
||||
path: |
|
||||
build/packages/*.tar.gz
|
||||
|
||||
- name: Upload libqtk install
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v3
|
||||
if: always()
|
||||
with:
|
||||
name: libqtk-${{ matrix.os }}-archive
|
||||
name: libqtk-${{ matrix.os }}-install
|
||||
path: install/*
|
||||
|
||||
Qtk-Plugins:
|
||||
name: Qtk Qt Designer Plugins
|
||||
env:
|
||||
CONFIG: -DQTK_SUBMODULES=ON -DQTK_DEBUG=OFF -DQTK_CCACHE=OFF -DQTK_GUI=OFF -DQTK_PLUGINS=ON -DQTK_EXAMPLE=OFF
|
||||
strategy:
|
||||
@@ -293,10 +264,10 @@ jobs:
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Install Qt
|
||||
uses: jurplel/install-qt-action@v4
|
||||
uses: jurplel/install-qt-action@v2
|
||||
with:
|
||||
version: ${{ env.QT_VERSION }}
|
||||
|
||||
@@ -321,7 +292,6 @@ jobs:
|
||||
run: cmake --install build/ --config Release --component qtk_plugins
|
||||
|
||||
Qtk-Assimp-Targets:
|
||||
name: Qtk Assimp Platform Targets
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
@@ -334,10 +304,10 @@ jobs:
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Install Qt
|
||||
uses: jurplel/install-qt-action@v4
|
||||
uses: jurplel/install-qt-action@v2
|
||||
with:
|
||||
version: ${{ env.QT_VERSION }}
|
||||
|
||||
@@ -360,31 +330,3 @@ jobs:
|
||||
- name: Build Qtk
|
||||
shell: bash
|
||||
run: cmake --build build/ --config Release
|
||||
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
if: startsWith(github.event.workflow_run.head_branch, 'v')
|
||||
needs: [Qtk, Qtk-Library, Qtk-Plugins]
|
||||
steps:
|
||||
- name: Download Installer Artifact
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: Qtk Packages
|
||||
path: |
|
||||
build/packages/*
|
||||
install/*
|
||||
|
||||
- name: Create GitHub Release
|
||||
id: create_release
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
tag_name: ${{ github.event.workflow_run.head_branch }}
|
||||
name: Qtk ${{ github.event.workflow_run.head_branch }}
|
||||
draft: true
|
||||
prerelease: false
|
||||
generate_release_notes: true
|
||||
files: |
|
||||
build/packages/*
|
||||
install/*
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
14
.github/workflows/linting.yml
vendored
@@ -9,10 +9,10 @@ jobs:
|
||||
Tidy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Install Qt
|
||||
uses: jurplel/install-qt-action@v4
|
||||
uses: jurplel/install-qt-action@v2
|
||||
with:
|
||||
version: '6.5.0'
|
||||
|
||||
@@ -22,7 +22,7 @@ jobs:
|
||||
- name: Build Qtk
|
||||
run: |
|
||||
cmake -B build -DQTK_SUBMODULES=OFF -DQTK_CCACHE=OFF -DQTK_PLUGINS=OFF -DQTK_GUI=ON
|
||||
cmake --build build --target qtk_gui qtk_example -- -j $(nproc)
|
||||
cmake --build build --target qtk_gui -- -j $(nproc)
|
||||
|
||||
- uses: cpp-linter/cpp-linter-action@v2
|
||||
id: linter
|
||||
@@ -30,7 +30,7 @@ jobs:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
# Use clang-tools 14
|
||||
version: '18'
|
||||
version: '14'
|
||||
# Don't use clang-format with this action
|
||||
# + Set to `file` to use .clang-format (Qtk formats with clang 15)
|
||||
style: ''
|
||||
@@ -57,12 +57,12 @@ jobs:
|
||||
matrix:
|
||||
path:
|
||||
- 'src'
|
||||
- 'example-app'
|
||||
- 'app'
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: clang-format Check
|
||||
uses: jidicula/clang-format-action@v4.9.0
|
||||
with:
|
||||
clang-format-version: '18'
|
||||
clang-format-version: '15'
|
||||
check-path: ${{ matrix.path }}
|
||||
|
||||
2
.gitignore
vendored
@@ -5,7 +5,7 @@
|
||||
**/.vscode/**
|
||||
|
||||
# CMake build files
|
||||
**/cmake-build-*/**
|
||||
**/cmake-build-debug/**
|
||||
**/build/**
|
||||
install
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
## Project for working with OpenGL and Qt6 widgets ##
|
||||
## ##
|
||||
## Author: Shaun Reed | Contact: shaunrd0@gmail.com | URL: www.shaunreed.com ##
|
||||
## All Content (c) 2025 Shaun Reed, all rights reserved ##
|
||||
## All Content (c) 2023 Shaun Reed, all rights reserved ##
|
||||
################################################################################
|
||||
cmake_minimum_required(VERSION 3.23)
|
||||
|
||||
@@ -18,7 +18,6 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||
set(CMAKE_MACOSX_BUNDLE ON)
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
|
||||
set(CMAKE_AUTORCC_OPTIONS --binary)
|
||||
|
||||
if(WIN32)
|
||||
set(CMAKE_COMPILE_WARNING_AS_ERROR OFF)
|
||||
@@ -48,14 +47,10 @@ include(GNUInstallDirs)
|
||||
################################################################################
|
||||
option(QTK_DEBUG "Enable debugger" OFF)
|
||||
option(QTK_SUBMODULES "Update external project (assimp) submodule" OFF)
|
||||
option(QTK_GUI "Build the Qtk desktop application" ON)
|
||||
option(QTK_PLUGINS "Install Qtk plugins to Qt Creator path." OFF)
|
||||
option(QTK_EXAMPLE "Build the Qtk example desktop application" ON)
|
||||
option(QTK_CCACHE "Enable ccache" ON)
|
||||
# Options for qtk_gui
|
||||
option(QTK_GUI "Build the Qtk desktop application" ON)
|
||||
option(QTK_GUI_SCENE
|
||||
"Fetch model resources and build the GUI with an example scene." OFF
|
||||
)
|
||||
|
||||
if (QTK_CCACHE)
|
||||
set(CMAKE_CXX_COMPILER_LAUNCHER ccache)
|
||||
@@ -88,8 +83,6 @@ endif ()
|
||||
|
||||
set(QTK_RESOURCES "${CMAKE_SOURCE_DIR}/resources")
|
||||
set(QTK_OSX_ICONS ${CMAKE_SOURCE_DIR}/resources/icons/osx/kilroy.icns)
|
||||
string(TIMESTAMP YEAR "%Y")
|
||||
set(QTK_COPYRIGHT "All Content © 2021-${YEAR} Shaun Reed, all rights reserved.")
|
||||
|
||||
# Point CMAKE_PREFIX_PATH to Qt6 install directory
|
||||
# If Qtk is built within Qt Creator this is not required.
|
||||
|
||||
118
README.md
@@ -3,58 +3,28 @@
|
||||
[](https://github.com/shaunrd0/qtk/actions/workflows/all-builds.yml)
|
||||
[](https://github.com/shaunrd0/qtk/actions/workflows/linting.yml)
|
||||
|
||||
Qtk is a Qt OpenGL graphics library that wraps some QOpenGL functionality in convenience classes
|
||||
Qtk is a Qt OpenGL graphics library created primarily for my own learning
|
||||
purposes. The library wraps some QOpenGL functionality in convenience classes
|
||||
that allow rendering geometry in 2D and 3D using custom GLSL shader programs.
|
||||
|
||||
The Qtk desktop application provides a model loader using [Assimp](https://assimp.org/) within a Qt widget application.
|
||||
You can fly around the scene using WASD while holding down the left or right mouse button.
|
||||
|
||||
Object names can be double-clicked in the tree view panel for quick camera navigation.
|
||||
Properties of the object, like shader code and translation / scale, can be viewed and modified in the side panel.
|
||||
|
||||

|
||||
|
||||
All side panels and toolbars are dockable widgets that can be popped out
|
||||
and reorganized as needed. Panels can also be stacked to create a docked widget with
|
||||
tabs. The central widget that provides the camera view into the scene cannot be
|
||||
detached from the main window in this way.
|
||||
|
||||

|
||||
|
||||
The small triangles floating near 3D models represent the light source being used for the shader.
|
||||
These appear on models using phong, specular, and diffuse lighting techniques.
|
||||
|
||||
The default scene contains basic examples like texture mapping to make a crate from basic cube geometry
|
||||
|
||||

|
||||
|
||||
Examples of Ambient, Diffuse, and Specular GLSL shaders.
|
||||
|
||||
| Ambient | Diffuse | Specular |
|
||||
|-------------------------------------------------------|-------------------------------------------------------|--------------------------------------------------------|
|
||||
| <img src="resources/screenshots/screen-ambient.png"/> | <img src="resources/screenshots/screen-diffuse.png"/> | <img src="resources/screenshots/screen-specular.png"/> |
|
||||
|
||||
And more advanced techniques like Phong lighting (ambient + diffuse + specular) and normal mapping.
|
||||
|
||||

|
||||
|
||||
| Normal Mapping Disabled | Normal Mapping Enabled |
|
||||
|------------------------------------------------------|--------------------------------------------------------|
|
||||
| <img src="resources/screenshots/spartan-phong.png"/> | <img src="resources/screenshots/spartan-normals.png"/> |
|
||||
|
||||
See the `View` toolbar menu to enable debug console widgets for open scenes or reopen previously closed panels.
|
||||
The long-term goal for this project is to create a tool that I can use to
|
||||
practice shader coding or graphics programming techniques. In doing this I hope
|
||||
to also learn more about the Qt UI framework, and the CMake build system.
|
||||
|
||||
Key features that are planned:
|
||||
|
||||
- [x] Runtime loading of `.obj` or similar 3D models.
|
||||
- [x] Drag-and-drop interaction for adding objects to the scene.
|
||||
- [x] Shader / object properties panel to modify related settings.
|
||||
- [ ] Runtime reloading of modified GLSL shaders attached to objects within scenes.
|
||||
- [ ] Multiple views of a scene at one time.
|
||||
- [ ] Camera control modes such as panning, orbiting, or following objects.
|
||||
- [ ] Save / load scene data. The current model requires writing C++ code.
|
||||
- [ ] Basic text editor for quickly modifying shaders attached to objects.
|
||||
- [ ] Reduce size of application resources and git references.
|
||||
* Runtime loading of `.obj` or similar 3D models.
|
||||
* Drag-and-drop interaction for adding objects to the scene.
|
||||
* Runtime reloading of modified GLSL shaders attached to objects within scenes.
|
||||
* Multiple views of a scene at one time.
|
||||
* Camera control modes such as panning, orbiting, or following objects.
|
||||
* Save / load for scene data. The current inheritance model is temporary.
|
||||
* Basic text editor for quickly modifying shaders attached to objects.
|
||||
* Shader / object properties panel to modify related settings.
|
||||
* Reduce size of application resources and git references.
|
||||
|
||||
The Qtk desktop application provides a model loader
|
||||
using [Assimp](https://assimp.org/) within a Qt widget application.
|
||||
|
||||
For examples of using the Qtk API, see the `example-app` project in the root of
|
||||
this repository.
|
||||
@@ -207,29 +177,55 @@ cmake --install build-all/ --component qtk_example --prefix=install
|
||||
See the README in the [example-app/](example-app) subdirectory for instructions
|
||||
on standalone builds.
|
||||
|
||||
### Controls
|
||||
|
||||
You can fly around the scene if you hold the right mouse button and use WASD.
|
||||
If you see a small triangle floating by a model it represents the light source
|
||||
that is being used for the shader rendering the model. These appear on models
|
||||
using phong, specular, and diffuse lighting techniques.
|
||||
|
||||
Object names can be double-clicked in the tree view panel for quick camera
|
||||
navigation. All panels and toolbars are dockable widgets that can be popped out
|
||||
and reorganized as needed. Panels can be stacked to create a docked widget with
|
||||
tabs. The central widget that provides the camera view into the scene cannot be
|
||||
detached from the main window in this way. See the `View` menu to enable debug
|
||||
console widgets for open scenes or reopen previously closed panels.
|
||||
|
||||

|
||||
|
||||
Spartan with no normals -
|
||||
|
||||

|
||||
|
||||
Spartan with normals -
|
||||
|
||||

|
||||
|
||||
#### Development
|
||||
|
||||
This project is using `clang-format` version `>=15.0.5`.
|
||||
On Ubuntu 24.04, clang-format 18 is available to install in apt repositories.
|
||||
This project uses version `15.0.5` of `clang-format`.
|
||||
Before merging any branch we should run `clang-tidy` followed by `clang-format`.
|
||||
|
||||
```bash
|
||||
sudo apt install clang-format
|
||||
git clone git@github.com:llvm/llvm-project.git -b llvmorg-15.0.5
|
||||
cd llvm-project
|
||||
cmake -B build -DLLVM_ENABLE_PROJECTS=clang -DLLVM_ENABLE_RUNTIMES="libcxx;libcxxabi" -DCMAKE_BUILD_TYPE=Release -G "Unix Makefiles" llvm
|
||||
cmake --build build -j $(nproc --ignore=2)
|
||||
sudo cmake --build build -j $(nproc --ignore=2) --target install
|
||||
```
|
||||
|
||||
If `clang-format --version` is any earlier than `15.0.0`, running `clang-format` will fail because this project uses configuration options made available since `15.0.0`.
|
||||
If the `clang-format` version is any earlier than `15.0.0`,
|
||||
running `clang-format` will fail because this project uses configuration options
|
||||
made available since `15.0.0`.
|
||||
|
||||
```bash
|
||||
clang-format --version
|
||||
Ubuntu clang-format version 18.1.3 (1ubuntu1)
|
||||
clang-format version 15.0.5 (git@github.com:llvm/llvm-project.git 154e88af7ec97d9b9f389e55d45bf07108a9a097)
|
||||
```
|
||||
|
||||
CLion has integration for IDE code reformatting actions with `clang-format`.
|
||||
If you're using CLion, the `.clang-format` configuration will be picked up by CLion automatically.
|
||||
|
||||
This repository provides the [`tools/format.sh`](./tools/format.sh) helper script to run `clang-tidy` and `clang-format` on Ubuntu 24.04.
|
||||
Running the script will build Qtk, so it's important to ensure you can manually build from source first.
|
||||
|
||||
If you'd still like to run these tools manually, see the instructions below.
|
||||
If you're using CLion, the `.clang-format` configuration will be picked up by
|
||||
CLion automatically.
|
||||
|
||||
`clang-tidy` can be run with the following commands.
|
||||
|
||||
@@ -238,14 +234,14 @@ If you'd still like to run these tools manually, see the instructions below.
|
||||
cd qtk
|
||||
# Build
|
||||
cmake -B build && cmake --build build -- -j $(nproc)
|
||||
clang-tidy -p build/ --fix --config-file=.clang-tidy src/**/*.cpp src/**/*.h example-app/*.cpp example-app/*.h
|
||||
clang-tidy -p build/ --fix --config-file=.clang-tidy src/*.cpp src/*.h app/*.cpp app/*.h
|
||||
```
|
||||
|
||||
Last we need to run `clang-format`, this can be done with the command directly.
|
||||
This will reformat all the code in the repository.
|
||||
|
||||
```bash
|
||||
clang-format -i --style=file:.clang-format src/**/*.cpp src/**/*.h example-app/*.cpp example-app/*.h
|
||||
clang-format -i --style=file:.clang-format src/app/*.cpp src/app/*.h src/qtk/*.cpp src/qtk/*.h example-app/*.cpp example-app/*.h
|
||||
```
|
||||
|
||||
`clang-format` can be run with git integration (or CLion if you prefer).
|
||||
@@ -308,7 +304,7 @@ To generate packages for Qtk desktop application, we should
|
||||
set `-DQTK_GUI=ON`. If this option is not set we will only package libqtk.
|
||||
|
||||
The NSIS installer will allow component-specific path modification for all of
|
||||
these installation components through a Windows GUI install application.
|
||||
these installation components through a GUI install application.
|
||||
|
||||
##### Resources
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
## Example client project using qtk ##
|
||||
## ##
|
||||
## Author: Shaun Reed | Contact: shaunrd0@gmail.com | URL: www.shaunreed.com ##
|
||||
## All Content (c) 2025 Shaun Reed, all rights reserved ##
|
||||
## All Content (c) 2023 Shaun Reed, all rights reserved ##
|
||||
################################################################################
|
||||
cmake_minimum_required(VERSION 3.23)
|
||||
|
||||
|
||||
@@ -11,32 +11,26 @@
|
||||
|
||||
using namespace Qtk;
|
||||
|
||||
ExampleScene::ExampleScene()
|
||||
{
|
||||
ExampleScene::ExampleScene(Qtk::Scene * scene) : Qtk::SceneInterface(scene) {
|
||||
setSceneName("Example Scene");
|
||||
getCamera().getTransform().setTranslation(-8.0f, 0.0f, 10.0f);
|
||||
getCamera().getTransform().setRotation(-5.0f, 0.0f, 1.0f, 0.0f);
|
||||
}
|
||||
|
||||
ExampleScene::~ExampleScene() = default;
|
||||
ExampleScene::~ExampleScene() {}
|
||||
|
||||
void ExampleScene::init()
|
||||
{
|
||||
setSkybox(new Qtk::Skybox(":/textures/skybox/right.png",
|
||||
":/textures/skybox/top.png",
|
||||
":/textures/skybox/front.png",
|
||||
":/textures/skybox/left.png",
|
||||
":/textures/skybox/bottom.png",
|
||||
":/textures/skybox/back.png",
|
||||
"Skybox"));
|
||||
void ExampleScene::init() {
|
||||
auto skybox = new Qtk::Skybox("Skybox");
|
||||
setSkybox(skybox);
|
||||
|
||||
std::string spartanPath = QTK_EXAMPLE_SOURCE_DIR;
|
||||
spartanPath += "/../resources/models/spartan/spartan.obj";
|
||||
auto spartan = addObject(new Model("spartan", spartanPath.c_str()));
|
||||
spartanPath += "/resources/models/spartan/spartan.obj";
|
||||
auto spartan = new Model("spartan", spartanPath.c_str());
|
||||
addObject(spartan);
|
||||
spartan->getTransform().setTranslation(-4.0f, 0.0f, 0.0f);
|
||||
|
||||
auto mesh = addObject(
|
||||
new Qtk::MeshRenderer("rightTriangle", Triangle(QTK_DRAW_ELEMENTS)));
|
||||
new Qtk::MeshRenderer("rightTriangle", Triangle(QTK_DRAW_ARRAYS)));
|
||||
mesh->getTransform().setTranslation(-5.0f, 0.0f, -2.0f);
|
||||
|
||||
// QTK_DRAW_ARRAYS is the default for generic shapes in qtk/shape.h
|
||||
@@ -62,20 +56,11 @@ void ExampleScene::init()
|
||||
mesh->setColor(GREEN);
|
||||
}
|
||||
|
||||
void ExampleScene::draw()
|
||||
{
|
||||
// The base class method _must_ be called first, before additional logic.
|
||||
void ExampleScene::draw() {
|
||||
Scene::draw();
|
||||
|
||||
// No additional custom draw logic for this example.
|
||||
// QtkScene in Qtk desktop application is an example using custom draw logic.
|
||||
}
|
||||
|
||||
void ExampleScene::update()
|
||||
{
|
||||
auto top_triangle = MeshRenderer::getInstance("topTriangle");
|
||||
auto bottom_triangle = MeshRenderer::getInstance("bottomTriangle");
|
||||
|
||||
void ExampleScene::update() {
|
||||
// Pitch forward and roll sideways
|
||||
MeshRenderer::getInstance("leftTriangle")
|
||||
->getTransform()
|
||||
@@ -84,20 +69,27 @@ void ExampleScene::update()
|
||||
->getTransform()
|
||||
.rotate(0.75f, 0.0f, 0.0f, 1.0f);
|
||||
|
||||
// Make the top and bottom triangles slide left-to-right.
|
||||
static float translateX = 0.025f;
|
||||
float limit = -9.0f; // Origin position.x - 2.0f
|
||||
float posX = top_triangle->getTransform().getTranslation().x();
|
||||
if (posX < limit || posX > limit + 4.0f) {
|
||||
float posX = MeshRenderer::getInstance("topTriangle")
|
||||
->getTransform()
|
||||
.getTranslation()
|
||||
.x();
|
||||
if(posX < limit || posX > limit + 4.0f) {
|
||||
translateX = -translateX;
|
||||
}
|
||||
|
||||
top_triangle->getTransform().translate(translateX, 0.0f, 0.0f);
|
||||
bottom_triangle->getTransform().translate(-translateX, 0.0f, 0.0f);
|
||||
|
||||
// Apply some rotation to the triangles as they move left-to-right.
|
||||
top_triangle->getTransform().rotate(0.75f, 0.2f, 0.0f, 0.4f);
|
||||
bottom_triangle->getTransform().rotate(0.75f, 0.0f, 0.2f, 0.4f);
|
||||
MeshRenderer::getInstance("topTriangle")
|
||||
->getTransform()
|
||||
.translate(translateX, 0.0f, 0.0f);
|
||||
MeshRenderer::getInstance("bottomTriangle")
|
||||
->getTransform()
|
||||
.translate(-translateX, 0.0f, 0.0f);
|
||||
MeshRenderer::getInstance("topTriangle")
|
||||
->getTransform()
|
||||
.rotate(0.75f, 0.2f, 0.0f, 0.4f);
|
||||
MeshRenderer::getInstance("bottomTriangle")
|
||||
->getTransform()
|
||||
.rotate(0.75f, 0.0f, 0.2f, 0.4f);
|
||||
|
||||
MeshRenderer::getInstance("centerCube")
|
||||
->getTransform()
|
||||
|
||||
@@ -11,30 +11,16 @@
|
||||
|
||||
#include <qtk/scene.h>
|
||||
|
||||
class ExampleScene : public Qtk::Scene
|
||||
{
|
||||
class ExampleScene : public Qtk::SceneInterface {
|
||||
public:
|
||||
explicit ExampleScene();
|
||||
ExampleScene(Qtk::Scene * scene);
|
||||
|
||||
~ExampleScene();
|
||||
|
||||
/**
|
||||
* Override the initialization logic for the scene.
|
||||
* This method should up the scene's objects, skybox, etc.
|
||||
*/
|
||||
void init() override;
|
||||
|
||||
/**
|
||||
* Optionally override the draw method for the scene.
|
||||
*
|
||||
* This is just here for example, it should be omitted entirely if we don't
|
||||
* want to provide a custom implementation for the ExampleScene.
|
||||
*/
|
||||
void draw() override;
|
||||
|
||||
/**
|
||||
* Update objects in the scene for translation or rotation.
|
||||
*/
|
||||
void update() override;
|
||||
};
|
||||
|
||||
|
||||
@@ -11,8 +11,7 @@
|
||||
#include "examplewidget.h"
|
||||
|
||||
ExampleWidget::ExampleWidget(QWidget * parent) :
|
||||
QOpenGLWidget(parent), mScene(new ExampleScene)
|
||||
{
|
||||
QOpenGLWidget(parent), mScene(new ExampleScene(new Qtk::SceneEmpty)) {
|
||||
// NOTE: The decorator pattern is used to save / load scenes in Qtk currently.
|
||||
// The initializer above sets mScene to the concrete decorator ExampleScene.
|
||||
// Qtk::SceneEmpty provides an empty scene as the concrete component.
|
||||
@@ -28,8 +27,7 @@ ExampleWidget::ExampleWidget(QWidget * parent) :
|
||||
setFocusPolicy(Qt::ClickFocus);
|
||||
}
|
||||
|
||||
void ExampleWidget::initializeGL()
|
||||
{
|
||||
void ExampleWidget::initializeGL() {
|
||||
initializeOpenGLFunctions();
|
||||
connect(this, SIGNAL(frameSwapped()), this, SLOT(update()));
|
||||
glEnable(GL_MULTISAMPLE);
|
||||
@@ -42,21 +40,18 @@ void ExampleWidget::initializeGL()
|
||||
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
||||
}
|
||||
|
||||
void ExampleWidget::resizeGL(int width, int height)
|
||||
{
|
||||
void ExampleWidget::resizeGL(int width, int height) {
|
||||
Qtk::Scene::getProjectionMatrix().setToIdentity();
|
||||
Qtk::Scene::getProjectionMatrix().perspective(
|
||||
45.0f, float(width) / float(height), 0.1f, 1000.0f);
|
||||
}
|
||||
|
||||
void ExampleWidget::paintGL()
|
||||
{
|
||||
void ExampleWidget::paintGL() {
|
||||
glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT);
|
||||
mScene->draw();
|
||||
}
|
||||
|
||||
void ExampleWidget::update()
|
||||
{
|
||||
void ExampleWidget::update() {
|
||||
mScene->update();
|
||||
QWidget::update();
|
||||
}
|
||||
|
||||
@@ -14,8 +14,7 @@
|
||||
|
||||
#include "examplescene.h"
|
||||
|
||||
class ExampleWidget : public QOpenGLWidget, protected QOpenGLFunctions
|
||||
{
|
||||
class ExampleWidget : public QOpenGLWidget, protected QOpenGLFunctions {
|
||||
Q_OBJECT;
|
||||
|
||||
public:
|
||||
|
||||
@@ -11,8 +11,7 @@
|
||||
|
||||
#include "examplewidget.h"
|
||||
|
||||
int main(int argc, char * argv[])
|
||||
{
|
||||
int main(int argc, char * argv[]) {
|
||||
QApplication app(argc, argv);
|
||||
|
||||
auto window = new QMainWindow;
|
||||
|
||||
|
Before Width: | Height: | Size: 79 KiB After Width: | Height: | Size: 79 KiB |
|
Before Width: | Height: | Size: 7.3 KiB |
|
Before Width: | Height: | Size: 398 B |
|
Before Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 755 B |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.6 KiB |
@@ -1,11 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
# $1: Input path to an image to use for generating icons.
|
||||
# Helper script to generate qtk's icons for Linux given a path to an input PNG.
|
||||
sudo apt install imagemagick
|
||||
|
||||
convert "$1" -resize 256x256 kilroy-256.png
|
||||
convert "$1" -resize 128x128 kilroy-128.png
|
||||
convert "$1" -resize 64x64 kilroy-64.png
|
||||
convert "$1" -resize 48x48 kilroy-48.png
|
||||
convert "$1" -resize 32x32 kilroy-32.png
|
||||
convert "$1" -resize 16x16 kilroy-16.png
|
||||
13
resources/icons/osx/README.md
Normal file
@@ -0,0 +1,13 @@
|
||||
|
||||
```bash
|
||||
sudo apt install icnsutils
|
||||
```
|
||||
|
||||
```bash
|
||||
convert icon.png -resize 32x32 kilroy_32.png
|
||||
convert icon.png -resize 16x16 kilroy_16.png
|
||||
convert icon.png -resize 48x48 kilroy_48.png
|
||||
convert icon.png -resize 128x128 kilroy_128.png
|
||||
convert icon.png -resize 256x256 kilroy_256.png
|
||||
png2icns png2icns kilroy.icns kilroy_*.png
|
||||
```
|
||||
|
Before Width: | Height: | Size: 66 KiB |
@@ -1,15 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
# $1: Input path to an image to use for generating icons.
|
||||
# Helper script to generate qtk's icons for OSX given a path to an input PNG.
|
||||
sudo apt install icnsutils imagemagick
|
||||
|
||||
convert "$1" -resize 32x32 kilroy_32.png
|
||||
convert "$1" -resize 16x16 kilroy_16.png
|
||||
convert "$1" -resize 48x48 kilroy_48.png
|
||||
convert "$1" -resize 128x128 kilroy_128.png
|
||||
convert "$1" -resize 256x256 kilroy_256.png
|
||||
# For the application bundle in OSX.
|
||||
png2icns png2icns kilroy.icns kilroy_*.png
|
||||
|
||||
# For the splash image in DMG installers.
|
||||
convert "$1" -resize 800x600! kilroy_splash.png
|
||||
|
Before Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 201 KiB |
@@ -1,10 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
# $1: Input path to an image to use for generating icons.
|
||||
# Helper script to generate qtk's icons for Windows given a path to an input PNG.
|
||||
sudo apt install imagemagick
|
||||
|
||||
# For the NSIS (un)installer executable shortcut icon.
|
||||
convert "$1" -resize 256x256,128x128,64x64,48x48,32x32,16x16 -background transparent -colors 256 kilroy.ico
|
||||
|
||||
# For the NSIS installer splash screen.
|
||||
convert "$1" -resize 164x314! -background white -flatten kilroy_splash.bmp
|
||||
55
resources/models/alien-hominid/alien.mtl
Normal file
@@ -0,0 +1,55 @@
|
||||
# Blender MTL File: 'None'
|
||||
# Material Count: 4
|
||||
|
||||
newmtl AlienHominid
|
||||
Ns 225.000000
|
||||
Ka 1.000000 1.000000 1.000000
|
||||
Kd 0.800000 0.533344 0.000000
|
||||
Ks 0.500000 0.500000 0.500000
|
||||
Ke 0.000000 0.000000 0.000000
|
||||
Ni 1.450000
|
||||
d 1.000000
|
||||
illum 2
|
||||
map_Bump normal.png
|
||||
map_Kd diffuse.png
|
||||
map_Ns roughness.png
|
||||
refl specular.png
|
||||
|
||||
newmtl Blaster
|
||||
Ns 225.000000
|
||||
Ka 1.000000 1.000000 1.000000
|
||||
Kd 0.800000 0.800000 0.800000
|
||||
Ks 0.500000 0.500000 0.500000
|
||||
Ke 0.000000 0.000000 0.000000
|
||||
Ni 1.450000
|
||||
d 1.000000
|
||||
illum 2
|
||||
map_Bump blaster_normal.png
|
||||
map_Kd blaster_diffuse.png
|
||||
map_Ke blaster_emissive.png
|
||||
map_Ns blaster_roughness.png
|
||||
refl blaster_specular.png
|
||||
|
||||
newmtl Screenshot_2021-04-19_194508
|
||||
Ns 225.000000
|
||||
Ka 1.000000 1.000000 1.000000
|
||||
Kd 0.800000 0.800000 0.800000
|
||||
Ks 0.500000 0.500000 0.500000
|
||||
Ke 0.000000 0.000000 0.000000
|
||||
Ni 1.450000
|
||||
d 1.000000
|
||||
illum 2
|
||||
map_Kd smoke.png
|
||||
map_d smoke.png
|
||||
|
||||
newmtl Untitled-1
|
||||
Ns 77.904748
|
||||
Ka 1.000000 1.000000 1.000000
|
||||
Kd 0.800000 0.800000 0.800000
|
||||
Ks 0.500000 0.500000 0.500000
|
||||
Ke 0.000000 0.000000 0.000000
|
||||
Ni 1.450000
|
||||
d 1.000000
|
||||
illum 2
|
||||
map_Kd Untitled-1.png
|
||||
map_d Untitled-1.png
|
||||
116822
resources/models/alien-hominid/alien.obj
Normal file
BIN
resources/models/alien-hominid/blaster_diffuse.png
Normal file
|
After Width: | Height: | Size: 14 MiB |
BIN
resources/models/alien-hominid/blaster_emissive.png
Normal file
|
After Width: | Height: | Size: 455 KiB |
BIN
resources/models/alien-hominid/blaster_normal.png
Normal file
|
After Width: | Height: | Size: 9.4 MiB |
BIN
resources/models/alien-hominid/blaster_roughness.png
Normal file
|
After Width: | Height: | Size: 5.2 MiB |
BIN
resources/models/alien-hominid/blaster_specular.png
Normal file
|
After Width: | Height: | Size: 2.8 MiB |
BIN
resources/models/alien-hominid/diffuse.png
Normal file
|
After Width: | Height: | Size: 8.8 MiB |
BIN
resources/models/alien-hominid/normal.png
Normal file
|
After Width: | Height: | Size: 10 MiB |
BIN
resources/models/alien-hominid/roughness.png
Normal file
|
After Width: | Height: | Size: 4.0 MiB |
BIN
resources/models/alien-hominid/specular.png
Normal file
|
After Width: | Height: | Size: 26 KiB |
BIN
resources/models/backpack/ao.jpg
Normal file
|
After Width: | Height: | Size: 1.8 MiB |
16
resources/models/backpack/backpack.mtl
Normal file
@@ -0,0 +1,16 @@
|
||||
# Blender MTL File: 'None'
|
||||
# Material Count: 1
|
||||
|
||||
newmtl Scene_-_Root
|
||||
Ns 225.000000
|
||||
Ka 1.000000 1.000000 1.000000
|
||||
Kd 0.800000 0.800000 0.800000
|
||||
Ks 0.500000 0.500000 0.500000
|
||||
Ke 0.0 0.0 0.0
|
||||
Ni 1.450000
|
||||
d 1.000000
|
||||
illum 2
|
||||
map_Kd diffuse.jpg
|
||||
map_Bump normal.png
|
||||
map_Ks specular.jpg
|
||||
|
||||
199481
resources/models/backpack/backpack.obj
Normal file
BIN
resources/models/backpack/diffuse.jpg
Normal file
|
After Width: | Height: | Size: 5.8 MiB |
BIN
resources/models/backpack/normal.png
Normal file
|
After Width: | Height: | Size: 14 MiB |
BIN
resources/models/backpack/roughness.jpg
Normal file
|
After Width: | Height: | Size: 4.2 MiB |
3
resources/models/backpack/source_attribution.txt
Normal file
@@ -0,0 +1,3 @@
|
||||
Model by Berk Gedik, from: https://sketchfab.com/3d-models/survival-guitar-backpack-low-poly-799f8c4511f84fab8c3f12887f7e6b36
|
||||
|
||||
Modified material assignment (Joey de Vries) for easier load in OpenGL model loading chapter, and renamed albedo to diffuse and metallic to specular to match non-PBR lighting setup.
|
||||
BIN
resources/models/backpack/specular.jpg
Normal file
|
After Width: | Height: | Size: 6.4 MiB |
7
resources/models/bird/bird.mtl
Executable file
@@ -0,0 +1,7 @@
|
||||
newmtl material_0
|
||||
map_bump normal.jpg
|
||||
norm normal.jpg
|
||||
map_Kd diffuse.jpg
|
||||
occlusion occlusion.jpg
|
||||
Pm 0
|
||||
Pr 0.793152
|
||||
80009
resources/models/bird/bird.obj
Executable file
BIN
resources/models/bird/diffuse.jpg
Executable file
|
After Width: | Height: | Size: 11 MiB |
BIN
resources/models/bird/normal.jpg
Executable file
|
After Width: | Height: | Size: 3.3 MiB |
BIN
resources/models/bird/occlusion.jpg
Executable file
|
After Width: | Height: | Size: 1.7 MiB |
12
resources/models/floor.obj
Normal file
@@ -0,0 +1,12 @@
|
||||
# Blender v2.82 (sub 7) OBJ File: ''
|
||||
# www.blender.org
|
||||
mtllib floor.mtl
|
||||
o floor
|
||||
v -1.000000 -0.000000 1.000000
|
||||
v 1.000000 -0.000000 1.000000
|
||||
v 1.000000 0.000000 -1.000000
|
||||
v -1.000000 0.000000 -1.000000
|
||||
vn 0.0000 1.0000 0.0000
|
||||
usemtl Default_OBJ
|
||||
s off
|
||||
f 1//1 2//1 3//1 4//1
|
||||
BIN
resources/models/scythe/diffuse.png
Executable file
|
After Width: | Height: | Size: 133 KiB |
8
resources/models/scythe/scythe.mtl
Executable file
@@ -0,0 +1,8 @@
|
||||
# WaveFront *.mtl file (generated by CINEMA 4D)
|
||||
|
||||
newmtl item/objectcomponents/weapon/staff_2h_artifactdeadwind_d_03.m2_Geoset_000
|
||||
Ka 0.25 0.25 0.25
|
||||
Kd 1 1 1
|
||||
map_Kd diffuse.png
|
||||
illum 7
|
||||
|
||||
5915
resources/models/scythe/scythe.obj
Executable file
BIN
resources/models/spartan/Spartan_Arms_Mat_AO.png
Normal file
|
After Width: | Height: | Size: 1.4 MiB |
BIN
resources/models/spartan/Spartan_Arms_Mat_BaseColor.png
Normal file
|
After Width: | Height: | Size: 4.0 MiB |
BIN
resources/models/spartan/Spartan_Arms_Mat_Metallic.png
Normal file
|
After Width: | Height: | Size: 807 KiB |
BIN
resources/models/spartan/Spartan_Arms_Mat_Normal.png
Normal file
|
After Width: | Height: | Size: 5.9 MiB |
BIN
resources/models/spartan/Spartan_Arms_Mat_Roughness.png
Normal file
|
After Width: | Height: | Size: 1.5 MiB |
BIN
resources/models/spartan/Spartan_Arms_Mat_Specular.png
Normal file
|
After Width: | Height: | Size: 614 KiB |
BIN
resources/models/spartan/Spartan_Chest_Mat_AO.png
Normal file
|
After Width: | Height: | Size: 1.7 MiB |
BIN
resources/models/spartan/Spartan_Chest_Mat_BaseColor.png
Normal file
|
After Width: | Height: | Size: 4.8 MiB |
BIN
resources/models/spartan/Spartan_Chest_Mat_Metallic.png
Normal file
|
After Width: | Height: | Size: 1.3 MiB |
BIN
resources/models/spartan/Spartan_Chest_Mat_Normal.png
Normal file
|
After Width: | Height: | Size: 4.5 MiB |
BIN
resources/models/spartan/Spartan_Chest_Mat_Roughness.png
Normal file
|
After Width: | Height: | Size: 2.2 MiB |
BIN
resources/models/spartan/Spartan_Chest_Mat_Specular.png
Normal file
|
After Width: | Height: | Size: 885 KiB |
BIN
resources/models/spartan/Spartan_Ears_Mat_AO.png
Normal file
|
After Width: | Height: | Size: 96 KiB |
BIN
resources/models/spartan/Spartan_Ears_Mat_BaseColor.png
Normal file
|
After Width: | Height: | Size: 1.1 MiB |
BIN
resources/models/spartan/Spartan_Ears_Mat_Metallic.png
Normal file
|
After Width: | Height: | Size: 426 KiB |
BIN
resources/models/spartan/Spartan_Ears_Mat_Normal.png
Normal file
|
After Width: | Height: | Size: 983 KiB |
BIN
resources/models/spartan/Spartan_Ears_Mat_Roughness.png
Normal file
|
After Width: | Height: | Size: 484 KiB |
BIN
resources/models/spartan/Spartan_Ears_Mat_Specular.png
Normal file
|
After Width: | Height: | Size: 279 KiB |
BIN
resources/models/spartan/Spartan_Helmet_Mat_AO.png
Normal file
|
After Width: | Height: | Size: 930 KiB |
BIN
resources/models/spartan/Spartan_Helmet_Mat_BaseColor.png
Normal file
|
After Width: | Height: | Size: 3.9 MiB |
BIN
resources/models/spartan/Spartan_Helmet_Mat_Metallic.png
Normal file
|
After Width: | Height: | Size: 1.3 MiB |
BIN
resources/models/spartan/Spartan_Helmet_Mat_Normal.png
Normal file
|
After Width: | Height: | Size: 4.4 MiB |
BIN
resources/models/spartan/Spartan_Helmet_Mat_Roughness.png
Normal file
|
After Width: | Height: | Size: 1.7 MiB |
BIN
resources/models/spartan/Spartan_Helmet_Mat_Specular.png
Normal file
|
After Width: | Height: | Size: 862 KiB |
BIN
resources/models/spartan/Spartan_Legs_Mat_AO.png
Normal file
|
After Width: | Height: | Size: 1.4 MiB |
BIN
resources/models/spartan/Spartan_Legs_Mat_BaseColor.png
Normal file
|
After Width: | Height: | Size: 4.0 MiB |
BIN
resources/models/spartan/Spartan_Legs_Mat_Metallic.png
Normal file
|
After Width: | Height: | Size: 1008 KiB |
BIN
resources/models/spartan/Spartan_Legs_Mat_Normal.png
Normal file
|
After Width: | Height: | Size: 4.8 MiB |
BIN
resources/models/spartan/Spartan_Legs_Mat_Roughness.png
Normal file
|
After Width: | Height: | Size: 1.8 MiB |
BIN
resources/models/spartan/Spartan_Legs_Mat_Specular.png
Normal file
|
After Width: | Height: | Size: 638 KiB |
BIN
resources/models/spartan/Spartan_Shoulder_Mat_AO.png
Normal file
|
After Width: | Height: | Size: 844 KiB |
BIN
resources/models/spartan/Spartan_Shoulder_Mat_BaseColor.png
Normal file
|
After Width: | Height: | Size: 3.4 MiB |
BIN
resources/models/spartan/Spartan_Shoulder_Mat_Metallic.png
Normal file
|
After Width: | Height: | Size: 1.1 MiB |
BIN
resources/models/spartan/Spartan_Shoulder_Mat_Normal.png
Normal file
|
After Width: | Height: | Size: 3.8 MiB |
BIN
resources/models/spartan/Spartan_Shoulder_Mat_Roughness.png
Normal file
|
After Width: | Height: | Size: 1.7 MiB |
BIN
resources/models/spartan/Spartan_Shoulder_Mat_Specular.png
Normal file
|
After Width: | Height: | Size: 761 KiB |
BIN
resources/models/spartan/Spartan_Sketchfab.fbx
Normal file
BIN
resources/models/spartan/Spartan_Undersuit_Mat_AO.png
Normal file
|
After Width: | Height: | Size: 3.1 MiB |
BIN
resources/models/spartan/Spartan_Undersuit_Mat_BaseColor.png
Normal file
|
After Width: | Height: | Size: 14 MiB |
BIN
resources/models/spartan/Spartan_Undersuit_Mat_Metallic.png
Normal file
|
After Width: | Height: | Size: 2.5 MiB |
BIN
resources/models/spartan/Spartan_Undersuit_Mat_Normal.png
Normal file
|
After Width: | Height: | Size: 24 MiB |
BIN
resources/models/spartan/Spartan_Undersuit_Mat_Roughness.png
Normal file
|
After Width: | Height: | Size: 4.9 MiB |
BIN
resources/models/spartan/Spartan_Undersuit_Mat_Specular.png
Normal file
|
After Width: | Height: | Size: 1.1 MiB |