Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
CI Tooling
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Sysadmin
CI Tooling
Commits
dbcfb7d5
Commit
dbcfb7d5
authored
Apr 16, 2017
by
Ben Cooksley
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Handle some Windows special cases: hopefully at least
parent
18946e80
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
4 deletions
+20
-4
helpers/compile-build.py
helpers/compile-build.py
+10
-2
helpers/install-build.py
helpers/install-build.py
+10
-2
No files found.
helpers/compile-build.py
View file @
dbcfb7d5
...
...
@@ -24,12 +24,20 @@ buildEnvironment = EnvironmentHandler.generateFor( installPrefix=arguments.using
sourcesLocation
=
os
.
getcwd
()
buildLocation
=
CommonUtils
.
buildDirectoryForSources
(
sources
=
sourcesLocation
,
inSourceBuild
=
buildSpecification
[
'in-source-build'
]
)
# Determine the build command we want to use
# Just about all of our platforms support standard "make" so that is our default...
makeCommand
=
"make -j {cpuCount} -l {maximumLoad}"
# Windows is a bit special though
if
sys
.
platform
==
'win32'
:
# We use NMake on Windows at the moment
makeCommand
=
"nmake"
# Compile the project
try
:
commandToRun
=
BuildSystem
.
substituteCommandTokens
(
"make -j {cpuCount} -l {maximumLoad}"
)
commandToRun
=
BuildSystem
.
substituteCommandTokens
(
makeCommand
)
subprocess
.
check_call
(
commandToRun
,
stdout
=
sys
.
stdout
,
stderr
=
sys
.
stderr
,
shell
=
True
,
cwd
=
buildLocation
,
env
=
buildEnvironment
)
except
Exception
:
sys
.
exit
(
1
)
# The project was compiled successfully
sys
.
exit
(
0
)
\ No newline at end of file
sys
.
exit
(
0
)
helpers/install-build.py
View file @
dbcfb7d5
...
...
@@ -31,12 +31,20 @@ if arguments.divertTo != None:
buildEnvironment
[
'DESTDIR'
]
=
arguments
.
divertTo
buildEnvironment
[
'INSTALL_ROOT'
]
=
arguments
.
divertTo
# Determine the build command we want to use
# Just about all of our platforms support standard "make" so that is our default...
makeCommand
=
"make -j {cpuCount} -l {maximumLoad} install"
# Windows is a bit special though
if
sys
.
platform
==
'win32'
:
# We use NMake on Windows at the moment
makeCommand
=
"nmake install"
# Install the project
try
:
commandToRun
=
BuildSystem
.
substituteCommandTokens
(
"make -j {cpuCount} -l {maximumLoad} install"
)
commandToRun
=
BuildSystem
.
substituteCommandTokens
(
makeCommand
)
subprocess
.
check_call
(
commandToRun
,
stdout
=
sys
.
stdout
,
stderr
=
sys
.
stderr
,
shell
=
True
,
cwd
=
buildLocation
,
env
=
buildEnvironment
)
except
Exception
:
sys
.
exit
(
1
)
# The project was installed successfully
sys
.
exit
(
0
)
\ No newline at end of file
sys
.
exit
(
0
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment