shell integration: Create a plugin for nemo out of the nautilus one.
authorKlaas Freitag <freitag@owncloud.com>
Tue, 22 Dec 2015 10:05:00 +0000 (11:05 +0100)
committerKlaas Freitag <freitag@owncloud.com>
Tue, 22 Dec 2015 10:05:00 +0000 (11:05 +0100)
shell_integration/nautilus/CMakeLists.txt

index 249892c44529d04e5b12f5b7b544159098d855ca..6c1e9f73be841c4ffb09a115cdc50af55ff9547b 100644 (file)
@@ -3,6 +3,7 @@
 if( UNIX AND NOT APPLE )
 
     configure_file(syncstate.py syncstate.py COPYONLY)
+    configure_file(syncstate.py syncstate_nemo.py COPYONLY)
 
     # Call the setupappname.sh script to set the custom app name.
     set (cmd "${CMAKE_CURRENT_SOURCE_DIR}/setappname.sh")
@@ -10,7 +11,18 @@ if( UNIX AND NOT APPLE )
                     WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
                     ERROR_VARIABLE errors OUTPUT_VARIABLE out)
 
-    install(FILES syncstate.py  DESTINATION ${DATADIR}/nautilus-python/extensions)
+    # Create a nemo plugin script from the nautilus one. 
+    # nemocmd copies the syncstate.py and performs string replacement.
+    set (nemocmd "${CMAKE_CURRENT_SOURCE_DIR}/createnemoplugin.sh")
+    execute_process(COMMAND ${nemocmd}
+                    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+                    ERROR_VARIABLE errors OUTPUT_VARIABLE out)
+
+                                        
+    install(FILES ${CMAKE_CURRENT_BINARY_DIR}/syncstate.py DESTINATION ${DATADIR}/nautilus-python/extensions)
+    install(FILES ${CMAKE_CURRENT_BINARY_DIR}/syncstate_nemo.py DESTINATION ${DATADIR}/nemo-python/extensions RENAME syncstate.py)
+    
+    
 
 endif()