parent
f13034ecc2
commit
c6b13dd919
@ -1,38 +1,61 @@
|
||||
cmake_minimum_required(VERSION 3.22)
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
|
||||
project(lubuntu-installer-prompt VERSION 1.0.0 LANGUAGES CXX)
|
||||
project(lubuntu-installer-prompt VERSION 0.1 LANGUAGES CXX)
|
||||
|
||||
set(CMAKE_AUTOUIC ON)
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_AUTORCC ON)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
# Find the required Qt and KDE packages
|
||||
find_package(ECM REQUIRED NO_MODULE)
|
||||
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
|
||||
find_package(Qt5 REQUIRED COMPONENTS Core Widgets Network)
|
||||
find_package(QT NAMES Qt5 REQUIRED COMPONENTS Core Widgets Network LinguistTools)
|
||||
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Core Widgets Network LinguistTools)
|
||||
find_package(KF5 REQUIRED COMPONENTS NetworkManagerQt Notifications)
|
||||
|
||||
# Set the CMAKE variables for automatic code generation with Qt
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_AUTORCC ON)
|
||||
set(CMAKE_AUTOUIC ON)
|
||||
set(CMAKE_CXX_STANDARD 23)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
set(TS_FILES
|
||||
src/translations/lubuntu-installer-prompt_en_US.ts
|
||||
src/translations/lubuntu-installer-prompt_es_ES.ts
|
||||
src/translations/lubuntu-installer-prompt_zh_CN.ts
|
||||
)
|
||||
|
||||
# Specify project source files
|
||||
include_directories(${PROJECT_SOURCE_DIR}/src)
|
||||
file(GLOB PROJECT_SOURCES
|
||||
"${PROJECT_SOURCE_DIR}/src/*.cpp"
|
||||
"${PROJECT_SOURCE_DIR}/src/*.h"
|
||||
"${PROJECT_SOURCE_DIR}/src/*.ui"
|
||||
set(PROJECT_SOURCES
|
||||
src/main.cpp
|
||||
src/installerprompt.cpp
|
||||
src/installerprompt.h
|
||||
src/installerprompt.ui
|
||||
src/resource.qrc
|
||||
)
|
||||
|
||||
# Add executable target with project source files
|
||||
add_executable(lubuntu-installer-prompt ${PROJECT_SOURCES} src/resource.qrc)
|
||||
set(TRANSLATION_RESOURCES "src/translations.qrc")
|
||||
|
||||
configure_file(${TRANSLATION_RESOURCES} translations.qrc COPYONLY)
|
||||
qt5_add_translation(QM_FILES ${TS_FILES})
|
||||
qt5_add_resources(QM_RESOURCES ${CMAKE_CURRENT_BINARY_DIR}/translations.qrc)
|
||||
|
||||
# Link libraries with the executable target
|
||||
target_link_libraries(lubuntu-installer-prompt Qt5::Widgets Qt5::Network KF5::NetworkManagerQt KF5::Notifications)
|
||||
target_link_libraries(lubuntu-installer-prompt Qt5::Widgets KF5::NetworkManagerQt KF5::Notifications)
|
||||
add_custom_target(translations ALL DEPENDS ${QM_FILES})
|
||||
|
||||
add_executable(lubuntu-installer-prompt
|
||||
${PROJECT_SOURCES}
|
||||
${QM_RESOURCES}
|
||||
)
|
||||
|
||||
install(TARGETS lubuntu-installer-prompt DESTINATION bin)
|
||||
add_dependencies(lubuntu-installer-prompt translations)
|
||||
|
||||
target_link_libraries(lubuntu-installer-prompt PRIVATE Qt${QT_VERSION_MAJOR}::Widgets Qt5::Network KF5::NetworkManagerQt KF5::Notifications)
|
||||
|
||||
install(TARGETS lubuntu-installer-prompt
|
||||
BUNDLE DESTINATION .
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
)
|
||||
install(PROGRAMS "scripts/lubuntu-installer" DESTINATION libexec)
|
||||
install(PROGRAMS "scripts/start-lubuntu-live-env" DESTINATION bin)
|
||||
install(FILES "img/background.png" DESTINATION share/lubuntu/installer-prompt)
|
||||
install(FILES "lubuntu-live-environment.desktop" DESTINATION share/xsessions)
|
||||
install(CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink /etc/xdg/xdg-Lubuntu /etc/xdg/xdg-lubuntu-live-environment)")
|
||||
|
||||
if(QT_VERSION_MAJOR EQUAL 6)
|
||||
qt_finalize_executable(lubuntu-installer-prompt)
|
||||
endif()
|
||||
|
@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
langList=('en_US' 'es_ES' 'zh_CN')
|
||||
for i in ${langList[@]}; do
|
||||
targetFile="src/translations/lubuntu-installer-prompt_$i.ts"
|
||||
if [ ! -e $targetFile ]; then
|
||||
echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>" > $targetFile
|
||||
echo "<!DOCTYPE TS>" >> $targetFile
|
||||
echo "<TS version=\"2.1\" language=\"$i\"></TS>" >> $targetFile
|
||||
fi
|
||||
done
|
||||
lupdate src/*.cpp src/*.h src/*.ui -ts src/translations/*
|
@ -0,0 +1,7 @@
|
||||
<RCC>
|
||||
<qresource prefix="/i18n">
|
||||
<file alias="en_US">lubuntu-installer-prompt_en_US.qm</file>
|
||||
<file alias="es_ES">lubuntu-installer-prompt_es_ES.qm</file>
|
||||
<file alias="zh_CN">lubuntu-installer-prompt_zh_CN.qm</file>
|
||||
</qresource>
|
||||
</RCC>
|
@ -0,0 +1,123 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1" language="en_US">
|
||||
<context>
|
||||
<name>InstallerPrompt</name>
|
||||
<message>
|
||||
<location filename="../installerprompt.ui" line="20"/>
|
||||
<source>Try or Install Lubuntu</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../installerprompt.ui" line="207"/>
|
||||
<source>Select Your Language:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../installerprompt.ui" line="284"/>
|
||||
<source>Select a Wi-Fi Network:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../installerprompt.ui" line="329"/>
|
||||
<location filename="../installerprompt.cpp" line="186"/>
|
||||
<source>Connect</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../installerprompt.ui" line="371"/>
|
||||
<source>(For advanced network configuration, select "Try Lubuntu")</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../installerprompt.ui" line="466"/>
|
||||
<source><html><head/><body><p><span style=" font-size:12pt;">Try Lubuntu without installing it on your system. Allows you to use programs, browse the Web, and even temporarily install apps without modifying your system. Changes made within the live environment will be lost when the computer shuts down.</span></p></body></html></source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../installerprompt.ui" line="480"/>
|
||||
<source> Try Lubuntu</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../installerprompt.ui" line="542"/>
|
||||
<source><html><head/><body><p><span style=" font-size:12pt;">Install Lubuntu onto your system. You can install Lubuntu by itself, or alongside an existing operating system.</span></p></body></html></source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../installerprompt.ui" line="553"/>
|
||||
<source> Install Lubuntu</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../installerprompt.ui" line="684"/>
|
||||
<source>Connection Status: </source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../installerprompt.cpp" line="28"/>
|
||||
<source>Error</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../installerprompt.cpp" line="28"/>
|
||||
<source>Background image cannot be loaded.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../installerprompt.cpp" line="81"/>
|
||||
<source>Not Connected</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../installerprompt.cpp" line="86"/>
|
||||
<source>Connected</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../installerprompt.cpp" line="90"/>
|
||||
<source>Connecting...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../installerprompt.cpp" line="94"/>
|
||||
<source>Disconnecting...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../installerprompt.cpp" line="98"/>
|
||||
<source>Unknown Status</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../installerprompt.cpp" line="179"/>
|
||||
<source>Enter Wi-Fi Password for %1:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../installerprompt.cpp" line="182"/>
|
||||
<source>Wrong Wi-Fi password for %1. Try again:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../installerprompt.cpp" line="237"/>
|
||||
<source>Connection Failed</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../installerprompt.cpp" line="237"/>
|
||||
<source>Unable to connect to the network.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../installerprompt.cpp" line="303"/>
|
||||
<source>WiFi Not Available</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../installerprompt.cpp" line="303"/>
|
||||
<source>No WiFi devices were found on this system.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
@ -0,0 +1,123 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1" language="es_ES">
|
||||
<context>
|
||||
<name>InstallerPrompt</name>
|
||||
<message>
|
||||
<location filename="../installerprompt.ui" line="20"/>
|
||||
<source>Try or Install Lubuntu</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../installerprompt.ui" line="207"/>
|
||||
<source>Select Your Language:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../installerprompt.ui" line="284"/>
|
||||
<source>Select a Wi-Fi Network:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../installerprompt.ui" line="329"/>
|
||||
<location filename="../installerprompt.cpp" line="186"/>
|
||||
<source>Connect</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../installerprompt.ui" line="371"/>
|
||||
<source>(For advanced network configuration, select "Try Lubuntu")</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../installerprompt.ui" line="466"/>
|
||||
<source><html><head/><body><p><span style=" font-size:12pt;">Try Lubuntu without installing it on your system. Allows you to use programs, browse the Web, and even temporarily install apps without modifying your system. Changes made within the live environment will be lost when the computer shuts down.</span></p></body></html></source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../installerprompt.ui" line="480"/>
|
||||
<source> Try Lubuntu</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../installerprompt.ui" line="542"/>
|
||||
<source><html><head/><body><p><span style=" font-size:12pt;">Install Lubuntu onto your system. You can install Lubuntu by itself, or alongside an existing operating system.</span></p></body></html></source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../installerprompt.ui" line="553"/>
|
||||
<source> Install Lubuntu</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../installerprompt.ui" line="684"/>
|
||||
<source>Connection Status: </source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../installerprompt.cpp" line="28"/>
|
||||
<source>Error</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../installerprompt.cpp" line="28"/>
|
||||
<source>Background image cannot be loaded.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../installerprompt.cpp" line="81"/>
|
||||
<source>Not Connected</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../installerprompt.cpp" line="86"/>
|
||||
<source>Connected</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../installerprompt.cpp" line="90"/>
|
||||
<source>Connecting...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../installerprompt.cpp" line="94"/>
|
||||
<source>Disconnecting...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../installerprompt.cpp" line="98"/>
|
||||
<source>Unknown Status</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../installerprompt.cpp" line="179"/>
|
||||
<source>Enter Wi-Fi Password for %1:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../installerprompt.cpp" line="182"/>
|
||||
<source>Wrong Wi-Fi password for %1. Try again:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../installerprompt.cpp" line="237"/>
|
||||
<source>Connection Failed</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../installerprompt.cpp" line="237"/>
|
||||
<source>Unable to connect to the network.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../installerprompt.cpp" line="303"/>
|
||||
<source>WiFi Not Available</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../installerprompt.cpp" line="303"/>
|
||||
<source>No WiFi devices were found on this system.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
@ -0,0 +1,123 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1" language="zh_CN">
|
||||
<context>
|
||||
<name>InstallerPrompt</name>
|
||||
<message>
|
||||
<location filename="../installerprompt.ui" line="20"/>
|
||||
<source>Try or Install Lubuntu</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../installerprompt.ui" line="207"/>
|
||||
<source>Select Your Language:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../installerprompt.ui" line="284"/>
|
||||
<source>Select a Wi-Fi Network:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../installerprompt.ui" line="329"/>
|
||||
<location filename="../installerprompt.cpp" line="186"/>
|
||||
<source>Connect</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../installerprompt.ui" line="371"/>
|
||||
<source>(For advanced network configuration, select "Try Lubuntu")</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../installerprompt.ui" line="466"/>
|
||||
<source><html><head/><body><p><span style=" font-size:12pt;">Try Lubuntu without installing it on your system. Allows you to use programs, browse the Web, and even temporarily install apps without modifying your system. Changes made within the live environment will be lost when the computer shuts down.</span></p></body></html></source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../installerprompt.ui" line="480"/>
|
||||
<source> Try Lubuntu</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../installerprompt.ui" line="542"/>
|
||||
<source><html><head/><body><p><span style=" font-size:12pt;">Install Lubuntu onto your system. You can install Lubuntu by itself, or alongside an existing operating system.</span></p></body></html></source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../installerprompt.ui" line="553"/>
|
||||
<source> Install Lubuntu</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../installerprompt.ui" line="684"/>
|
||||
<source>Connection Status: </source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../installerprompt.cpp" line="28"/>
|
||||
<source>Error</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../installerprompt.cpp" line="28"/>
|
||||
<source>Background image cannot be loaded.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../installerprompt.cpp" line="81"/>
|
||||
<source>Not Connected</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../installerprompt.cpp" line="86"/>
|
||||
<source>Connected</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../installerprompt.cpp" line="90"/>
|
||||
<source>Connecting...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../installerprompt.cpp" line="94"/>
|
||||
<source>Disconnecting...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../installerprompt.cpp" line="98"/>
|
||||
<source>Unknown Status</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../installerprompt.cpp" line="179"/>
|
||||
<source>Enter Wi-Fi Password for %1:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../installerprompt.cpp" line="182"/>
|
||||
<source>Wrong Wi-Fi password for %1. Try again:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../installerprompt.cpp" line="237"/>
|
||||
<source>Connection Failed</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../installerprompt.cpp" line="237"/>
|
||||
<source>Unable to connect to the network.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../installerprompt.cpp" line="303"/>
|
||||
<source>WiFi Not Available</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../installerprompt.cpp" line="303"/>
|
||||
<source>No WiFi devices were found on this system.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
Loading…
Reference in new issue