File tree Expand file tree Collapse file tree 6 files changed +37
-12
lines changed Expand file tree Collapse file tree 6 files changed +37
-12
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ SET (PYTHON_OUTPUT_DIRECTORY ${QGIS_OUTPUT_DIRECTORY}/python)
22
33ADD_SUBDIRECTORY (plugins)
44ADD_SUBDIRECTORY (qsci_apis)
5+ ADD_SUBDIRECTORY (console)
56
67IF (WITH_PYSPATIALITE)
78 ADD_SUBDIRECTORY (pyspatialite)
@@ -150,7 +151,7 @@ ADD_CUSTOM_TARGET(pyutils ALL)
150151INSTALL (FILES ${PY_FILES} DESTINATION "${QGIS_PYTHON_DIR} " )
151152
152153# stage to output to make available when QGIS is run from build directory
153- FOREACH (pyfile ${PY_FILES} ${PYUI_FILES} )
154+ FOREACH (pyfile ${PY_FILES} )
154155 ADD_CUSTOM_COMMAND (TARGET pyutils
155156 POST_BUILD
156157 COMMAND ${CMAKE_COMMAND} -E copy ${pyfile} "${QGIS_PYTHON_OUTPUT_DIRECTORY} "
@@ -159,8 +160,6 @@ FOREACH(pyfile ${PY_FILES} ${PYUI_FILES})
159160 )
160161ENDFOREACH (pyfile)
161162
162- ADD_SUBDIRECTORY (console)
163-
164163# Byte-compile staged PyQGIS utilities
165164IF (WITH_PY_COMPILE)
166165 ADD_CUSTOM_TARGET (pycompile_pyutils ALL
Original file line number Diff line number Diff line change 11ADD_SUBDIRECTORY (console_help)
22
3- SET (PYTHON_OUTPUT_DIRECTORY ${QGIS_OUTPUT_DIRECTORY } /python)
4- SET (QGIS_PYTHON_DIR ${PYTHON_SITE_PACKAGES_DIR} /qgis )
3+ SET (QGIS_CONSOLE_DIR ${QGIS_DATA_DIR } /python/console )
4+ SET (PYTHON_OUTPUT_DIRECTORY ${QGIS_OUTPUT_DIRECTORY} /python )
55
6- # PyQGIS console files to copy to staging or install
76SET (PY_CONSOLE_FILES
87 console.py
98 console_sci.py
109 console_help.py
1110 console_settings.py
1211 console_output.py
12+ __init__.py
1313)
1414
1515FILE (GLOB UI_FILES *.ui)
16- PYQT4_WRAP_UI(PYUI_FILES ${UI_FILES} ) # returns absolute paths
16+ PYQT4_WRAP_UI(PYUI_FILES ${UI_FILES} )
1717ADD_CUSTOM_TARGET (pyconsole ALL DEPENDS ${PYUI_FILES} )
1818
19- # stage to output to make available when QGIS is run from build directory
2019FOREACH (pyfile ${PY_CONSOLE_FILES} ${PYUI_FILES} )
2120 ADD_CUSTOM_COMMAND (TARGET pyconsole
2221 POST_BUILD
23- COMMAND ${CMAKE_COMMAND} -E copy ${pyfile} "${QGIS_PYTHON_OUTPUT_DIRECTORY} "
22+ COMMAND ${CMAKE_COMMAND} -E make_directory ${PYTHON_OUTPUT_DIRECTORY} /console
23+ COMMAND ${CMAKE_COMMAND} -E copy ${pyfile} ${PYTHON_OUTPUT_DIRECTORY} /console
2424 WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
2525 DEPENDS ${pyfile}
2626 )
2727ENDFOREACH (pyfile)
2828
29- INSTALL (FILES ${PY_CONSOLE_FILES} ${PYUI_FILES} DESTINATION "${QGIS_PYTHON_DIR } " )
29+ INSTALL (FILES ${PY_CONSOLE_FILES} ${PYUI_FILES} DESTINATION "${QGIS_CONSOLE_DIR } " )
3030
Original file line number Diff line number Diff line change 1+ # -*- coding: utf-8 -*-
2+
3+ """
4+ ***************************************************************************
5+ __init__.py
6+ ---------------------
7+ Date : September 2012
8+ Copyright : (C) 2012 by Salvatore Larosa
9+ Email : lrssvtml at gmail dot com
10+ ***************************************************************************
11+ * *
12+ * This program is free software; you can redistribute it and/or modify *
13+ * it under the terms of the GNU General Public License as published by *
14+ * the Free Software Foundation; either version 2 of the License, or *
15+ * (at your option) any later version. *
16+ * *
17+ ***************************************************************************
18+ """
19+
20+ __author__ = 'Salvatore Larosa'
21+ __date__ = 'September 2012'
22+ __copyright__ = '(C) 2012, Salvatore Larosa'
23+ # This will get replaced with a git SHA1 when you do a git archive
24+ __revision__ = '$Format:%H$'
25+
26+ from console import show_console
Original file line number Diff line number Diff line change @@ -1093,8 +1093,8 @@ void QgisApp::showPythonDialog()
10931093 return ;
10941094
10951095 bool res = mPythonUtils ->runStringUnsafe (
1096- " import qgis. console\n "
1097- " qgis. console.show_console()\n " , false );
1096+ " import console\n "
1097+ " console.show_console()\n " , false );
10981098
10991099 if ( !res )
11001100 {
You can’t perform that action at this time.
0 commit comments