Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jami-client-qt
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
jami-client-qt
Commits
7acf48d9
Commit
7acf48d9
authored
7 months ago
by
Andreas Traczyk
Committed by
Adrien Béraud
7 months ago
Browse files
Options
Downloads
Patches
Plain Diff
build: crash-reporting: add scripting option to enable crash reporting
Gitlab:
#1454
Change-Id: I51fdc2af15c7cdd6469dd817b6a4ad89e45bab1c
parent
70c64a59
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
build.py
+20
-1
20 additions, 1 deletion
build.py
extras/scripts/build-windows.py
+20
-11
20 additions, 11 deletions
extras/scripts/build-windows.py
extras/scripts/install.sh
+12
-1
12 additions, 1 deletion
extras/scripts/install.sh
with
52 additions
and
13 deletions
build.py
+
20
−
1
View file @
7acf48d9
...
@@ -366,13 +366,27 @@ def cwd(path):
...
@@ -366,13 +366,27 @@ def cwd(path):
def
run_install
(
args
):
def
run_install
(
args
):
# Platforms with special compilation scripts
# Platforms with special compilation scripts
if
args
.
distribution
==
WIN32_DISTRIBUTION_NAME
:
if
args
.
distribution
==
WIN32_DISTRIBUTION_NAME
:
# Build daemon if not using pywinmake
if
not
args
.
pywinmake
:
if
not
args
.
pywinmake
:
with
cwd
(
'
daemon/compat/msvc
'
):
with
cwd
(
'
daemon/compat/msvc
'
):
execute_script
([
f
'
python winmake.py -iv -s
{
args
.
sdk
}
-b daemon
'
])
execute_script
([
f
'
python winmake.py -iv -s
{
args
.
sdk
}
-b daemon
'
])
# Prepare the build-windows.py script call
build_windows
=
'
extras/scripts/build-windows.py
'
build_windows
=
'
extras/scripts/build-windows.py
'
# Initialize build environment
execute_script
([
f
'
python
{
build_windows
}
--init
'
])
execute_script
([
f
'
python
{
build_windows
}
--init
'
])
execute_script
([
f
'
python
{
build_windows
}
--qt=
{
args
.
qt
}
'
])
# Construct build command with options
build_cmd
=
[
'
python
'
,
build_windows
,
f
'
--qt=
{
args
.
qt
}
'
]
if
args
.
enable_crash_reports
:
build_cmd
.
append
(
'
--enable-crash-reports
'
)
execute_script
([
'
'
.
join
(
build_cmd
)])
return
True
return
True
# Unix-like platforms
# Unix-like platforms
...
@@ -401,6 +415,8 @@ def run_install(args):
...
@@ -401,6 +415,8 @@ def run_install(args):
install_args
+=
(
'
-a
'
,
args
.
arch
)
install_args
+=
(
'
-a
'
,
args
.
arch
)
if
args
.
extra_cmake_flags
:
if
args
.
extra_cmake_flags
:
install_args
+=
(
'
-D
'
,
args
.
extra_cmake_flags
)
install_args
+=
(
'
-D
'
,
args
.
extra_cmake_flags
)
if
args
.
enable_crash_reports
:
install_args
.
append
(
'
-C
'
)
if
args
.
distribution
==
OSX_DISTRIBUTION_NAME
:
if
args
.
distribution
==
OSX_DISTRIBUTION_NAME
:
# The `universal_newlines` parameter has been renamed to `text` in
# The `universal_newlines` parameter has been renamed to `text` in
...
@@ -750,6 +766,9 @@ def parse_args():
...
@@ -750,6 +766,9 @@ def parse_args():
# Allow supplying extra congifure flags to the client cmake.
# Allow supplying extra congifure flags to the client cmake.
ap
.
add_argument
(
'
--extra-cmake-flags
'
,
type
=
str
,
ap
.
add_argument
(
'
--extra-cmake-flags
'
,
type
=
str
,
help
=
'
Extra flags to pass to the client cmake
'
)
help
=
'
Extra flags to pass to the client cmake
'
)
ap
.
add_argument
(
'
--enable-crash-reports
'
,
action
=
'
store_true
'
,
default
=
False
,
help
=
'
Enable crash reporting
'
)
dist
=
choose_distribution
()
dist
=
choose_distribution
()
...
...
This diff is collapsed.
Click to expand it.
extras/scripts/build-windows.py
+
20
−
11
View file @
7acf48d9
...
@@ -17,6 +17,7 @@ optional arguments:
...
@@ -17,6 +17,7 @@ optional arguments:
-i, --init Initialize submodules
-i, --init Initialize submodules
-v, --version Show the version number and exit
-v, --version Show the version number and exit
-s, --skip-build Only do packaging or run tests, skip building
-s, --skip-build Only do packaging or run tests, skip building
--enable-crash-reports Enable crash reports
positional arguments:
positional arguments:
{pack}
{pack}
...
@@ -260,7 +261,7 @@ def cmake_build(config_str, env_vars, cmake_build_dir):
...
@@ -260,7 +261,7 @@ def cmake_build(config_str, env_vars, cmake_build_dir):
return
True
return
True
def
build
(
config_str
,
qt_dir
,
tests
):
def
build
(
config_str
,
qt_dir
,
tests
,
enable_crash_reports
):
"""
Use cmake to build the project.
"""
"""
Use cmake to build the project.
"""
print
(
"
Building with Qt at
"
+
qt_dir
)
print
(
"
Building with Qt at
"
+
qt_dir
)
...
@@ -284,6 +285,11 @@ def build(config_str, qt_dir, tests):
...
@@ -284,6 +285,11 @@ def build(config_str, qt_dir, tests):
"
-DBETA=
"
+
str
((
0
,
1
)[
config_str
==
"
Beta
"
]),
"
-DBETA=
"
+
str
((
0
,
1
)[
config_str
==
"
Beta
"
]),
]
]
if
enable_crash_reports
:
cmake_options
.
append
(
"
-DENABLE_CRASHREPORTS=ON
"
)
else
:
cmake_options
.
append
(
"
-DENABLE_CRASHREPORTS=OFF
"
)
# Make sure the build directory exists.
# Make sure the build directory exists.
if
not
os
.
path
.
exists
(
build_dir
):
if
not
os
.
path
.
exists
(
build_dir
):
os
.
makedirs
(
build_dir
)
os
.
makedirs
(
build_dir
)
...
@@ -471,17 +477,20 @@ def parse_args():
...
@@ -471,17 +477,20 @@ def parse_args():
parser
.
add_argument
(
parser
.
add_argument
(
"
-i
"
,
"
--init
"
,
action
=
"
store_true
"
,
help
=
"
Initialize submodules
"
)
"
-i
"
,
"
--init
"
,
action
=
"
store_true
"
,
help
=
"
Initialize submodules
"
)
parser
.
add_argument
(
parser
.
add_argument
(
'
-sd
'
,
'
--skip-deploy
'
,
'
--skip-deploy
'
,
action
=
'
store_true
'
,
action
=
'
store_true
'
,
default
=
False
,
default
=
False
,
help
=
'
Force skip deployment of runtime files needed for packaging
'
)
help
=
'
Force skip deployment of runtime files needed for packaging
'
)
parser
.
add_argument
(
parser
.
add_argument
(
"
-sb
"
,
"
--skip-build
"
,
"
--skip-build
"
,
action
=
"
store_true
"
,
action
=
"
store_true
"
,
default
=
False
,
default
=
False
,
help
=
"
Only do packaging or run tests, skip build step
"
)
help
=
"
Only do packaging or run tests, skip build step
"
)
parser
.
add_argument
(
'
--enable-crash-reports
'
,
action
=
'
store_true
'
,
default
=
False
,
help
=
'
Enable crash reporting
'
)
pack_arg_parser
=
subparsers
.
add_parser
(
"
pack
"
)
pack_arg_parser
=
subparsers
.
add_parser
(
"
pack
"
)
pack_group
=
pack_arg_parser
.
add_mutually_exclusive_group
(
required
=
True
)
pack_group
=
pack_arg_parser
.
add_mutually_exclusive_group
(
required
=
True
)
...
@@ -534,7 +543,7 @@ def main():
...
@@ -534,7 +543,7 @@ def main():
def
do_build
(
do_tests
):
def
do_build
(
do_tests
):
if
not
parsed_args
.
skip_build
:
if
not
parsed_args
.
skip_build
:
build
(
config_str
,
parsed_args
.
qt
,
do_tests
)
build
(
config_str
,
parsed_args
.
qt
,
do_tests
,
parsed_args
.
enable_crash_reports
)
if
not
parsed_args
.
skip_deploy
:
if
not
parsed_args
.
skip_deploy
:
deploy_runtimes
(
config_str
,
parsed_args
.
qt
)
deploy_runtimes
(
config_str
,
parsed_args
.
qt
)
...
...
This diff is collapsed.
Click to expand it.
extras/scripts/install.sh
+
12
−
1
View file @
7acf48d9
...
@@ -31,6 +31,7 @@ export OSTYPE
...
@@ -31,6 +31,7 @@ export OSTYPE
# -a: arch to build
# -a: arch to build
# -A: enable AddressSanitizer
# -A: enable AddressSanitizer
# -D: extra CMake flags for the client
# -D: extra CMake flags for the client
# -C: enable crash reporting
set
-ex
set
-ex
...
@@ -49,8 +50,9 @@ asan=
...
@@ -49,8 +50,9 @@ asan=
extra_cmake_flags
=
''
extra_cmake_flags
=
''
arch
=
''
arch
=
''
enable_testing
=
false
enable_testing
=
false
enable_crashreports
=
false
while
getopts
gsc:dQ:P:p:uWwa:AtD: OPT
;
do
while
getopts
gsc:dQ:P:p:uWwa:AtD:
C
OPT
;
do
case
"
$OPT
"
in
case
"
$OPT
"
in
g
)
g
)
global
=
'true'
global
=
'true'
...
@@ -91,6 +93,9 @@ while getopts gsc:dQ:P:p:uWwa:AtD: OPT; do
...
@@ -91,6 +93,9 @@ while getopts gsc:dQ:P:p:uWwa:AtD: OPT; do
D
)
D
)
extra_cmake_flags
=
"
${
OPTARG
}
"
extra_cmake_flags
=
"
${
OPTARG
}
"
;;
;;
C
)
enable_crashreports
=
'true'
;;
\?
)
\?
)
exit
1
exit
1
;;
;;
...
@@ -212,6 +217,12 @@ else
...
@@ -212,6 +217,12 @@ else
client_cmake_flags+
=(
-DBUILD_TESTING
=
Off
)
client_cmake_flags+
=(
-DBUILD_TESTING
=
Off
)
fi
fi
if
[
"
${
enable_crashreports
}
"
=
"true"
]
;
then
client_cmake_flags+
=(
-DENABLE_CRASHREPORTS
=
ON
)
else
client_cmake_flags+
=(
-DENABLE_CRASHREPORTS
=
OFF
)
fi
if
[[
"
$OSTYPE
"
==
"darwin"
*
]]
;
then
if
[[
"
$OSTYPE
"
==
"darwin"
*
]]
;
then
#detect arch for macos
#detect arch for macos
CMAKE_OSX_ARCHITECTURES
=
"arm64"
CMAKE_OSX_ARCHITECTURES
=
"arm64"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment