Skip to content
Permalink
Browse files

Moved all the console files into own directory

  • Loading branch information
slarosa committed Nov 1, 2012
1 parent dbea359 commit 6abe8611f49a61a166b6e98e0f73e0855547b0b6
@@ -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)
@@ -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}")

File renamed without changes.
@@ -40,15 +40,15 @@ def __init__(self, parent):
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:
lang = i[0:5]
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

File renamed without changes.
@@ -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)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 6abe861

Please sign in to comment.
You can’t perform that action at this time.