Skip to content

Commit c842df7

Browse files
committed
Provision 7z
1 parent 247a6bf commit c842df7

File tree

2 files changed

+39
-1
lines changed

2 files changed

+39
-1
lines changed

system-dependencies.sh

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,11 @@ while ! test -z $1; do
4646
unset IGNORE_CMAKE
4747
shift
4848
;;
49+
--provision-7z)
50+
PROVISION_7Z=1
51+
unset IGNORE_7Z
52+
shift
53+
;;
4954
--provision-autotools)
5055
PROVISION_AUTOTOOLS=1
5156
unset IGNORE_AUTOTOOLS
@@ -72,6 +77,8 @@ while ! test -z $1; do
7277
unset IGNORE_XCODE
7378
PROVISION_CMAKE=1
7479
unset IGNORE_CMAKE
80+
PROVISION_7Z=1
81+
unset IGNORE_7Z
7582
PROVISION_AUTOTOOLS=1
7683
unset IGNORE_AUTOTOOLS
7784
PROVISION_HOMEBREW=1
@@ -88,6 +95,7 @@ while ! test -z $1; do
8895
IGNORE_VISUAL_STUDIO=1
8996
IGNORE_XCODE=1
9097
IGNORE_CMAKE=1
98+
IGNORE_7Z=1
9199
IGNORE_AUTOTOOLS=1
92100
IGNORE_HOMEBREW=1
93101
IGNORE_SHARPIE=1
@@ -118,6 +126,10 @@ while ! test -z $1; do
118126
IGNORE_CMAKE=1
119127
shift
120128
;;
129+
--ignore-7z)
130+
IGNORE_7Z=1
131+
shift
132+
;;
121133
--ignore-sharpie)
122134
IGNORE_SHARPIE=1
123135
shift
@@ -691,6 +703,31 @@ function check_cmake () {
691703
ok "Found CMake $ACTUAL_CMAKE_VERSION (at least $MIN_CMAKE_VERSION is required)"
692704
}
693705

706+
function install_7z () {
707+
if ! brew --version >& /dev/null; then
708+
fail "Asked to install 7z, but brew is not installed."
709+
return
710+
fi
711+
712+
brew install p7zip
713+
}
714+
715+
function check_7z () {
716+
if ! test -z $IGNORE_7Z; then return; fi
717+
718+
719+
if ! 7z &> /dev/null; then
720+
if ! test -z $PROVISION_7Z; then
721+
install_7z
722+
else
723+
fail "You must install 7z (no specific version is required)"
724+
fi
725+
return
726+
fi
727+
728+
ok "Found 7z (no specific version is required)"
729+
}
730+
694731
function check_homebrew ()
695732
{
696733
if ! test -z $IGNORE_HOMEBREW; then return; fi
@@ -844,6 +881,7 @@ check_autotools
844881
check_mono
845882
check_visual_studio
846883
check_cmake
884+
check_7z
847885
check_objective_sharpie
848886
check_simulators
849887

tools/devops/azure-pipelines.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
2626
- bash: |
2727
echo "Setting up prerequisites from brew..."
28-
brew install libtool autoconf automake bison flex
28+
brew install libtool autoconf automake bison flex 7z
2929
displayName: "Setting up prerequisites from brew..."
3030
3131
- task: xamops.azdevex.provisionator-task.provisionator@1

0 commit comments

Comments
 (0)