Skip to content
Permalink
Browse files

Revert most Mac hacks for testing in favor of 4cfc365

- Cleanup of old .qml svg paths to matches other test data .qml
  • Loading branch information
dakcarto committed Aug 26, 2012
1 parent eda71f5 commit 096badd94fd28b0c8e7b957b0582a79d83053819
@@ -463,17 +463,14 @@ SET (CMAKE_LIBRARY_OUTPUT_DIRECTORY ${QGIS_OUTPUT_DIRECTORY}/${QGIS_LIB_SUBDIR})
# if run from the build directory QGIS will detect it and alter the paths
FILE(WRITE ${QGIS_OUTPUT_DIRECTORY}/${QGIS_BIN_SUBDIR}/path.txt "${CMAKE_SOURCE_DIR}\n${QGIS_OUTPUT_DIRECTORY}")

# symlink provider plugins dir for Mac unit tests
# symlink extra provider plugin frameworks for Mac unit tests
IF (APPLE AND ENABLE_TESTS)
EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E create_symlink
"${CMAKE_CURRENT_BINARY_DIR}/Plugins"
"${CMAKE_CURRENT_BINARY_DIR}/output/Plugins")
"${CMAKE_BINARY_DIR}/Plugins/qgis/qgisgrass.framework"
"${CMAKE_BINARY_DIR}/output/lib/qgisgrass.framework")
EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E create_symlink
"${CMAKE_CURRENT_BINARY_DIR}/Plugins/qgis/qgisgrass.framework"
"${CMAKE_CURRENT_BINARY_DIR}/output/lib/qgisgrass.framework")
EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E create_symlink
"${CMAKE_CURRENT_BINARY_DIR}/Plugins/qgis/qgissqlanyconnection.framework"
"${CMAKE_CURRENT_BINARY_DIR}/output/lib/qgissqlanyconnection.framework")
"${CMAKE_BINARY_DIR}/Plugins/qgis/qgissqlanyconnection.framework"
"${CMAKE_BINARY_DIR}/output/lib/qgissqlanyconnection.framework")
ENDIF (APPLE AND ENABLE_TESTS)

# manual page - makes sense only on unix systems
@@ -46,11 +46,6 @@ ELSE(WIN32)
MESSAGE(\"LD_LIBRARY_PATH:\$ENV{LD_LIBRARY_PATH}\")
ENDIF(WIN32)
IF(APPLE)
SET(ENV{QGIS_MAC_PKGDATA_DIR} \"${CMAKE_SOURCE_DIR}\")
SET(ENV{QGIS_MAC_SVG_DIR} \"${CMAKE_SOURCE_DIR}/images/svg\")
ENDIF(APPLE)
MESSAGE(\"PYTHONPATH:\$ENV{PYTHONPATH}\")
MESSAGE(STATUS \"Running ${PYTHON_EXECUTABLE} ${loc} ${wo_semicolon}\")
EXECUTE_PROCESS(
@@ -1,8 +1,4 @@
IF (ENABLE_TESTS)
IF (APPLE)
# override default data path, otherwise looks for Resources in app bundle
SET (QGIS_DATA_SUBDIR "${CMAKE_SOURCE_DIR}/resources")
ENDIF (APPLE)
ADD_SUBDIRECTORY(src)
ADD_SUBDIRECTORY(bench)
ENDIF (ENABLE_TESTS)
@@ -69,19 +69,6 @@ def getQgisTestApp():
myGuiFlag = True # All test will run qgis in gui mode

QGISAPP = QgsApplication(sys.argv, myGuiFlag)

if sys.platform.startswith('darwin'):
# override resource paths, otherwise looks for Resources in app
if 'QGIS_MAC_PKGDATA_DIR' in os.environ:
myPkgPath = os.environ['QGIS_MAC_PKGDATA_DIR']
QGISAPP.setPkgDataPath(myPkgPath)
if 'QGIS_MAC_SVG_DIR' in os.environ:
mySVGPath = os.environ['QGIS_MAC_SVG_DIR']
mySVGPaths = QGISAPP.svgPaths()
# doesn't get rid of incorrect path, just adds correct one
mySVGPaths.prepend(mySVGPath)
QGISAPP.setDefaultSvgPaths(mySVGPaths)

QGISAPP.initQgis()
s = QGISAPP.showSettings()
print s
@@ -30,7 +30,7 @@
<lowervalue>B52</lowervalue>
<uppervalue></uppervalue>
<label></label>
<pointsymbol>svg:/Applications/qgis0.9.2.app/Contents/MacOS/share/qgis/svg/gpsicons/plane.svg</pointsymbol>
<pointsymbol>svg:/gpsicons/plane.svg</pointsymbol>
<pointsize>6</pointsize>
<rotationclassificationfield>1</rotationclassificationfield>
<scaleclassificationfield>2</scaleclassificationfield>
@@ -45,7 +45,7 @@
<lowervalue>Biplane</lowervalue>
<uppervalue></uppervalue>
<label></label>
<pointsymbol>svg:/Applications/qgis0.9.2.app/Contents/MacOS/share/qgis/svg/gpsicons/plane_orange.svg</pointsymbol>
<pointsymbol>svg:/gpsicons/plane_orange.svg</pointsymbol>
<pointsize>5</pointsize>
<rotationclassificationfield>1</rotationclassificationfield>
<scaleclassificationfield>2</scaleclassificationfield>
@@ -60,7 +60,7 @@
<lowervalue>Jet</lowervalue>
<uppervalue></uppervalue>
<label></label>
<pointsymbol>svg:/Applications/qgis0.9.2.app/Contents/MacOS/share/qgis/svg/gpsicons/plane.svg</pointsymbol>
<pointsymbol>svg:/gpsicons/plane.svg</pointsymbol>
<pointsize>5</pointsize>
<rotationclassificationfield>1</rotationclassificationfield>
<scaleclassificationfield>2</scaleclassificationfield>

0 comments on commit 096badd

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