Capitalize project name in QML
This commit is contained in:
parent
a17a03aaef
commit
b6632aa74b
|
@ -1,2 +1,2 @@
|
|||
let name () = "oboy"
|
||||
let name () = "OBoy"
|
||||
let version () = "1.0a"
|
||||
|
|
|
@ -4,9 +4,7 @@ import com.oboy.oboy 1.0
|
|||
|
||||
Window {
|
||||
title: "About"
|
||||
// A background map is 32 x 32 tiles.
|
||||
// Each tile is 8 x 8 pixels.
|
||||
width: 128
|
||||
width: 256
|
||||
height: 128
|
||||
maximumWidth: width
|
||||
minimumWidth: width
|
||||
|
@ -20,10 +18,12 @@ Window {
|
|||
Text {
|
||||
id: name
|
||||
text: oboy.name
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
}
|
||||
Text {
|
||||
id: version
|
||||
text: oboy.version
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.top: name.bottom
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
cmake_minimum_required(VERSION 3.1)
|
||||
|
||||
project(oboy LANGUAGES CXX)
|
||||
project(OBoy LANGUAGES CXX)
|
||||
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
|
@ -15,7 +15,7 @@ target_compile_definitions(${PROJECT_NAME} PRIVATE $<$<OR:$<CONFIG:Debug>,$<CONF
|
|||
target_link_libraries(${PROJECT_NAME} PRIVATE Qt5::Core Qt5::Quick)
|
||||
|
||||
# OCaml
|
||||
set(OCAML_ROOT "/usr/lib/ocaml")
|
||||
target_include_directories(${PROJECT_NAME} PRIVATE ${OCAML_ROOT})
|
||||
target_link_directories(${PROJECT_NAME} PRIVATE ${OCAML_ROOT} ${CMAKE_SOURCE_DIR}/../../_build)
|
||||
set(OCAML_ROOTS "/usr/lib/ocaml" ${CMAKE_SOURCE_DIR}/../../_opam/lib/ocaml)
|
||||
target_include_directories(${PROJECT_NAME} PRIVATE ${OCAML_ROOTS})
|
||||
target_link_directories(${PROJECT_NAME} PRIVATE ${OCAML_ROOTS} ${CMAKE_SOURCE_DIR}/../../_build)
|
||||
target_link_libraries(${PROJECT_NAME} PRIVATE oboycore m dl asmrun)
|
||||
|
|
|
@ -16,13 +16,7 @@ int main(int argc, char *argv[])
|
|||
qmlRegisterType<OBoy>("com.oboy.oboy", 1, 0, "OBoy");
|
||||
|
||||
QQmlApplicationEngine engine;
|
||||
const QUrl url(QStringLiteral("qrc:/main.qml"));
|
||||
QObject::connect(&engine, &QQmlApplicationEngine::objectCreated,
|
||||
&app, [url](QObject *obj, const QUrl &objUrl) {
|
||||
if (!obj && url == objUrl)
|
||||
QCoreApplication::exit(-1);
|
||||
}, Qt::QueuedConnection);
|
||||
engine.load(url);
|
||||
engine.load(QUrl(QStringLiteral("qrc:/main.qml")));
|
||||
|
||||
caml_main(argv);
|
||||
|
||||
|
|
Loading…
Reference in a new issue