Permalink
Browse files

Create build

  • Loading branch information...
3unjee committed Dec 10, 2016
1 parent 95f63ea commit 9afa2ce2290dd8844f3fa6b4b23f078c3f3899e7
Showing with 173 additions and 27 deletions.
  1. +1 −0 MotionBox.pro
  2. +11 −5 README.md
  3. +148 −0 build.sh
  4. 0 build/qt4/.gitignore
  5. 0 build/qt5/.gitignore
  6. +13 −22 content/Gui.qml
@@ -65,6 +65,7 @@ CONFIG(debug, debug|release) {
RC_FILE = dist/MotionBox.rc

OTHER_FILES += configure.sh \
build.sh \
deploy.sh \
README.md \
LICENSE.md \
@@ -56,24 +56,30 @@ You can build MotionBox with Qt Creator:
- Open [MotionBox.pro](MotionBox.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 MotionBox with:
1\. Generate the qrc file:

cd dist
sh qrc <deploy | clean>

Open [MotionBox.pro](MotionBox.pro) and uncomment these two lines:
2\. Build MotionBox:

#CONFIG += deploy
#RESOURCES = dist/MotionBox.qrc
qmake -r "DEFINES += SK_DEPLOY" "RESOURCES = dist/MotionBox.qrc"
make (mingw32-make on Windows)

Rebuild MotionBox and run the following:
3\. Deploy MotionBox:

sh deploy.sh <qt4 | qt5 | clean> <win32 | linux>

148 build.sh
@@ -0,0 +1,148 @@
#!/bin/sh

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

MotionBox="../.."

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 MotionBox
#--------------------------------------------------------------------------------------------------

echo "BUILDING MotionBox"
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 [ $1 = "qt4" ]; then

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

elif [ $2 = "linux" ]; then

if [ -d "$lib64" ]; then

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

qmake --version
echo ""

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

cd dist

sh qrc.sh deploy
echo ""

cd ../$build

qmake -r -spec $spec "CONFIG += release" \
"DEFINES += SK_DEPLOY" "RESOURCES = dist/MotionBox.qrc" $MotionBox
else
cd $build

qmake -r -spec $spec "CONFIG += release" $MotionBox
fi

echo ""

if [ $2 = "win32" ]; then

mingw32-make
else
make
fi

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

#--------------------------------------------------------------------------------------------------
# Deploying MotionBox
#--------------------------------------------------------------------------------------------------

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

echo "DEPLOYING MotionBox"
echo "-------------------"

cd $MotionBox

sh deploy.sh $1 $2

echo "-------------------"
fi
No changes.
No changes.
@@ -119,19 +119,22 @@ Item
&&
related.isLoading == false)

property bool pMiniExpanded: false
property bool pMiniTracks : false

property bool pMiniRelated : false
property bool pMiniRelatedExpanded: false

property bool pMiniWall: false

property bool pMini : false
property bool pMiniMicro: local.micro

property bool pMiniSize: true

property bool pMiniVisible: false

property bool pMiniExpanded: false
property bool pMiniTracks : false

property bool pMiniWall: false

property bool pMiniRelated : false
property bool pMiniRelatedExpanded: false

//---------------------------------------------------------------------------------------------

property PlaylistNet pLoadPlaylist: null
@@ -398,11 +401,11 @@ Item
{
if (state != Qt.WindowNoState || pMini == false) return;

window.autoSize = false;
pMiniSize = false;

exposeMini();

window.autoSize = true;
pMiniSize = true;
}

onActiveChanged: updateScreenDim()
@@ -944,12 +947,8 @@ Item

if (sk.osWin) window.setWindowMaximize(true);

window.autoSize = false;

window.maximized = true;

window.autoSize = true;

pRestoreMiniB();

st.animate = true;
@@ -1047,12 +1046,8 @@ Item

pRestoreMiniA();

window.autoSize = false;

window.fullScreen = true;

window.autoSize = true;

pRestoreMiniB();

st.animate = true;
@@ -1176,12 +1171,8 @@ Item
window.setWindowMaximize(false);
}

window.autoSize = false;

window.fullScreen = false;
window.maximized = false;

window.autoSize = true;
}
else
{
@@ -1193,7 +1184,7 @@ Item
window.setWindowMaximize(false);
}

if (window.autoSize)
if (pMiniSize)
{
window.saveGeometry();
}

0 comments on commit 9afa2ce

Please sign in to comment.