]> dgit.raspbian.org Git - nextcloud-desktop.git/commitdiff
OS X: Allow ampersand in APPLICATION_NAME #4657
authorMarkus Goetz <markus@woboq.com>
Wed, 13 Apr 2016 13:40:18 +0000 (15:40 +0200)
committerMarkus Goetz <markus@woboq.com>
Fri, 15 Apr 2016 09:30:49 +0000 (11:30 +0200)
CMakeLists.txt
admin/osx/macosx.pkgproj
cmake/modules/MacOSXBundleInfo.plist.in
csync/src/CMakeLists.txt
shell_integration/MacOSX/CMakeLists.txt

index d8efeb675f3e8f0f21ebdb1678016c9e8fad152a..ed1ce6829a939641ec9064b24fd27c0cf65ef0bc 100644 (file)
@@ -20,6 +20,11 @@ if (NOT DEFINED APPLICATION_SHORTNAME)
      set ( APPLICATION_SHORTNAME ${APPLICATION_NAME} )
 endif()
 
+# For usage in XML files we preprocess
+string(REPLACE "&" "&amp;" APPLICATION_NAME_XML_ESCAPED "${APPLICATION_NAME}")
+string(REPLACE "<" "&lt;" APPLICATION_NAME_XML_ESCAPED "${APPLICATION_NAME_XML_ESCAPED}")
+string(REPLACE ">" "&gt;" APPLICATION_NAME_XML_ESCAPED "${APPLICATION_NAME_XML_ESCAPED}")
+
 set(PACKAGE "${APPLICATION_SHORTNAME}-client")
 set( CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules )
 
index a990c81b1ffa0e9a2af9babe5e273817ce2ae99c..9b9b891bc8c2ed3ad7340b2e15473911c9518286 100644 (file)
                                <key>IDENTIFIER</key>
                                <string>@APPLICATION_REV_DOMAIN_INSTALLER@</string>
                                <key>NAME</key>
-                               <string>@APPLICATION_NAME@</string>
+                               <string>@APPLICATION_NAME_XML_ESCAPED@</string>
                                <key>OVERWRITE_PERMISSIONS</key>
                                <false/>
                                <key>VERSION</key>
                                                <key>LANGUAGE</key>
                                                <string>English</string>
                                                <key>VALUE</key>
-                                               <string>@APPLICATION_NAME@ Client</string>
+                                               <string>@APPLICATION_NAME_XML_ESCAPED@ Client</string>
                                        </dict>
                                </array>
                        </dict>
                                </dict>
                        </array>
                        <key>NAME</key>
-                       <string>@APPLICATION_NAME@ Installer</string>
+                       <string>@APPLICATION_NAME_XML_ESCAPED@ Installer</string>
                        <key>REFERENCE_FOLDER_PATH</key>
                        <string>@CMAKE_INSTALL_DIR@</string>
                </dict>
index 63e135ca5dbde2300fbd39a1ee071cb94249fcab..5d8fd0e1097fe82c05bc3f0baba5577bfaea74f3 100644 (file)
@@ -17,7 +17,7 @@
         <key>CFBundleInfoDictionaryVersion</key>
         <string>6.0</string>
         <key>CFBundleLongVersionString</key>
-        <string>@APPLICATION_NAME@ @MIRALL_VERSION_STRING@</string>
+        <string>@APPLICATION_NAME_XML_ESCAPED@ @MIRALL_VERSION_STRING@</string>
         <key>CFBundlePackageType</key>
         <string>APPL</string>
         <key>CFBundleSignature</key>
index 2e1d361b48d68bcc7a23c36ef9a9fecbd85b9a74..6f5fc60953940d85d2f0aaf8f8e5901cecf1c4a4 100644 (file)
@@ -128,10 +128,4 @@ else()
   )
 endif()
 
-# INSTALL(
-#   FILES
-#     ${csync_HDRS}
-#   DESTINATION
-#     ${INCLUDE_INSTALL_DIR}/${APPLICATION_NAME}
-# )
 
index a5bcd67bad5e0e223506f5e803ffe18f6264d615..83181d316e9af215643fa66c7f937d738a36e6ad 100644 (file)
@@ -18,7 +18,7 @@ add_custom_target( mac_overlayplugin ALL
     xcodebuild -project ${CMAKE_SOURCE_DIR}/shell_integration/MacOSX/OwnCloudFinderSync/OwnCloudFinderSync.xcodeproj
         -target FinderSyncExt -configuration Release SYMROOT=${CMAKE_CURRENT_BINARY_DIR}
         OC_OEM_SHARE_ICNS=${OC_OEM_SHARE_ICNS}
-        OC_APPLICATION_NAME=${APPLICATION_NAME}
+        OC_APPLICATION_NAME="${APPLICATION_NAME}"
         OC_APPLICATION_REV_DOMAIN=${APPLICATION_REV_DOMAIN}
         OC_SOCKETAPI_TEAM_IDENTIFIER_PREFIX=${SOCKETAPI_TEAM_IDENTIFIER_PREFIX}
     COMMENT building Mac Overlay icons)