Skip to content

Commit

Permalink
Merge branch 'master' into macostestci
Browse files Browse the repository at this point in the history
  • Loading branch information
chinese-soup authored Aug 19, 2023
2 parents 606af0a + 001bffd commit e283ebe
Show file tree
Hide file tree
Showing 79 changed files with 3,062 additions and 2,591 deletions.
147 changes: 147 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
---
Language: Cpp
BasedOnStyle: Google
AccessModifierOffset: -4
AlignAfterOpenBracket: BlockIndent
AlignArrayOfStructures: Right
AlignConsecutiveMacros: false
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignEscapedNewlines: Left
AlignOperands: true
AlignTrailingComments: true
AllowAllArgumentsOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortEnumsOnASingleLine: false
AllowShortFunctionsOnASingleLine: None
AllowShortLambdasOnASingleLine: All
AllowShortIfStatementsOnASingleLine: Never
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: true
AlwaysBreakTemplateDeclarations: MultiLine
BinPackArguments: true
BinPackParameters: true
Cpp11BracedListStyle: true
BreakBeforeBraces: Custom
BraceWrapping:
AfterCaseLabel: false
AfterClass: false
AfterControlStatement: false
AfterEnum: false
AfterFunction: false
AfterNamespace: false
AfterObjCDeclaration: false
AfterStruct: false
AfterUnion: false
AfterExternBlock: false
BeforeCatch: false
BeforeElse: false
IndentBraces: false
SplitEmptyFunction: true
SplitEmptyRecord: true
SplitEmptyNamespace: true
BreakBeforeBinaryOperators: None
BreakBeforeInheritanceComma: false
BreakInheritanceList: BeforeColon
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: true
BreakConstructorInitializers: BeforeColon
BreakAfterJavaFieldAnnotations: false
BreakStringLiterals: false
ColumnLimit: 140
CommentPragmas: '^ IWYU pragma:'
CompactNamespaces: false
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DerivePointerAlignment: false
DisableFormat: false
EmptyLineAfterAccessModifier: Never
EmptyLineBeforeAccessModifier: LogicalBlock
ExperimentalAutoDetectBinPacking: false
FixNamespaceComments: true
ForEachMacros:
- foreach
- Q_FOREACH
- BOOST_FOREACH
IncludeBlocks: Regroup
IncludeCategories:
- Regex: '^<ext/.*\.h>'
Priority: 2
- Regex: '^<.*\.h>'
Priority: 1
- Regex: '^<.*'
Priority: 2
- Regex: '.*'
Priority: 3
IncludeIsMainRegex: '([-_](test|unittest))?$'
IndentCaseLabels: true
IndentPPDirectives: BeforeHash
IndentWidth: 4
IndentWrappedFunctionNames: true
InsertBraces: true
InsertNewlineAtEOF: true
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: true
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 3
NamespaceIndentation: All
ObjCBinPackProtocolList: Never
ObjCBlockIndentWidth: 2
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: true
PackConstructorInitializers: Never
PenaltyBreakAssignment: 2
PenaltyBreakBeforeFirstCallParameter: 1
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
PenaltyBreakTemplateDeclaration: 10
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 200
PointerAlignment: Left
PPIndentWidth: 2
QualifierAlignment: Left
RawStringFormats:
- Language: Cpp
Delimiters:
- cc
- cpp
CanonicalDelimiter: ''
BasedOnStyle: google
ReflowComments: true
RemoveSemicolon: true
SortIncludes: false
SortUsingDeclarations: true
SpaceAfterCStyleCast: true
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeCpp11BracedList: true
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements
SpaceBeforeRangeBasedForLoopColon: true
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 2
SpacesInAngles: false
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: Auto
StatementMacros:
- Q_UNUSED
- QT_REQUIRE_VERSION
- Q_PROPERTY
- Q_OBJECT
TabWidth: 4
UseTab: Never
...

10 changes: 4 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
create:

env:
QT_VERSION: '6.5.1'
QT_VERSION: '6.5.2'
QT_MODULES: 'qtmultimedia qtwebsockets qtimageformats'
EM_VERSION: '3.1.25'

Expand Down Expand Up @@ -321,27 +321,25 @@ jobs:
IMGUR_API_KEY=${{ secrets.IMGUR_API_KEY }} ./dist/macos/build.sh
- name: Generate .dmg
run: |
"$Qt6_DIR"/bin/macdeployqt build_macos/Lith.app -qmldir=. -dmg -appstore-compliant -codesign=Z52EFCPL6D
"$Qt6_DIR"/bin/macdeployqt build_macos/src/Lith.app -qmldir=. -dmg -appstore-compliant -codesign=Z52EFCPL6D
- name: Create a fancier .dmg
run: |
mkdir tmpmountpoint/
mv build_macos/Lith.dmg build_macos/Lith_qt.dmg
hdiutil attach build_macos/Lith_qt.dmg -mountpoint tmpmountpoint/
git clone https://github.com/create-dmg/create-dmg.git
# ./create-dmg/create-dmg --app-drop-link 484 200 --icon-size 128 --window-size 980 512 --text-size 16 --icon "Lith.app" 100 200 --codesign=Z52EFCPL6D --volname Lith --background ./dist/macos/dmgbg.png build_macos/Lith.dmg build_macos/Lith.app
# ./create-dmg/create-dmg --app-drop-link 484 200 --icon-size 128 --window-size 980 512 --text-size 16 --icon "Lith.app" 100 200 --codesign Z52EFCPL6D --volname Lith --background ./dist/macos/dmgbg.png build_macos/Lith.dmg tmpmountpoint/Lith.app
./create-dmg/create-dmg --app-drop-link 484 200 --icon-size 128 --window-size 980 512 --text-size 16 --icon "Lith.app" 100 200 --volname Lith --background ./dist/macos/dmgbg.png build_macos/Lith.dmg tmpmountpoint/Lith.app
- name: Upload artifacts to GitHub
if: github.event_name != 'create'
uses: actions/upload-artifact@v2
with:
name: Lith.dmg
path: build_macos/Lith.dmg
path: build_macos/src/Lith.dmg
- name: Upload to GitHub
if: github.event_name == 'create'
run: |
TAG_NAME=$(./dist/get-tag-name.sh)
if [[ "$TAG_NAME" != "" ]]; then
./dist/upload-github-release-asset.sh github_api_token=${{ secrets.GITHUB_TOKEN }} tag="$TAG_NAME" filename="build_macos/Lith.dmg" renameto="Lith-macOS-${TAG_NAME}.dmg"
./dist/upload-github-release-asset.sh github_api_token=${{ secrets.GITHUB_TOKEN }} tag="$TAG_NAME" filename="build_macos/src/Lith.dmg" renameto="Lith-macOS-${TAG_NAME}.dmg"
fi
Loading

0 comments on commit e283ebe

Please sign in to comment.