#OTHER by cg
authorClaus Gittinger <cg@exept.de>
Wed, 05 Oct 2016 19:02:12 +0200
changeset 20545 131ea01d7c55
parent 20544 337f2148be55
child 20546 92618d700b74
#OTHER by cg class: ApplicationDefinition changed: #bc_dot_mak #bc_dot_mak_mappings #dmgImageSetupLines #make_dot_proto fixed product file names (deployed package file) if spaces,slashes etc. are in the name
ApplicationDefinition.st
--- a/ApplicationDefinition.st	Wed Oct 05 18:32:51 2016 +0200
+++ b/ApplicationDefinition.st	Wed Oct 05 19:02:12 2016 +0200
@@ -907,6 +907,7 @@
         at: 'APPLICATION' put: (self applicationName);
         at: 'NSI_FILENAME' put: self nsiFilename ;
         at: 'PRODUCT_NAME' put: (self productName);
+        at: 'PRODUCT_FILENAME' put: (self productFilename);
         at: 'CONSOLE_APPLICATION' put: (self applicationNameConsole);
         at: 'NOCONSOLE_APPLICATION' put: (self applicationNameNoConsole);
         at: 'NOCONSOLE_LOGFILE' put:(self logFilenameNoConsole);
@@ -999,13 +1000,14 @@
     "generate (unix) copy commands to generate a directory holding the dmg prototype image directory.
      This is used to generate a macOS deployable package"
 
-    |genLine product dmgVolume dmgDir appDir contentsDir macOSDir resourcesDir dirsMade|
+    |genLine product productFile dmgVolume dmgDir appDir contentsDir macOSDir resourcesDir dirsMade|
 
     product := self productName.
-
-    dmgVolume := product,'.dmg'.
-    dmgDir := product,'_dmg'.
-    appDir := dmgDir,'/',product,'.app'.
+    productFile := self productFilename.
+
+    dmgVolume := productFile,'.dmg'.
+    dmgDir := productFile,'_dmg'.
+    appDir := dmgDir,'/',productFile,'.app'.
     contentsDir := appDir,'/Contents'.
     macOSDir := contentsDir,'/MacOS'.
     resourcesDir := contentsDir,'/Resources'.
@@ -1034,7 +1036,7 @@
         s tab; nextPutLine:('@-mkdir "%1"' bindWith:appDir).  dirsMade add:appDir.
         s tab; nextPutLine:('@-mkdir "%1"' bindWith:contentsDir).  dirsMade add:contentsDir.
         s tab; nextPutLine:('@-mkdir "%1"' bindWith:macOSDir).  dirsMade add:macOSDir.
-        s tab; nextPutLine:('cp "',self applicationName,'" "',macOSDir,'/',product,'"').
+        s tab; nextPutLine:('cp "',self applicationName,'" "',macOSDir,'/',productFile,'"').
         self commonFilesToInstall_unix do:[:eachPair | genLine value:s value:'MacOS' value:eachPair].
         self additionalFilesToInstall_unix do:[:eachPair | genLine value:s value:'MacOS' value:eachPair].
     ].
@@ -1854,13 +1856,13 @@
 !!if defined(USEMINGW64)
 
 setup: $(PROJECT) postBuildCleanup %(NSI_FILENAME) 
-        $(MAKENSIS) /DOBJ_DIR=objmingw /DSETUP_NAME=%(PRODUCT_NAME)Setup64 %(NSI_FILENAME)
+        $(MAKENSIS) /DOBJ_DIR=objmingw /DSETUP_NAME=%(PRODUCT_FILENAME)Setup64 %(NSI_FILENAME)
         %(ADDITIONAL_POSTNSISRULES64)
 
 !!else
 
 setup: $(PROJECT) postBuildCleanup %(NSI_FILENAME)
-        $(MAKENSIS) /DOBJ_DIR=objbc /DSETUP_NAME=%(PRODUCT_NAME)Setup %(NSI_FILENAME)
+        $(MAKENSIS) /DOBJ_DIR=objbc /DSETUP_NAME=%(PRODUCT_FILENAME)Setup %(NSI_FILENAME)
         %(ADDITIONAL_POSTNSISRULES)
 
 !!endif
@@ -2493,13 +2495,13 @@
 #
 # for mac, a dmg is generated
 #
-setup_macosx:   "%(PRODUCT_NAME)_dmg"
-        -rm "%(PRODUCT_NAME).dmg"
-        hdiutil create -fs HFSX -layout SPUD "%(PRODUCT_NAME).dmg" -srcfolder "%(PRODUCT_NAME)_dmg" -format UDZO -volname "%(PRODUCT_NAME)" -quiet
-
-app: "%(PRODUCT_NAME)_dmg"
-
-"%(PRODUCT_NAME)_dmg": $(SUBPROJECT_LIBS) $(REQUIRED_SUPPORT_DIRS) 
+setup_macosx:   "%(PRODUCT_FILENAME)_dmg"
+        -rm "%(PRODUCT_FILENAME).dmg"
+        hdiutil create -fs HFSX -layout SPUD "%(PRODUCT_FILENAME).dmg" -srcfolder "%(PRODUCT_FILENAME)_dmg" -format UDZO -volname "%(PRODUCT_NAME)" -quiet
+
+app: "%(PRODUCT_FILENAME)_dmg"
+
+"%(PRODUCT_FILENAME)_dmg": $(SUBPROJECT_LIBS) $(REQUIRED_SUPPORT_DIRS) 
 %(DMG_IMAGE_SETUP)
 
 SOURCEFILES: %(APPLICATION)_SOURCES \