Permalink
Browse files

Create build

  • Loading branch information...
3unjee committed Dec 10, 2016
1 parent 6b853bc commit 861843572fbfa7d2d46a31efa3a0b19795c75b74
Showing with 142 additions and 0 deletions.
  1. +6 −0 README.md
  2. +1 −0 Sky.pro
  3. +135 −0 build.sh
  4. 0 build/qt4/.gitignore
  5. 0 build/qt5/.gitignore
@@ -56,11 +56,17 @@ You can build Sky with Qt Creator:
- Open [Sky.pro](Sky.pro).
- Click on "Build > Build all".

Or the build script:

build <qt4 | qt5 | clean> <win32 | linux> [deploy]

Or the console:

qmake -r
make (mingw32-make on Windows)

- Edit [build.sh](build.sh) to check your dependencies.

## Deploy

You can deploy Sky with:
@@ -10,6 +10,7 @@ SUBDIRS = src/SkCore \

OTHER_FILES += 3rdparty.sh \
configure.sh \
build.sh \
deploy.sh \
README.md \
LICENSE.md \
135 build.sh
@@ -0,0 +1,135 @@
#!/bin/sh

#--------------------------------------------------------------------------------------------------
# Settings
#--------------------------------------------------------------------------------------------------

Sky="../.."

external="/c/dev/workspace/3rdparty"

#--------------------------------------------------------------------------------------------------

Qt4_version="4.8.7"
Qt5_version="5.5.1"

MinGW_version="4.9.2"

#--------------------------------------------------------------------------------------------------

Qt4="$external/Qt/$Qt4_version/bin"
Qt5="$external/Qt/$Qt5_version/bin"

MinGW="$external/MinGW/$MinGW_version/bin"

#--------------------------------------------------------------------------------------------------
# Linux

lib64="/lib/x86_64-linux-gnu"

#--------------------------------------------------------------------------------------------------
# Syntax
#--------------------------------------------------------------------------------------------------

if [ $# != 2 -a $# != 3 ] \
|| \
[ $1 != "qt4" -a $1 != "qt5" -a $1 != "clean" ] || [ $2 != "win32" -a $2 != "linux" ] \
|| \
[ $# = 3 -a "$3" != "deploy" ]; then

echo "Usage: build <qt4 | qt5 | clean> <win32 | linux> [deploy]"

exit 1
fi

#--------------------------------------------------------------------------------------------------
# Clean
#--------------------------------------------------------------------------------------------------

if [ $1 = "clean" ]; then

echo "CLEANING"

rm -rf build/qt4/*
rm -rf build/qt5/*

touch build/qt4/.gitignore
touch build/qt5/.gitignore

exit 0
fi

#--------------------------------------------------------------------------------------------------
# Building Sky
#--------------------------------------------------------------------------------------------------

echo "BUILDING Sky"
echo "------------"

if [ $1 = "qt4" ]; then

QT_SELECT=qt4

build="build/qt4"
else
QT_SELECT=qt5

build="build/qt5"
fi

if [ $2 = "win32" ]; then

spec=win32-g++

if [ $2 = "win32" ]; then

if [ $1 = "qt4" ]; then

PATH="$Qt4:$MinGW:$PATH"
else
PATH="$Qt5:$MinGW:$PATH"
fi
fi

elif [ $2 = "linux" ]; then

if [ -d "$lib64" ]; then

spec=linux-g++-64
else
spec=linux-g++-32
fi
fi

qmake --version
echo ""

cd $build

qmake -r -spec $spec "CONFIG += release" $Sky

if [ $2 = "win32" ]; then

mingw32-make
else
make
fi

echo "------------"
echo ""

#--------------------------------------------------------------------------------------------------
# Deploying Sky
#--------------------------------------------------------------------------------------------------

if [ "$3" = "deploy" ]; then

echo "DEPLOYING Sky"
echo "-------------"

cd $Sky

sh deploy.sh $1 $2

echo "-------------"
fi
No changes.
No changes.

0 comments on commit 8618435

Please sign in to comment.