-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDefaultScriptInfo.yaml
More file actions
251 lines (214 loc) · 9.65 KB
/
Copy pathDefaultScriptInfo.yaml
File metadata and controls
251 lines (214 loc) · 9.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
# This is the template for specifying build settings.
# Many of the settings are passed directly to the shell.
# Be cautious when using user-provided input in your build commands to avoid potential security risks.
# Output from commands such as Setup or Cleanup won't be shown unless log level is set to info.
# If the default is not mentioned for a setting, it will be empty.
# Each of the platform dependent settings can be listed under
# - DefaultPlatform
# - Windows
# - Linux
# - MacOS
# - Unix
# You can find all the profiles in your config folder.
# This can be found by running `runcpp2 --show-config-path`.
# Specifying "DefaultProfile" in the profile name will allow any profiles
# and use the user's preferred one.
# (Optional) Whether to pass the script path as the second parameter when running. Default is false
PassScriptPath: false
# (Optional) Language of the script. Default is determined by file extension
Language: "c++"
# (Optional) The type of output to build. Default is Executable
# Supported types:
# - Executable: Build as executable that can be run
# - Static: Build as static library (.lib/.a)
# - Shared: Build as shared library (.dll/.so)
# - Objects: Only compile to object files without linking
BuildType: Executable
# TODO: Rename this
# (Optional) Allowed profiles for the script for each platform.
# Any profiles will be used if none is specified for the platform.
RequiredProfiles:
Windows: ["g++"]
Linux: ["g++"]
MacOS: ["g++"]
# (Optional) Override the default compile flags for each platform.
OverrideCompileFlags:
# Target Platform
DefaultPlatform:
# Profile with the respective flags to override
"g++":
# (Optional) Flags to be removed from the default compile flags, separated by space
Remove: ""
# (Optional) Additional flags to be appended to the default compile flags, separated by space
Append: ""
# (Optional) Override the default link flags for each platform.
OverrideLinkFlags:
# Target Platform
DefaultPlatform:
# Profile with the respective flags to override
"g++":
# (Optional) Flags to be removed from the default link flags, separated by space
Remove: ""
# (Optional) Additional flags to be appended to the default link flags,
# separated by space
Append: ""
# (Optional) Other source files (relative to script file path) to be compiled.
SourceFiles:
# Target Platform
DefaultPlatform:
# Target Profile
DefaultProfile:
- "./AnotherSourceFile.cpp"
# (Optional) Include paths (relative to script file path) for each platform and profile
IncludePaths:
# Target Platform
DefaultPlatform:
# Target Profile
DefaultProfile:
- "./include"
- "./src/include"
# (Optional) Define cross-compiler defines for each platform and profile.
# Defines can be specified as just a name or as a name-value pair.
Defines:
# Target Platform
DefaultPlatform:
# Profile name
DefaultProfile:
- "EXAMPLE_DEFINE" # Define without a value
- "VERSION_MAJOR=1" # Define with a value
# (Optional) Setup commands are run once before the script is first built.
# These commands are run at the script's location when no build directory exists.
Setup:
# Target Platform
DefaultPlatform:
# Profile name
DefaultProfile:
# List of setup commands
- "echo Setting up script..."
# (Optional) PreBuild commands are run before each build.
# These commands are run in the build directory before compilation starts.
PreBuild:
# Target Platform
DefaultPlatform:
# Profile name
DefaultProfile:
- "echo Starting build..."
# (Optional) PostBuild commands are run after each successful build.
# These commands are run in the output directory where binaries are located.
PostBuild:
# Target Platform
DefaultPlatform:
# Profile name
DefaultProfile:
- "echo Build completed..."
# (Optional) Cleanup commands are run when using the --cleanup option.
# These commands are run at the script's location before the build directory is removed.
Cleanup:
# Target Platform
DefaultPlatform:
# Profile name
DefaultProfile:
- "echo Cleaning up script..."
# (Optional) The list of dependencies needed by the script
Dependencies:
# Dependency name
- Name: MyLibrary
# Supported platforms of the dependency
Platforms: [Windows, Linux, MacOS]
# Where to get and copy the dependency (Git, Local)
# Either Git or Local can exist, not both
Source:
# (Optional) Import dependency configuration from a YAML file if this field exists
# All other fields (Name, Platforms, etc...) are not needed if this field exists
# For Git source: Path is relative to the git repository root
# For Local source: Path is relative to the path specified under `Local`
# If neither source exists, local source with root script directory is assumed.
ImportPath: "config/dependency.yaml"
# Dependency or import YAML file exists in a git server, and needs to be cloned to build directory
Git:
# Git repository URL
URL: "https://github.com/MyUser/MyLibrary.git"
# (Optional) Branch name or tag name
# Defaults to default branch on specified git repo if this is not specified
# Branch: ""
# (Optional) Checkout full git history or just the target commit. Defaults to false
# FullHistory: false
# (Optional) Initialization type for all the submodules recursively
# - "None": Don't initialize any submodules
# - "Shallow": Only checkout the target commit of all the submodules (default)
# - "Full": Checkout the full git history of all the submodules
# SubmoduleInitType: "Shallow"
# Dependency or import YAML file exists in local filesystem directory,
# and needs to be copied to build directory
Local:
# Path to the library directory
Path: "./libs/LocalLibrary"
# (Optional) How to handle copying files to build directory
# Values:
# - "Auto" (default): Try symlink first, then hardlink, then copy as fallback
# - "Symlink": Create symbolic links only, fail if not possible
# - "Hardlink": Create hard links only, fail if not possible
# - "Copy": Copy files to build directory
CopyMode: "Auto"
# Library Type (Static, Object, Shared, Header)
LibraryType: Static
# (Optional) Paths to be added to the include paths, relative to the dependency folder
IncludePaths:
- "src/include"
# (Optional if LibraryType is Header) Link properties of the dependency
LinkProperties:
# Properties for searching the library binary for each platform
DefaultPlatform:
# Profile-specific properties
"g++":
# The library names to be searched for when linking against the script.
# Binaries with linkable extension that contains one of the names will be linked
SearchLibraryNames: ["MyLibrary"]
# (Optional) The library names to be excluded from being searched.
# Works the same as SearchLibraryNames but will NOT be linked instead
ExcludeLibraryNames: []
# The path (relative to the dependency folder) to be searched for the dependency binaries
SearchDirectories: ["./build"]
# (Optional) Additional link flags for this dependency
AdditionalLinkOptions: []
# (Optional) Setup commands are run once when the dependency is populated
Setup:
# Target Platform
DefaultPlatform:
# Setup shell commands for the specified profile.
# Default commands are run in the dependency folder
# You can also use "DefaultProfile" if all the compilers run the same setup commands
"g++":
- "mkdir build"
# (Optional) Build commands are run every time before the script is being built
Build:
# Target Platform
DefaultPlatform:
# Target Profile
"g++":
- "cd build && cmake .."
- "cd build && cmake --build ."
# (Optional) Cleanup commands are run when the reset option is present. Normally nothing needs
# to be done since the dependency folder will be removed automatically.
Cleanup:
# Target Platform
Linux:
# Target Profile
"g++":
- "sudo apt purge MyLibrary"
# (Optional) Files to be copied to next to output binary for each platform and profile
FilesToCopy:
# Target Platform
DefaultPlatform:
# Profile name
DefaultProfile:
# List of files to copy (relative to the dependency folder)
- "assets/textures/sprite.png"
Windows:
"msvc":
- "assets/textures/sprite.png"
- "assets/fonts/windows_specific_font.ttf"
Linux:
"g++":
- "assets/textures/sprite.png"
- "assets/shaders/linux_optimized_shader.glsl"