Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Education
GCompris
Commits
8c034ad0
Commit
8c034ad0
authored
Oct 02, 2015
by
Johnny Jazeix
Committed by
Holger Kaelberer
Oct 21, 2015
Browse files
balancebox, fix build for SailfishOS and Windows
parent
69cd287c
Changes
6
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
8c034ad0
...
...
@@ -268,17 +268,28 @@ include(ExternalProject)
set
(
_box2d_install_dir
${
CMAKE_CURRENT_BINARY_DIR
}
/lib/qml/Box2D.2.0
)
set
(
_box2d_source_dir
${
CMAKE_CURRENT_SOURCE_DIR
}
/external/qml-box2d
)
if
(
WIN32
)
set
(
_box2d_library_dir
"release/"
)
set
(
_box2d_library_file
"Box2D.dll"
)
else
()
set
(
_box2d_library_dir
""
)
set
(
_box2d_library_file
"libBox2D.so"
)
endif
()
ExternalProject_Add
(
qml_box2d
DOWNLOAD_COMMAND
""
SOURCE_DIR
${
_box2d_source_dir
}
CONFIGURE_COMMAND qmake
${
_box2d_source_dir
}
/box2d.pro
BUILD_COMMAND
make
BUILD_COMMAND
${
CMAKE_MAKE_PROGRAM
}
INSTALL_DIR
${
_box2d_install_dir
}
INSTALL_COMMAND cp
libBox2D.so
${
_box2d_source_dir
}
/qmldir
${
_box2d_install_dir
}
INSTALL_COMMAND cp
${
_box2d_library_dir
}${
_box2d_library_file
}
${
_box2d_source_dir
}
/qmldir
${
_box2d_install_dir
}
)
add_library
(
qml-box2d SHARED IMPORTED
)
set_target_properties
(
qml-box2d PROPERTIES IMPORTED_LOCATION
${
_box2d_install_dir
}
/
libBox2D.so
)
set_target_properties
(
qml-box2d PROPERTIES IMPORTED_LOCATION
${
_box2d_install_dir
}
/
${
_box2d_library_file
}
)
install
(
DIRECTORY
${
_box2d_install_dir
}
DESTINATION lib/qml
)
if
(
SAILFISHOS
)
install
(
DIRECTORY
${
_box2d_install_dir
}
DESTINATION share/harbour-gcompris-qt/lib/qml
)
else
()
install
(
DIRECTORY
${
_box2d_install_dir
}
DESTINATION lib/qml
)
endif
()
platforms/sailfishOS/harbour-gcompris-qt.spec.cmake
View file @
8c034ad0
...
...
@@ -63,7 +63,11 @@ mv "@CMAKE_BINARY_DIR@/_CPack_Packages/Linux/RPM/tmpBBroot" $RPM_BUILD_ROOT
@TRANSLATION_GENERATED_FILES@
%dir
"/usr/share/harbour-gcompris-qt/rcc"
@RCC_GENERATED_FILES@
%dir
"/usr/share/harbour-gcompris-qt/lib"
%dir
"/usr/share/harbour-gcompris-qt/lib/qml"
%dir
"/usr/share/harbour-gcompris-qt/lib/qml/Box2D.2.0"
"/usr/share/harbour-gcompris-qt/lib/qml/Box2D.2.0/libBox2D.so"
"/usr/share/harbour-gcompris-qt/lib/qml/Box2D.2.0/qmldir"
%changelog
...
...
src/activities/balancebox/Balancebox.qml
View file @
8c034ad0
...
...
@@ -426,7 +426,7 @@ ActivityBase {
property
alias
levelsBox
:
levelsBox
property
var
availableLevels
:
[
{
"
text
"
:
qsTr
(
"
Bultin
"
),
"
value
"
:
"
builtin
"
},
{
"
text
"
:
qsTr
(
"
Bu
i
lt
in
"
),
"
value
"
:
"
builtin
"
},
{
"
text
"
:
qsTr
(
"
User
"
),
"
value
"
:
"
user
"
},
]
...
...
@@ -478,7 +478,7 @@ ActivityBase {
!
parser
.
jsonFile
.
exists
(
Activity
.
userFile
))
{
Core
.
showMessageDialog
(
dialogActivityConfig
,
qsTr
(
"
You selected the user defined level set, but you have not yet defined any user levels!<br/>
"
+
"
Either define your user levels by starting the level editor or choose the 'builtin' level set.
"
),
"
Either define your user levels by starting the level editor or choose the 'built
in' level set.
"
),
"
Ok
"
,
null
,
""
,
null
,
null
);
...
...
src/activities/balancebox/editor/balanceboxeditor.js
View file @
8c034ad0
...
...
@@ -311,7 +311,7 @@ function warnUnsavedChanges(yesFunc, noFunc)
{
Core
.
showMessageDialog
(
props
.
editor
,
qsTr
(
"
You have unsaved changes!<br/>
"
+
"
Really switch to another level and lo
o
se changes?
"
),
"
Really switch to another level and lose changes?
"
),
qsTr
(
"
Yes
"
),
yesFunc
,
qsTr
(
"
No
"
),
noFunc
,
noFunc
);
...
...
src/core/CMakeLists.txt
View file @
8c034ad0
...
...
@@ -69,7 +69,7 @@ if(ANDROID)
qt5_use_modules
(
${
GCOMPRIS_EXECUTABLE_NAME
}
Qml Quick Gui Multimedia Core Svg Xml XmlPatterns Sensors AndroidExtras
)
else
()
add_executable
(
${
GCOMPRIS_EXECUTABLE_NAME
}
MACOSX_BUNDLE
${
gcompris_SRCS
}
${
gcompris_MOC
}
${
gcompris_RES
}
)
qt5_use_modules
(
${
GCOMPRIS_EXECUTABLE_NAME
}
Qml Quick Gui Multimedia Network XmlPatterns Svg Xml Core
)
qt5_use_modules
(
${
GCOMPRIS_EXECUTABLE_NAME
}
Qml Quick Gui Multimedia Network XmlPatterns Svg Xml
Sensors
Core
)
endif
()
if
(
CMAKE_HOST_WIN32
)
...
...
@@ -102,6 +102,8 @@ if(BUILD_STANDALONE)
list
(
APPEND _qt_plugins Qt5::QXcbIntegrationPlugin
)
endif
()
list
(
APPEND _qt_plugins Qt5::genericSensorPlugin Qt5::QtSensorGesturePlugin Qt5::QShakeSensorGesturePlugin
)
# Qml plugins to install
if
(
WIN32
)
set
(
_lib_prefix
""
)
...
...
@@ -120,14 +122,14 @@ if(BUILD_STANDALONE)
mediaservice/
${
_lib_prefix
}
qtmedia_audioengine
mediaservice/
${
_lib_prefix
}
qavfcamera
)
endif
()
set
(
_qml_plugins
QtQuick/Window.2/
${
_lib_prefix
}
windowplugin
QtQuick/Particles.2/
${
_lib_prefix
}
particlesplugin
QtQuick.2/
${
_lib_prefix
}
qtquick2plugin
QtMultimedia/
${
_lib_prefix
}
declarative_multimedia
Box2D.2.0
/
${
_lib_prefix
}
Box2D
)
QtSensors
/
${
_lib_prefix
}
declarative_sensors
)
if
(
NOT SAILFISHOS
)
list
(
APPEND _qml_plugins
QtQuick/Controls/
${
_lib_prefix
}
qtquickcontrolsplugin
...
...
@@ -135,7 +137,9 @@ if(BUILD_STANDALONE)
endif
()
if
(
NOT WIN32 AND NOT SAILFISHOS
)
list
(
APPEND QtAudioEngine/
${
_lib_prefix
}
declarative_audioengine
)
list
(
APPEND _qml_plugins
QtAudioEngine/
${
_lib_prefix
}
declarative_audioengine
Box2D.2.0/
${
_lib_prefix
}
Box2D
)
endif
()
set
(
GCOMPRIS_OTHER_LIBS
)
...
...
src/core/main.cpp
View file @
8c034ad0
...
...
@@ -226,11 +226,16 @@ int main(int argc, char *argv[])
}
QQmlApplicationEngine
engine
(
QUrl
(
"qrc:/gcompris/src/core/main.qml"
));
QObject
::
connect
(
&
engine
,
SIGNAL
(
quit
()),
DownloadManager
::
getInstance
(),
SLOT
(
shutdown
()));
QObject
::
connect
(
&
engine
,
SIGNAL
(
quit
()),
DownloadManager
::
getInstance
(),
SLOT
(
shutdown
()));
// add import path for shipped qml modules:
#ifdef SAILFISHOS
engine
.
addImportPath
(
QStringLiteral
(
"%1/../share/%2/lib/qml"
)
.
arg
(
QCoreApplication
::
applicationDirPath
()).
arg
(
GCOMPRIS_APPLICATION_NAME
));
#else
engine
.
addImportPath
(
QStringLiteral
(
"%1/../lib/qml"
)
.
arg
(
QCoreApplication
::
applicationDirPath
()));
#endif
if
(
parser
.
isSet
(
exportActivitiesAsSQL
))
{
ActivityInfoTree
*
menuTree
(
qobject_cast
<
ActivityInfoTree
*>
(
ActivityInfoTree
::
menuTreeProvider
(
&
engine
,
NULL
)));
...
...
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