Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
mantid
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mantidproject
mantid
Commits
76ac6669
Commit
76ac6669
authored
12 years ago
by
Gigg, Martyn Anthony
Browse files
Options
Downloads
Patches
Plain Diff
Allow user to specify arch for fetch_Third_Party.bat. Refs #6527
parent
ec22552f
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Code/fetch_Third_Party.bat
+28
-7
28 additions, 7 deletions
Code/fetch_Third_Party.bat
with
28 additions
and
7 deletions
Code/fetch_Third_Party.bat
+
28
−
7
View file @
76ac6669
:: This script deals with getting hold of the required third party includes and libraries
:: It will either clone or pull 3rdpartyincludes & 3rdpartylibs-win32/64 and put them in the right place for CMake
:: Your architecture is auto-determined
::
:: Usage: fetch_Third_Party [win32|win64]
::
:: - [x86|x64] If provided this indicates the required architecture. If left bank your architecture is auto-determined
@echo
off
:: Check for git. Older versions used %GitCmd%, newer just git
:: Check for git. Older versions used %GitCmd%, newer just git. The older versions still
:: have git.exe but it should be called through git.cmd so git.cmd check is first
echo
Checking
for
git
.cmd
for
%%X
in
(
git
.cmd
)
do
(
set
FOUND
=
%%
~
$PATH:X
)
if
defined
FOUND
(
...
...
@@ -16,16 +19,19 @@ if defined FOUND (
set
GitCmd
=
git
.exe
)
else
(
echo
Cannot
find
git
.
Make
sure
the
cmd
folder
is
in
your
path
.
exit
/b
1
exit
1
)
)
echo
Using
%GitCmd%
:: It would seem that the %ERRORLEVEL% is not set correctly when inside an if statement
:: so we have to do the check for the OS arch and then override it with the user provided value if necessary
:: Check whether we're 64 or 32 bit. Store it in the 'arch' variable
S
et
RegQry
=
HKLM
\Hardware\Description\System\CentralProcessor\0
s
et
RegQry
=
HKLM
\Hardware\Description\System\CentralProcessor\0
REG
.exe
Query
%RegQry%
>
checkOS
.txt
Find
/i
"x86"
<
CheckOS
.txt
>
StringCheck
.txt
If
%ERRORLEVEL%
==
0
(
...
...
@@ -33,11 +39,26 @@ If %ERRORLEVEL% == 0 (
)
ELSE
(
set
arch
=
win64
)
:: Remove temporary files created above
del
CheckOS
.txt
del
StringCheck
.txt
:: Check if user has overridden the value
if
NOT
"
%
1"
==
""
(
if
"
%
1"
==
"win64"
(
set
arch
=
win64
)
else
(
if
"
%
1"
==
"win32"
(
set
arch
=
win32
)
else
(
echo
"Unknown architecture. Valid options are:win32,win64."
exit
1
)
)
)
echo
Using
architecture
=
%arch%
:: Find out the url where mantid came from so we use the same location & protocol
FOR
/F
%%I
IN
(
'
%GitCmd%
config --get remote.origin.url'
)
DO
SET
url
=
%%I
echo
Mantid
repository
URL
:
%url%
...
...
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
register
or
sign in
to comment