Skip to content

Commit 5e35371

Browse files
Merge pull request #24 from Neko-Box-Coder/NoCopying
Moving copying to single place
2 parents e9367af + 6f0210f commit 5e35371

File tree

6 files changed

+255
-307
lines changed

6 files changed

+255
-307
lines changed

DefaultYAMLs/DefaultScriptInfo.yaml

Lines changed: 140 additions & 140 deletions
Original file line numberDiff line numberDiff line change
@@ -5,149 +5,149 @@
55
# You can uncomment different sections to set what you want.
66

77
# # (Optional) Language of the script
8-
# Language: "c++"
8+
Language: "c++"
99

10-
# # (Optional) Preferred profiles for the script for each platform.
11-
# # Profiles are listed in user config file,
12-
# # which can be retreived by running `runcpp2 --show-config-path`
13-
# # Each of the platform dependent settings can be listed under
14-
# # - Default
15-
# # - Windows
16-
# # - Linux
17-
# # - MacOS
18-
# # - Unix
19-
# RequiredProfiles:
20-
# Windows: ["g++"]
21-
# Linux: ["g++"]
22-
# MacOS: ["g++"]
10+
# (Optional) Preferred profiles for the script for each platform.
11+
# Profiles are listed in user config file,
12+
# which can be retreived by running `runcpp2 --show-config-path`
13+
# Each of the platform dependent settings can be listed under
14+
# - Default
15+
# - Windows
16+
# - Linux
17+
# - MacOS
18+
# - Unix
19+
RequiredProfiles:
20+
Windows: ["g++"]
21+
Linux: ["g++"]
22+
MacOS: ["g++"]
2323

24-
# # (Optional) Override the default compile flags for each platform.
25-
# OverrideCompileFlags:
26-
# # Target Platform
27-
# Default:
28-
# # Profile with the respective flags to override. ("Default" for any profile)
29-
# "g++":
30-
# # (Optional) Flags to be removed from the default compile flags, separated by space
31-
# Remove: ""
32-
#
33-
# # (Optional) Additional flags to be appended to the default compile flags, separated by space
34-
# Append: ""
24+
# (Optional) Override the default compile flags for each platform.
25+
OverrideCompileFlags:
26+
# Target Platform
27+
Default:
28+
# Profile with the respective flags to override. ("Default" for any profile)
29+
"g++":
30+
# (Optional) Flags to be removed from the default compile flags, separated by space
31+
Remove: ""
32+
33+
# (Optional) Additional flags to be appended to the default compile flags, separated by space
34+
Append: ""
3535

36-
# # (Optional) Override the default link flags for each platform.
37-
# OverrideLinkFlags:
38-
# # Target Platform
39-
# Default:
40-
# # Profile with the respective flags to override ("Default" for any profile)
41-
# "g++":
42-
# # (Optional) Flags to be removed from the default link flags, separated by space
43-
# Remove: ""
44-
#
45-
# # (Optional) Additional flags to be appended to the default link flags,
46-
# # separated by space
47-
# Append: ""
36+
# (Optional) Override the default link flags for each platform.
37+
OverrideLinkFlags:
38+
# Target Platform
39+
Default:
40+
# Profile with the respective flags to override ("Default" for any profile)
41+
"g++":
42+
# (Optional) Flags to be removed from the default link flags, separated by space
43+
Remove: ""
44+
45+
# (Optional) Additional flags to be appended to the default link flags,
46+
# separated by space
47+
Append: ""
4848

49-
# # (Optional) Other source files (relative to script file path) to be compiled.
50-
# OtherFilesToBeCompiled:
51-
# # Target Platform
52-
# Default:
53-
# # Target Profile
54-
# Default:
55-
# - "./AnotherSourceFile.cpp"
49+
# (Optional) Other source files (relative to script file path) to be compiled.
50+
OtherFilesToBeCompiled:
51+
# Target Platform
52+
Default:
53+
# Target Profile
54+
Default:
55+
- "./AnotherSourceFile.cpp"
5656

57-
# # (Optional) Define cross-compiler defines for each platform and profile.
58-
# # Defines can be specified as just a name or as a name-value pair.
59-
# Defines:
60-
# # Target Platform (Default, Windows, Linux, MacOS, or Unix)
61-
# Default:
62-
# # Profile name (e.g., "g++", "clang++", "msvc", or "Default" for any profile)
63-
# "Default":
64-
# - "EXAMPLE_DEFINE" # Define without a value
65-
# - "VERSION_MAJOR=1" # Define with a value
57+
# (Optional) Define cross-compiler defines for each platform and profile.
58+
# Defines can be specified as just a name or as a name-value pair.
59+
Defines:
60+
# Target Platform (Default, Windows, Linux, MacOS, or Unix)
61+
Default:
62+
# Profile name (e.g., "g++", "clang++", "msvc", or "Default" for any profile)
63+
"Default":
64+
- "EXAMPLE_DEFINE" # Define without a value
65+
- "VERSION_MAJOR=1" # Define with a value
6666

67-
# # (Optional) The list of dependencies needed by the script
68-
# Dependencies:
69-
# # Dependency name
70-
# - Name: MyLibrary
71-
#
72-
# # Supported platforms of the dependency
73-
# Platforms: [Windows, Linux, MacOS]
74-
#
75-
# # The source of getting the dependency (Git, Local)
76-
# Source:
77-
# # Git: Dependency exists in a git server, and needs to be cloned
78-
# # Local: Dependency exists in local filesystem
79-
# Type: Git
80-
#
81-
# # Git URL for Git type, path to a directory for Local type
82-
# Value: "https://github.com/MyUser/MyLibrary.git"
83-
#
84-
# # Library Type (Static, Object, Shared, Header)
85-
# LibraryType: Static
86-
#
87-
# # (Optional) Paths to be added to the include paths, relative to the dependency folder
88-
# IncludePaths:
89-
# - "src/include"
90-
#
91-
# # (Optional if LibraryType is Header) Link properties of the dependency
92-
# LinkProperties:
93-
# # Properties for searching the library binary for the profile
94-
# # You can also use "Default" if all compilers use the same values
95-
# "g++":
96-
# # The library names to be searched for when linking against the script.
97-
# # Binaries with linkable extension that contains one of the names will be linked
98-
# SearchLibraryNames: ["MyLibrary"]
99-
#
100-
# # (Optional) The library names to be excluded from being searched.
101-
# # Works the same as SearchLibraryNames but will NOT be linked instead
102-
# ExcludeLibraryNames: []
103-
#
104-
# # The path (relative to the dependency folder) to be searched for the dependency binaries
105-
# SearchDirectories: ["./build"]
106-
#
107-
# # (Optional) Additional link flags for this dependency for each platform
108-
# AdditionalLinkOptions:
109-
# Default: []
110-
#
111-
# # (Optional) Setup commands are run once when the dependency is populated
112-
# Setup:
113-
# # Target Platform
114-
# Default:
115-
# # Setup shell commands for the specified profile.
116-
# # Default commands are run in the dependency folder
117-
# # You can also use "Default" if all the compilers run the same setup commands
118-
# "g++":
119-
# - "mkdir build"
120-
#
121-
#
122-
# # (Optional) Build commands are run every time before the script is being built
123-
# Build:
124-
# # Target Platform
125-
# Default:
126-
# # Target Profile ("Default" for any profile)
127-
# "g++":
128-
# - "cd build && cmake .."
129-
# - "cd build && cmake --build ."
130-
#
131-
# # (Optional) Cleanup commands are run when the reset option is present. Normally nothing needs
132-
# # to be done since the dependency folder will be removed automatically.
133-
# Cleanup:
134-
# Linux:
135-
# "g++":
136-
# - "sudo apt purge MyLibrary"
137-
#
138-
# # (Optional) Files to be copied for each platform and profile
139-
# FilesToCopy:
140-
# # Target Platform (Default, Windows, Linux, MacOS, or Unix)
141-
# Default:
142-
# # Profile name (e.g., "g++", "clang++", "msvc", or "Default" for any profile)
143-
# "Default":
144-
# # List of files to copy (relative to the dependency folder)
145-
# - "assets/textures/sprite.png"
146-
# Windows:
147-
# "msvc":
148-
# - "assets/textures/sprite.png"
149-
# - "assets/fonts/windows_specific_font.ttf"
150-
# Linux:
151-
# "g++":
152-
# - "assets/textures/sprite.png"
153-
# - "assets/shaders/linux_optimized_shader.glsl"
67+
# (Optional) The list of dependencies needed by the script
68+
Dependencies:
69+
# Dependency name
70+
- Name: MyLibrary
71+
72+
# Supported platforms of the dependency
73+
Platforms: [Windows, Linux, MacOS]
74+
75+
# The source of getting the dependency (Git, Local)
76+
Source:
77+
# Git: Dependency exists in a git server, and needs to be cloned
78+
# Local: Dependency exists in local filesystem
79+
Type: Git
80+
81+
# Git URL for Git type, path to a directory for Local type
82+
Value: "https://github.com/MyUser/MyLibrary.git"
83+
84+
# Library Type (Static, Object, Shared, Header)
85+
LibraryType: Static
86+
87+
# (Optional) Paths to be added to the include paths, relative to the dependency folder
88+
IncludePaths:
89+
- "src/include"
90+
91+
# (Optional if LibraryType is Header) Link properties of the dependency
92+
LinkProperties:
93+
# Properties for searching the library binary for the profile
94+
# You can also use "Default" if all compilers use the same values
95+
"g++":
96+
# The library names to be searched for when linking against the script.
97+
# Binaries with linkable extension that contains one of the names will be linked
98+
SearchLibraryNames: ["MyLibrary"]
99+
100+
# (Optional) The library names to be excluded from being searched.
101+
# Works the same as SearchLibraryNames but will NOT be linked instead
102+
ExcludeLibraryNames: []
103+
104+
# The path (relative to the dependency folder) to be searched for the dependency binaries
105+
SearchDirectories: ["./build"]
106+
107+
# (Optional) Additional link flags for this dependency for each platform
108+
AdditionalLinkOptions:
109+
Default: []
110+
111+
# (Optional) Setup commands are run once when the dependency is populated
112+
Setup:
113+
# Target Platform
114+
Default:
115+
# Setup shell commands for the specified profile.
116+
# Default commands are run in the dependency folder
117+
# You can also use "Default" if all the compilers run the same setup commands
118+
"g++":
119+
- "mkdir build"
120+
121+
122+
# (Optional) Build commands are run every time before the script is being built
123+
Build:
124+
# Target Platform
125+
Default:
126+
# Target Profile ("Default" for any profile)
127+
"g++":
128+
- "cd build && cmake .."
129+
- "cd build && cmake --build ."
130+
131+
# (Optional) Cleanup commands are run when the reset option is present. Normally nothing needs
132+
# to be done since the dependency folder will be removed automatically.
133+
Cleanup:
134+
Linux:
135+
"g++":
136+
- "sudo apt purge MyLibrary"
137+
138+
# (Optional) Files to be copied to next to output binary for each platform and profile
139+
FilesToCopy:
140+
# Target Platform (Default, Windows, Linux, MacOS, or Unix)
141+
Default:
142+
# Profile name (e.g., "g++", "clang++", "msvc", or "Default" for any profile)
143+
"Default":
144+
# List of files to copy (relative to the dependency folder)
145+
- "assets/textures/sprite.png"
146+
Windows:
147+
"msvc":
148+
- "assets/textures/sprite.png"
149+
- "assets/fonts/windows_specific_font.ttf"
150+
Linux:
151+
"g++":
152+
- "assets/textures/sprite.png"
153+
- "assets/shaders/linux_optimized_shader.glsl"

DefaultYAMLs/DefaultUserConfig.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ Profiles:
164164
CompileTypes:
165165
Executable:
166166
Default:
167-
Flags: "-std=c++17 -Wall"
167+
Flags: "-std=c++17 -Wall -g"
168168
Executable: "g++"
169169
RunParts: *g++_CompileRunParts
170170
# (Optional) The commands to run in **shell** BEFORE compiling
@@ -175,14 +175,14 @@ Profiles:
175175
# Cleanup: []
176176
Static:
177177
Default:
178-
Flags: "-std=c++17 -Wall"
178+
Flags: "-std=c++17 -Wall -g"
179179
Executable: "g++"
180180
RunParts: *g++_CompileRunParts
181181
# Setup: []
182182
# Cleanup: []
183183
Shared:
184184
Default:
185-
Flags: "-std=c++17 -Wall -fpic"
185+
Flags: "-std=c++17 -Wall -g -fpic"
186186
Executable: "g++"
187187
RunParts: *g++_CompileRunParts
188188
# Setup: []

Include/runcpp2/DependenciesHelper.hpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,10 @@ namespace runcpp2
3535
const std::vector<Data::DependencyInfo*>& availableDependencies,
3636
const std::vector<std::string>& dependenciesLocalCopiesPaths);
3737

38-
bool CopyDependenciesBinaries( const ghc::filesystem::path& buildDir,
39-
const std::vector<Data::DependencyInfo*>& availableDependencies,
38+
bool GatherDependenciesBinaries(const std::vector<Data::DependencyInfo*>& availableDependencies,
4039
const std::vector<std::string>& dependenciesCopiesPaths,
4140
const Data::Profile& profile,
42-
std::vector<std::string>& outCopiedBinariesPaths);
41+
std::vector<std::string>& outBinariesPaths);
4342
}
4443

4544
#endif

Jenkinsfile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -154,9 +154,9 @@ pipeline
154154
variable: 'GITHUB_TOKEN')])
155155
{
156156
SetGithubStatus('$GITHUB_TOKEN',
157-
"Build ${BUILD_NUMBER}",
157+
"CI Pipeline",
158158
STATUS_CONTEXT_URL,
159-
"Stage ${env.STAGE_NAME} started",
159+
"Build ${BUILD_NUMBER} stage ${env.STAGE_NAME} started",
160160
"pending",
161161
REPO_OWNER,
162162
REPO_NAME,
@@ -251,9 +251,9 @@ pipeline
251251
withCredentials([string(credentialsId: 'github-token', variable: 'GITHUB_TOKEN')])
252252
{
253253
SetGithubStatus('$GITHUB_TOKEN',
254-
"Build ${BUILD_NUMBER}",
254+
"CI Pipeline",
255255
STATUS_CONTEXT_URL,
256-
"Pipeline passed",
256+
"Build ${BUILD_NUMBER} Pipeline passed",
257257
"success",
258258
REPO_OWNER,
259259
REPO_NAME,
@@ -298,9 +298,9 @@ pipeline
298298
withCredentials([string(credentialsId: 'github-token', variable: 'GITHUB_TOKEN')])
299299
{
300300
SetGithubStatus('$GITHUB_TOKEN',
301-
"Build ${BUILD_NUMBER}",
301+
"CI Pipeline",
302302
STATUS_CONTEXT_URL,
303-
"Stage ${FAILED_STAGE} failed",
303+
"Build ${BUILD_NUMBER} Stage ${FAILED_STAGE} failed",
304304
"failure",
305305
REPO_OWNER,
306306
REPO_NAME,

0 commit comments

Comments
 (0)