Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Scientific Software
MDANSE
Commits
a5140258
Commit
a5140258
authored
Apr 19, 2016
by
Jamie Hall
Browse files
refactored the windows config file
parent
737dd8b3
Changes
1
Hide whitespace changes
Inline
Side-by-side
BuildServer/Windows/package.sh
View file @
a5140258
#!/bin/bash
# RUN FROM c:\cygwin64\bin\bash c:\Users\Administrateur\Desktop\BUILD\package.sh
#############################
...
...
@@ -33,29 +32,18 @@ fi
##Which versions of external programs to use
PYTHON_VERSION
=
2.7.6
CI_PROJECT_DIR_WIN
=
$(
cygpath
-a
-w
${
CI_PROJECT_DIR
}
)
# Change working directory to the directory the script is in
# http://stackoverflow.com/a/246128
SCRIPT_DIR
=
"
$(
cd
"
$(
dirname
"
${
BASH_SOURCE
[0]
}
"
)
"
&&
pwd
)
"
# Remove the log file created at the previous build
rm
-f
NSISlog.txt
#SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
SCRIPT_DIR
=
"
${
CI_PROJECT_DIR
}
/BuildServer/Windows"
# This is the directory that will contain the temporary installation
TARGET_DIR
=
"
C:
\\
Projects
\\
mdanse
\\
build
\\
${
BUILD_TARGET
}
"
TARGET_DIR
=
"
${
CI_PROJECT_DIR_WIN
}
\\
BuildServer
\\
Windows
\\
${
BUILD_TARGET
}
"
TARGET_DIR_CYGWIN
=
$(
cygpath
-u
$TARGET_DIR
)
#############################
# Support functions
#############################
function
checkTool
{
if
[
-z
"
`
which
$1
`
"
]
;
then
echo
"The
$1
command must be somewhere in your
\$
PATH."
echo
"Fix your
\$
PATH or install
$2
"
exit
1
fi
}
function
extract
{
echo
"Extracting
$*
"
...
...
@@ -63,16 +51,11 @@ function extract
7z x
-y
$*
>>
log.txt
}
if
[
$BUILD_TARGET
=
"win32"
]
||
[
$BUILD_TARGET
=
"win-amd64"
]
;
then
#Check if we have 7zip, needed to extract and packup a bunch of packages for windows.
checkTool 7z
"7zip: http://www.7-zip.org/"
fi
#############################
# Build the packages
#############################
cd
"
$SCRIPT_DIR
"
cd
"
$
{
SCRIPT_DIR
}
"
if
[
$TASK
=
"setup"
]
;
then
...
...
@@ -231,7 +214,6 @@ elif [ $TASK = "build" ]; then
# go back to the installation base directory
cd
${
SCRIPT_DIR
}
CI_PROJECT_DIR_WIN
=
$(
cygpath
-a
-w
${
CI_PROJECT_DIR
}
)
cmd /V:ON /E:ON /C
"setup_and_build.bat"
"
${
CI_PROJECT_DIR_WIN
}
"
"
${
TARGET_DIR
}
"
${
MSVC_BUILD_TARGET
}
# Exit now if unable to build
...
...
@@ -264,5 +246,5 @@ elif [ $TASK = "build" ]; then
echo
"Creating nsis installer for target
${
BUILD_TARGET
}
..."
makensis /V4 /ONSISlog.txt /DVERSION
=
${
VERSION
}
/DARCH
=
${
BUILD_TARGET
}
/DPYTHON_INST
=
"
${
TARGET_DIR
}
"
/DREVISION
=
${
REV_NUMBER
}
MDANSE_installer.nsi
curl
-T
"
C:/Projects/mdanse/resources/
MDANSE_*.exe"
ftp://
$CI_FTP_USER_USERNAME
:
$CI_FTP_USER_PASSWORD
@ftp.ill.fr/mdanse/
curl
-T
"MDANSE_*.exe"
ftp://
$CI_FTP_USER_USERNAME
:
$CI_FTP_USER_PASSWORD
@ftp.ill.fr/mdanse/
fi
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment