Skip to content

Commit 4612cfb

Browse files
committed
Add boilerplate
Signed-off-by: Kaito Udagawa <umireon@kaito.tokyo>
1 parent 9183d84 commit 4612cfb

71 files changed

Lines changed: 4549 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.clang-format

Lines changed: 214 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,214 @@
1+
# SPDX-FileCopyrightText: 2018-2026 OBS Project and its contributors
2+
# SPDX-FileCopyrightText: 2026 Kaito Udagawa <umireon@kaito.tokyo>
3+
#
4+
# SPDX-License-Identifier: GPL-3.0-or-later
5+
6+
# please use clang-format version 16 or later
7+
8+
Standard: c++20
9+
AccessModifierOffset: -8
10+
AlignAfterOpenBracket: Align
11+
AlignConsecutiveAssignments: false
12+
AlignConsecutiveDeclarations: false
13+
AlignEscapedNewlines: Left
14+
AlignOperands: true
15+
AlignTrailingComments: true
16+
AllowAllArgumentsOnNextLine: false
17+
AllowAllConstructorInitializersOnNextLine: false
18+
AllowAllParametersOfDeclarationOnNextLine: false
19+
AllowShortBlocksOnASingleLine: false
20+
AllowShortCaseLabelsOnASingleLine: false
21+
AllowShortFunctionsOnASingleLine: Inline
22+
AllowShortIfStatementsOnASingleLine: false
23+
AllowShortLambdasOnASingleLine: Inline
24+
AllowShortLoopsOnASingleLine: false
25+
AlwaysBreakAfterDefinitionReturnType: None
26+
AlwaysBreakAfterReturnType: None
27+
AlwaysBreakBeforeMultilineStrings: false
28+
AlwaysBreakTemplateDeclarations: false
29+
BinPackArguments: true
30+
BinPackParameters: true
31+
BraceWrapping:
32+
AfterClass: false
33+
AfterControlStatement: false
34+
AfterEnum: false
35+
AfterFunction: true
36+
AfterNamespace: false
37+
AfterObjCDeclaration: false
38+
AfterStruct: false
39+
AfterUnion: false
40+
AfterExternBlock: false
41+
BeforeCatch: false
42+
BeforeElse: false
43+
IndentBraces: false
44+
SplitEmptyFunction: true
45+
SplitEmptyRecord: true
46+
SplitEmptyNamespace: true
47+
BreakBeforeBinaryOperators: None
48+
BreakBeforeBraces: Custom
49+
BreakBeforeTernaryOperators: true
50+
BreakConstructorInitializers: BeforeColon
51+
BreakStringLiterals: false # apparently unpredictable
52+
ColumnLimit: 120
53+
CompactNamespaces: false
54+
ConstructorInitializerAllOnOneLineOrOnePerLine: true
55+
ConstructorInitializerIndentWidth: 8
56+
ContinuationIndentWidth: 8
57+
Cpp11BracedListStyle: true
58+
DerivePointerAlignment: false
59+
DisableFormat: false
60+
FixNamespaceComments: true
61+
ForEachMacros:
62+
- 'json_object_foreach'
63+
- 'json_object_foreach_safe'
64+
- 'json_array_foreach'
65+
- 'HASH_ITER'
66+
IncludeBlocks: Preserve
67+
IndentCaseLabels: false
68+
IndentPPDirectives: None
69+
IndentWidth: 8
70+
IndentWrappedFunctionNames: false
71+
KeepEmptyLinesAtTheStartOfBlocks: true
72+
MaxEmptyLinesToKeep: 1
73+
NamespaceIndentation: None
74+
ObjCBinPackProtocolList: Auto
75+
ObjCBlockIndentWidth: 8
76+
ObjCSpaceAfterProperty: true
77+
ObjCSpaceBeforeProtocolList: true
78+
79+
PenaltyBreakAssignment: 10
80+
PenaltyBreakBeforeFirstCallParameter: 30
81+
PenaltyBreakComment: 10
82+
PenaltyBreakFirstLessLess: 0
83+
PenaltyBreakString: 10
84+
PenaltyExcessCharacter: 100
85+
PenaltyReturnTypeOnItsOwnLine: 60
86+
87+
PointerAlignment: Right
88+
ReflowComments: false
89+
SkipMacroDefinitionBody: true
90+
SortIncludes: false
91+
SortUsingDeclarations: false
92+
SpaceAfterCStyleCast: false
93+
SpaceAfterLogicalNot: false
94+
SpaceAfterTemplateKeyword: false
95+
SpaceBeforeAssignmentOperators: true
96+
SpaceBeforeCtorInitializerColon: true
97+
SpaceBeforeInheritanceColon: true
98+
SpaceBeforeParens: ControlStatements
99+
SpaceBeforeRangeBasedForLoopColon: true
100+
SpaceInEmptyParentheses: false
101+
SpacesBeforeTrailingComments: 1
102+
SpacesInAngles: false
103+
SpacesInCStyleCastParentheses: false
104+
SpacesInContainerLiterals: false
105+
SpacesInParentheses: false
106+
SpacesInSquareBrackets: false
107+
StatementMacros:
108+
- 'Q_OBJECT'
109+
TabWidth: 8
110+
TypenameMacros:
111+
- 'DARRAY'
112+
UseTab: ForContinuationAndIndentation
113+
---
114+
Language: ObjC
115+
AccessModifierOffset: 2
116+
AlignArrayOfStructures: Right
117+
AlignConsecutiveAssignments: None
118+
AlignConsecutiveBitFields: None
119+
AlignConsecutiveDeclarations: None
120+
AlignConsecutiveMacros:
121+
Enabled: true
122+
AcrossEmptyLines: false
123+
AcrossComments: true
124+
AllowShortBlocksOnASingleLine: Never
125+
AllowShortEnumsOnASingleLine: false
126+
AllowShortFunctionsOnASingleLine: Empty
127+
AllowShortIfStatementsOnASingleLine: Never
128+
AllowShortLambdasOnASingleLine: None
129+
AttributeMacros: ['__unused', '__autoreleasing', '_Nonnull', '__bridge']
130+
BitFieldColonSpacing: Both
131+
#BreakBeforeBraces: Webkit
132+
BreakBeforeBraces: Custom
133+
BraceWrapping:
134+
AfterCaseLabel: false
135+
AfterClass: true
136+
AfterControlStatement: Never
137+
AfterEnum: false
138+
AfterFunction: true
139+
AfterNamespace: false
140+
AfterObjCDeclaration: false
141+
AfterStruct: false
142+
AfterUnion: false
143+
AfterExternBlock: false
144+
BeforeCatch: false
145+
BeforeElse: false
146+
BeforeLambdaBody: false
147+
BeforeWhile: false
148+
IndentBraces: false
149+
SplitEmptyFunction: false
150+
SplitEmptyRecord: false
151+
SplitEmptyNamespace: true
152+
BreakAfterAttributes: Never
153+
BreakArrays: false
154+
BreakBeforeConceptDeclarations: Allowed
155+
BreakBeforeInlineASMColon: OnlyMultiline
156+
BreakConstructorInitializers: AfterColon
157+
BreakInheritanceList: AfterComma
158+
ColumnLimit: 120
159+
ConstructorInitializerIndentWidth: 4
160+
ContinuationIndentWidth: 4
161+
EmptyLineAfterAccessModifier: Never
162+
EmptyLineBeforeAccessModifier: LogicalBlock
163+
ExperimentalAutoDetectBinPacking: false
164+
FixNamespaceComments: true
165+
IndentAccessModifiers: false
166+
IndentCaseBlocks: false
167+
IndentCaseLabels: true
168+
IndentExternBlock: Indent
169+
IndentGotoLabels: false
170+
IndentRequiresClause: true
171+
IndentWidth: 4
172+
IndentWrappedFunctionNames: true
173+
InsertBraces: false
174+
InsertNewlineAtEOF: true
175+
KeepEmptyLinesAtTheStartOfBlocks: false
176+
LambdaBodyIndentation: Signature
177+
NamespaceIndentation: All
178+
ObjCBinPackProtocolList: Auto
179+
ObjCBlockIndentWidth: 4
180+
ObjCBreakBeforeNestedBlockParam: false
181+
ObjCSpaceAfterProperty: true
182+
ObjCSpaceBeforeProtocolList: true
183+
PPIndentWidth: -1
184+
PackConstructorInitializers: NextLine
185+
QualifierAlignment: Leave
186+
ReferenceAlignment: Right
187+
RemoveSemicolon: false
188+
RequiresClausePosition: WithPreceding
189+
RequiresExpressionIndentation: OuterScope
190+
SeparateDefinitionBlocks: Leave
191+
ShortNamespaceLines: 1
192+
SortIncludes: false
193+
#SortUsingDeclarations: LexicographicNumeric
194+
SortUsingDeclarations: true
195+
SpaceAfterCStyleCast: true
196+
SpaceAfterLogicalNot: false
197+
SpaceAroundPointerQualifiers: Default
198+
SpaceBeforeCaseColon: false
199+
SpaceBeforeCpp11BracedList: true
200+
SpaceBeforeCtorInitializerColon: true
201+
SpaceBeforeInheritanceColon: true
202+
SpaceBeforeParens: ControlStatements
203+
SpaceBeforeRangeBasedForLoopColon: true
204+
SpaceBeforeSquareBrackets: false
205+
SpaceInEmptyBlock: false
206+
SpaceInEmptyParentheses: false
207+
SpacesBeforeTrailingComments: 2
208+
SpacesInConditionalStatement: false
209+
SpacesInLineCommentPrefix:
210+
Minimum: 1
211+
Maximum: -1
212+
Standard: c++20
213+
TabWidth: 4
214+
UseTab: Never

.devcontainer/debian/Dockerfile

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# syntax=docker/dockerfile:1
2+
3+
# SPDX-FileCopyrightText: 2026 Kaito Udagawa <umireon@kaito.tokyo>
4+
#
5+
# SPDX-License-Identifier: Apache-2.0
6+
7+
FROM debian:forky
8+
9+
RUN <<'EOT' bash -euo pipefail -O nullglob
10+
dependencies=(
11+
ca-certificates
12+
curl
13+
git
14+
libobs-dev
15+
sudo
16+
tar
17+
unzip
18+
zip
19+
cmake
20+
)
21+
apt-get update
22+
apt-get upgrade -y
23+
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends "${dependencies[@]}"
24+
rm -rf /var/lib/apt/lists/*
25+
EOT
26+
27+
ENV VCPKG_ROOT=/usr/local/vcpkg VCPKG_DOWNLOADS=/usr/local/vcpkg-downloads
28+
29+
RUN <<'EOT' bash -euo pipefail -O nullglob
30+
install -d "${VCPKG_DOWNLOADS}"
31+
git clone --filter=blob:none --no-checkout https://github.com/microsoft/vcpkg.git "${VCPKG_ROOT}"
32+
cd "${VCPKG_ROOT}"
33+
git checkout 2025.08.27
34+
"${VCPKG_ROOT}/bootstrap-vcpkg.sh" -disableMetrics
35+
groupadd -g 999 vcpkg
36+
chgrp -R vcpkg "${VCPKG_ROOT}" "${VCPKG_DOWNLOADS}"
37+
chmod -R ug=rwX,o=rX "${VCPKG_ROOT}" "${VCPKG_DOWNLOADS}"
38+
EOT
39+
40+
RUN <<'EOT' bash -euo pipefail -O nullglob
41+
groupadd -g 1000 vscode
42+
useradd -u 1000 -g vscode -m vscode -G vcpkg -s /bin/bash
43+
EOT
44+
45+
COPY --chmod=400 <<'EOF' /etc/sudoers.d/vscode
46+
vscode ALL=(ALL) NOPASSWD: ALL
47+
EOF
48+
49+
CMD ["/bin/bash"]
50+
51+
USER vscode
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// SPDX-FileCopyrightText: 2026 Kaito Udagawa <umireon@kaito.tokyo>
2+
//
3+
// SPDX-License-Identifier: Apache-2.0
4+
{
5+
"name": "Debian",
6+
"build": {
7+
"dockerfile": "Dockerfile"
8+
}
9+
}

.editorconfig

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# SPDX-FileCopyrightText: 2026 Kaito Udagawa <umireon@kaito.tokyo>
2+
#
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
root = true
6+
7+
[*]
8+
charset = utf-8
9+
end_of_line = lf
10+
insert_final_newline = true
11+
trim_trailing_whitespace = true
12+
indent_style = space
13+
indent_size = 2
14+
15+
[*.{c,h,cpp,hpp}]
16+
indent_style = tab
17+
indent_size = 8
18+
tab_width = 8
19+
20+
[.gitconfig*]
21+
indent_style = space
22+
indent_size = 8
23+
24+
[*.md]
25+
trim_trailing_whitespace = false

.gersemirc

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# yaml-language-server: $schema=https://raw.githubusercontent.com/BlankSpruce/gersemi/master/gersemi/configuration.schema.json
2+
3+
# SPDX-FileCopyrightText: 2018-2026 OBS Project and its contributors
4+
# SPDX-FileCopyrightText: 2026 Kaito Udagawa <umireon@kaito.tokyo>
5+
#
6+
# SPDX-License-Identifier: GPL-3.0-or-later
7+
8+
definitions: []
9+
line_length: 120
10+
indent: 2
11+
list_expansion: favour-inlining
12+
unsafe: false
13+
warn_about_unknown_commands: false
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# SPDX-FileCopyrightText: 2026 Kaito Udagawa <umireon@kaito.tokyo>
2+
#
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
name: Extract buildspec
6+
description: Extract and output plugin buildspec.
7+
8+
# file: .github/actions/extract-buildspec/action.yml
9+
# author: Kaito Udagawa <umireon@kaito.tokyo>
10+
# version: 1.1.0
11+
# date: 2026-03-30
12+
13+
inputs:
14+
path:
15+
description: Path to buildspec.json.
16+
required: false
17+
default: buildspec.json
18+
19+
outputs:
20+
BUNDLE_ID:
21+
description: .platformConfig.macos.bundleId from buildspec.json
22+
value: ${{ fromJSON(steps.extract.outputs.JSON).platformConfig.macos.bundleId }}
23+
DISPLAY_NAME:
24+
description: .displayName from buildspec.json
25+
value: ${{ fromJSON(steps.extract.outputs.JSON).displayName }}
26+
NAME:
27+
description: .name from buildspec.json
28+
value: ${{ fromJSON(steps.extract.outputs.JSON).name }}
29+
VERSION:
30+
description: .version from buildspec.json
31+
value: ${{ fromJSON(steps.extract.outputs.JSON).version }}
32+
33+
runs:
34+
using: composite
35+
steps:
36+
- name: Extract plugin buildspec
37+
id: extract
38+
shell: bash --noprofile --norc -euo pipefail -O nullglob {0}
39+
env:
40+
INPUT_PATH: '${{ inputs.path }}'
41+
run: |
42+
printf 'JSON=%s\n' "$(jq -c . "$INPUT_PATH")" >> "$GITHUB_OUTPUT"

0 commit comments

Comments
 (0)