瀏覽代碼

OS X: Allow ampersand in APPLICATION_NAME #4657

Markus Goetz 9 年之前
父節點
當前提交
d1649ce4df

+ 5 - 0
CMakeLists.txt

@@ -20,6 +20,11 @@ if (NOT DEFINED APPLICATION_SHORTNAME)
      set ( APPLICATION_SHORTNAME ${APPLICATION_NAME} )
 endif()
 
+# For usage in XML files we preprocess
+string(REPLACE "&" "&" 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 )
 

+ 3 - 3
admin/osx/macosx.pkgproj

@@ -497,7 +497,7 @@
 				<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>
@@ -1245,7 +1245,7 @@
 						<key>LANGUAGE</key>
 						<string>English</string>
 						<key>VALUE</key>
-						<string>@APPLICATION_NAME@ Client</string>
+						<string>@APPLICATION_NAME_XML_ESCAPED@ Client</string>
 					</dict>
 				</array>
 			</dict>
@@ -1445,7 +1445,7 @@
 				</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>

+ 1 - 1
cmake/modules/MacOSXBundleInfo.plist.in

@@ -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>

+ 0 - 6
csync/src/CMakeLists.txt

@@ -128,10 +128,4 @@ else()
   )
 endif()
 
-# INSTALL(
-#   FILES
-#     ${csync_HDRS}
-#   DESTINATION
-#     ${INCLUDE_INSTALL_DIR}/${APPLICATION_NAME}
-# )
 

+ 1 - 1
shell_integration/MacOSX/CMakeLists.txt

@@ -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)