Skip to content

Commit

Permalink
renamed qml module
Browse files Browse the repository at this point in the history
  • Loading branch information
Odizinne committed Feb 22, 2025
1 parent 6e96d19 commit bd5de93
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 33 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/build-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ jobs:
shell: pwsh
run: |
cd build/release
Rename-Item -Path "appRetr0Mine.exe" -NewName "Retr0Mine.exe"
Get-ChildItem -Exclude Retr0Mine.exe | Remove-Item -Recurse -Force
- name: Copy Steam API DLL
Expand Down Expand Up @@ -128,7 +127,7 @@ jobs:
mkdir -p AppDir/usr/lib
mkdir -p AppDir/usr/share/applications
mkdir -p AppDir/usr/share/icons/hicolor/256x256/apps
mv build/appRetr0Mine AppDir/usr/bin/Retr0Mine
mv build/Retr0Mine AppDir/usr/bin/Retr0Mine
#cp Dependencies/steam/lib/linux64/libsteam_api.so AppDir/usr/lib/
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/steam-builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ jobs:
shell: pwsh
run: |
cd build/release
Rename-Item -Path "appRetr0Mine.exe" -NewName "Retr0Mine.exe"
Get-ChildItem -Exclude Retr0Mine.exe | Remove-Item -Recurse -Force
- name: Copy Steam API DLL
Expand Down Expand Up @@ -111,7 +110,7 @@ jobs:
mkdir -p AppDir/usr/lib
mkdir -p AppDir/usr/share/applications
mkdir -p AppDir/usr/share/icons/hicolor/256x256/apps
mv build/appRetr0Mine AppDir/usr/bin/Retr0Mine
mv build/Retr0Mine AppDir/usr/bin/Retr0Mine
#cp lib/steam/linux64/libsteam_api.so AppDir/usr/lib/
Expand Down
39 changes: 12 additions & 27 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_DISABLE_FIND_PACKAGE_WrapVulkanHeaders TRUE)

find_package(Qt6 REQUIRED COMPONENTS
Core
Gui
Expand All @@ -15,26 +14,21 @@ find_package(Qt6 REQUIRED COMPONENTS
QuickControls2
LinguistTools
)

qt_standard_project_setup(REQUIRES 6.5)

qt_policy(SET QTP0004 NEW)

set(SOURCES
src/main.cpp
src/gametimer.cpp
src/gamecore.cpp
src/gamelogic.cpp
src/steamintegration.cpp
)

set(HEADERS
include/gametimer.h
include/gamecore.h
include/gamelogic.h
include/steamintegration.h
)

set(QML_FILES
qml/Cell.qml
qml/SettingsPage.qml
Expand All @@ -53,19 +47,16 @@ set(QML_FILES
qml/GameAudio.qml
qml/GameView.qml
)

set(QML_SINGLETONS
qml/GameSettings.qml
qml/GameConstants.qml
qml/GameState.qml
qml/SaveManager.qml
)

set_source_files_properties(${QML_SINGLETONS}
PROPERTIES QT_QML_SINGLETON_TYPE TRUE
)

add_executable(appRetr0Mine
add_executable(${CMAKE_PROJECT_NAME}
${SOURCES}
${HEADERS}
resources/icons/icons.qrc
Expand All @@ -74,51 +65,45 @@ add_executable(appRetr0Mine
resources/fonts/fonts.qrc
resources/appicon.rc
)

qt_add_qml_module(appRetr0Mine
URI Retr0Mine
qt_add_qml_module(${CMAKE_PROJECT_NAME}
URI net.odizinne.retr0mine
VERSION 1.0
QML_FILES ${QML_FILES} ${QML_SINGLETONS}
)

target_include_directories(appRetr0Mine PRIVATE
target_include_directories(${CMAKE_PROJECT_NAME} PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/include
${CMAKE_CURRENT_SOURCE_DIR}/include/steam
)

target_link_libraries(appRetr0Mine PRIVATE
target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE
Qt6::Core
Qt6::Gui
Qt6::Qml
Qt6::Quick
Qt6::Multimedia
Qt6::QuickControls2
)

qt_add_translations(appRetr0Mine
qt_add_translations(${CMAKE_PROJECT_NAME}
TS_FILES
translations/retr0mine_en.ts
translations/retr0mine_fr.ts
RESOURCE_PREFIX "/translations"
)

#add_dependencies(appRetr0Mine update_translations)

#add_dependencies(${CMAKE_PROJECT_NAME} update_translations)
if(WIN32)
target_compile_definitions(appRetr0Mine PRIVATE
target_compile_definitions(${CMAKE_PROJECT_NAME} PRIVATE
*CRT*SECURE_NO_WARNINGS
)
target_compile_options(appRetr0Mine PRIVATE
target_compile_options(${CMAKE_PROJECT_NAME} PRIVATE
/wd4828
)
target_link_libraries(appRetr0Mine PRIVATE
target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/lib/steam/win64/steam_api64.lib
)
set_target_properties(appRetr0Mine PROPERTIES
set_target_properties(${CMAKE_PROJECT_NAME} PROPERTIES
WIN32_EXECUTABLE TRUE
)
elseif(UNIX AND NOT APPLE)
target_link_libraries(appRetr0Mine PRIVATE
target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/lib/steam/linux64/libsteam_api.so
)
endif()
1 change: 0 additions & 1 deletion qml/WelcomePage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
import QtQuick.Controls.impl
import Retr0Mine

Popup {
id: control
Expand Down
2 changes: 1 addition & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ int main(int argc, char *argv[])

gameCore->init();

engine.loadFromModule("Retr0Mine", "Main");
engine.loadFromModule("net.odizinne.retr0mine", "Main");

return app.exec();
}

0 comments on commit bd5de93

Please sign in to comment.