mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-15 00:04:00 -04:00
Merge pull request #312 from slarosa/master
Moved all the console files into own directory
This commit is contained in:
commit
c3ca2f20aa
@ -140,21 +140,14 @@ IF(WITH_QSCIAPI)
|
||||
INSTALL(FILES ${QGIS_PYTHON_API_FILE} DESTINATION "${QGIS_DATA_DIR}/python/qsci_apis")
|
||||
ENDIF(WITH_QSCIAPI)
|
||||
|
||||
# PyQGIS console and plugin utilities
|
||||
# files to copy to staging or install
|
||||
# Plugin utilities files to copy to staging or install
|
||||
SET(PY_FILES
|
||||
__init__.py
|
||||
console.py
|
||||
console_sci.py
|
||||
console_help.py
|
||||
console_settings.py
|
||||
console_output.py
|
||||
utils.py
|
||||
)
|
||||
FILE(GLOB UI_FILES *.ui)
|
||||
PYQT4_WRAP_UI(PYUI_FILES ${UI_FILES}) # returns absolute paths
|
||||
ADD_CUSTOM_TARGET(pyutils ALL DEPENDS ${PYUI_FILES})
|
||||
INSTALL(FILES ${PY_FILES} ${PYUI_FILES} DESTINATION "${QGIS_PYTHON_DIR}")
|
||||
|
||||
ADD_CUSTOM_TARGET(pyutils ALL)
|
||||
INSTALL(FILES ${PY_FILES} DESTINATION "${QGIS_PYTHON_DIR}")
|
||||
|
||||
# stage to output to make available when QGIS is run from build directory
|
||||
FOREACH(pyfile ${PY_FILES} ${PYUI_FILES})
|
||||
@ -166,7 +159,7 @@ FOREACH(pyfile ${PY_FILES} ${PYUI_FILES})
|
||||
)
|
||||
ENDFOREACH(pyfile)
|
||||
|
||||
ADD_SUBDIRECTORY(console_help)
|
||||
ADD_SUBDIRECTORY(console)
|
||||
|
||||
# Byte-compile staged PyQGIS utilities
|
||||
IF(WITH_PY_COMPILE)
|
||||
|
30
python/console/CMakeLists.txt
Normal file
30
python/console/CMakeLists.txt
Normal file
@ -0,0 +1,30 @@
|
||||
ADD_SUBDIRECTORY(console_help)
|
||||
|
||||
SET(PYTHON_OUTPUT_DIRECTORY ${QGIS_OUTPUT_DIRECTORY}/python)
|
||||
SET(QGIS_PYTHON_DIR ${PYTHON_SITE_PACKAGES_DIR}/qgis)
|
||||
|
||||
# PyQGIS console files to copy to staging or install
|
||||
SET(PY_CONSOLE_FILES
|
||||
console.py
|
||||
console_sci.py
|
||||
console_help.py
|
||||
console_settings.py
|
||||
console_output.py
|
||||
)
|
||||
|
||||
FILE(GLOB UI_FILES *.ui)
|
||||
PYQT4_WRAP_UI(PYUI_FILES ${UI_FILES}) # returns absolute paths
|
||||
ADD_CUSTOM_TARGET(pyconsole ALL DEPENDS ${PYUI_FILES})
|
||||
|
||||
# stage to output to make available when QGIS is run from build directory
|
||||
FOREACH(pyfile ${PY_CONSOLE_FILES} ${PYUI_FILES})
|
||||
ADD_CUSTOM_COMMAND(TARGET pyconsole
|
||||
POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${pyfile} "${QGIS_PYTHON_OUTPUT_DIRECTORY}"
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
DEPENDS ${pyfile}
|
||||
)
|
||||
ENDFOREACH(pyfile)
|
||||
|
||||
INSTALL(FILES ${PY_CONSOLE_FILES} ${PYUI_FILES} DESTINATION "${QGIS_PYTHON_DIR}")
|
||||
|
@ -40,7 +40,7 @@ class HelpDialog(QDialog, Ui_Help):
|
||||
self.setMaximumSize(500, 300)
|
||||
|
||||
qgisDataDir = QgsApplication.pkgDataPath()
|
||||
listFile = os.listdir(qgisDataDir + "/python/console_help/i18n")
|
||||
listFile = os.listdir(qgisDataDir + "/python/console/console_help/i18n")
|
||||
localeFullName = QSettings().value( "locale/userLocale", QVariant( "" ) ).toString()
|
||||
locale = "en_US"
|
||||
for i in listFile:
|
||||
@ -48,7 +48,7 @@ class HelpDialog(QDialog, Ui_Help):
|
||||
if localeFullName in (lang[0:2], lang):
|
||||
locale = lang
|
||||
|
||||
filename = qgisDataDir + "/python/console_help/help.htm? \
|
||||
filename = qgisDataDir + "/python/console/console_help/help.htm? \
|
||||
lang=" + locale \
|
||||
+ "&pkgDir=" + qgisDataDir
|
||||
|
@ -2,6 +2,6 @@ FILE(GLOB HTML_FILES *.htm)
|
||||
FILE(GLOB I18N_FILES i18n/*.properties)
|
||||
FILE(GLOB JS_FILES js/*.js)
|
||||
|
||||
INSTALL(FILES ${HTML_FILES} DESTINATION ${QGIS_DATA_DIR}/python/console_help)
|
||||
INSTALL(FILES ${I18N_FILES} DESTINATION ${QGIS_DATA_DIR}/python/console_help/i18n)
|
||||
INSTALL(FILES ${JS_FILES} DESTINATION ${QGIS_DATA_DIR}/python/console_help/js)
|
||||
INSTALL(FILES ${HTML_FILES} DESTINATION ${QGIS_DATA_DIR}/python/console/console_help)
|
||||
INSTALL(FILES ${I18N_FILES} DESTINATION ${QGIS_DATA_DIR}/python/console/console_help/i18n)
|
||||
INSTALL(FILES ${JS_FILES} DESTINATION ${QGIS_DATA_DIR}/python/console/console_help/js)
|
Loading…
x
Reference in New Issue
Block a user