2867 genLine := |
2867 genLine := |
2868 [:stream :dstDir :srcAndDest | |
2868 [:stream :dstDir :srcAndDest | |
2869 |sourcePattern relPath destination| |
2869 |sourcePattern relPath destination| |
2870 |
2870 |
2871 sourcePattern := srcAndDest first. |
2871 sourcePattern := srcAndDest first. |
2872 relPath := srcAndDest second. |
2872 sourcePattern = 'resources' ifFalse:[ |
2873 (relPath startsWith:'bin') ifTrue:[ |
2873 relPath := srcAndDest second. |
2874 relPath := '.',(relPath copyFrom:4) |
2874 (relPath startsWith:'bin') ifTrue:[ |
2875 ]. |
2875 relPath := '.',(relPath copyFrom:4) |
2876 destination := contentsDir,'/',dstDir,'/',relPath. |
2876 ]. |
2877 (dirsMade includes:destination) ifFalse:[ |
2877 destination := contentsDir,'/',dstDir,'/',relPath. |
2878 stream tab; nextPutLine:('@-mkdir "%1"' bindWith:destination). |
2878 (dirsMade includes:destination) ifFalse:[ |
2879 dirsMade add:destination. |
2879 stream tab; nextPutLine:('@-mkdir -p "%1"' bindWith:destination). |
2880 ]. |
2880 dirsMade add:destination. |
2881 sourcePattern notNil ifTrue:[ |
2881 ]. |
2882 stream tab; nextPutLine:('-cp -r %1 "%2"' bindWith:sourcePattern with:destination). |
2882 sourcePattern notNil ifTrue:[ |
|
2883 stream tab; nextPutLine:('-cp -r %1 "%2"' bindWith:sourcePattern with:destination). |
|
2884 ]. |
2883 ]. |
2885 ]. |
2884 ]. |
2886 ]. |
2885 |
2887 |
2886 ^ String streamContents:[:s | |
2888 ^ String streamContents:[:s | |
2887 s tab; nextPutLine:('@-rm -rf "%1"' bindWith:dmgDir). |
2889 s tab; nextPutLine:('@-rm -rf "%1"' bindWith:dmgDir). |
2898 s tab; nextPutLine:('@-mkdir "%1"' bindWith:macOSDir). dirsMade add:macOSDir. |
2900 s tab; nextPutLine:('@-mkdir "%1"' bindWith:macOSDir). dirsMade add:macOSDir. |
2899 "/ this is done indirectly, by additionalFilesToInstall_XXX |
2901 "/ this is done indirectly, by additionalFilesToInstall_XXX |
2900 "/ s tab; nextPutLine:('@-mkdir "%1"/packages' bindWith:macOSDir). dirsMade add:(macOSDir,'/packages'). |
2902 "/ s tab; nextPutLine:('@-mkdir "%1"/packages' bindWith:macOSDir). dirsMade add:(macOSDir,'/packages'). |
2901 "/ s tab; nextPutLine:('@$(MAKE) RESOURCEFILES RESOURCES="%1"' bindWith:resourcesDir). |
2903 "/ s tab; nextPutLine:('@$(MAKE) RESOURCEFILES RESOURCES="%1"' bindWith:resourcesDir). |
2902 s tab; nextPutLine:('@-mkdir "%1"' bindWith:resourcesDir). dirsMade add:resourcesDir. |
2904 s tab; nextPutLine:('@-mkdir "%1"' bindWith:resourcesDir). dirsMade add:resourcesDir. |
2903 s tab; nextPutLine:('@-mkdir "%1"' bindWith:packagesDir). dirsMade add:packagesDir. |
2905 "/ s tab; nextPutLine:('@-mkdir "%1"' bindWith:packagesDir). dirsMade add:packagesDir. |
2904 s tab; nextPutLine:('@$(MAKE) RESOURCEFILES RESOURCES="%1"' bindWith:packagesDir). |
2906 "/ s tab; nextPutLine:('@$(MAKE) RESOURCEFILES RESOURCES="%1"' bindWith:packagesDir). |
|
2907 s tab; nextPutLine:('@$(MAKE) RESOURCEFILES RESOURCES="%1"' bindWith:resourcesDir). |
2905 s tab; nextPutLine:('cp "',self applicationName,'" "',macOSDir,'/"'). |
2908 s tab; nextPutLine:('cp "',self applicationName,'" "',macOSDir,'/"'). |
2906 s tab; nextPutLine:('@-cp osx/Info.plist "',contentsDir,'/"'). |
2909 s tab; nextPutLine:('@-cp osx/Info.plist "',contentsDir,'/"'). |
2907 self osxDmgBackgroundImageFile notNil ifTrue:[ |
2910 self osxDmgBackgroundImageFile notNil ifTrue:[ |
2908 s tab; nextPutLine:('@-mkdir "%1"/.background' bindWith:dmgDir). |
2911 s tab; nextPutLine:('@-mkdir "%1"/.background' bindWith:dmgDir). |
2909 s tab; nextPutLine:('@-cp "%1" "%2"/.background/banner.png' bindWith:self osxDmgBackgroundImageFile with:dmgDir). |
2912 s tab; nextPutLine:('@-cp "%1" "%2"/.background/banner.png' bindWith:self osxDmgBackgroundImageFile with:dmgDir). |
2911 self applicationIconFileNameOSX notNil ifTrue:[ |
2914 self applicationIconFileNameOSX notNil ifTrue:[ |
2912 s tab; nextPutLine:('@-cp "osx/%1" "%2/"' bindWith:self applicationIconFileNameOSX with:resourcesDir). |
2915 s tab; nextPutLine:('@-cp "osx/%1" "%2/"' bindWith:self applicationIconFileNameOSX with:resourcesDir). |
2913 ]. |
2916 ]. |
2914 self additionalTargetDirectoriesToMakeForInstall_osx do:[:each | genLine value:s value:'MacOS' value:{ nil . each}]. |
2917 self additionalTargetDirectoriesToMakeForInstall_osx do:[:each | genLine value:s value:'MacOS' value:{ nil . each}]. |
2915 "/ s tab; nextPutLine:('@-cp osx/PkgInfo "',contentsDir,'/"'). |
2918 "/ s tab; nextPutLine:('@-cp osx/PkgInfo "',contentsDir,'/"'). |
2916 self commonFilesToInstall_unix do:[:eachPair | genLine value:s value:'MacOS' value:eachPair]. |
2919 self commonFilesToInstall_unix do:[:eachPair | |
|
2920 genLine value:s value:'MacOS' value:eachPair |
|
2921 ]. |
2917 s tab; nextPutLine:('@-rm "%1/"*WINrc.rc' bindWith:macOSDir). |
2922 s tab; nextPutLine:('@-rm "%1/"*WINrc.rc' bindWith:macOSDir). |
2918 s tab; nextPutLine:('@-rm "%1/"*WinRC.rc' bindWith:macOSDir). |
2923 s tab; nextPutLine:('@-rm "%1/"*WinRC.rc' bindWith:macOSDir). |
2919 self additionalFilesToInstall_unix do:[:eachPair | genLine value:s value:'MacOS' value:eachPair]. |
2924 self additionalFilesToInstall_unix do:[:eachPair | genLine value:s value:'MacOS' value:eachPair]. |
2920 self additionalFilesToInstall_osx do:[:eachPair | genLine value:s value:'MacOS' value:eachPair]. |
2925 self additionalFilesToInstall_osx do:[:eachPair | genLine value:s value:'MacOS' value:eachPair]. |
2921 "/ s tab; nextPutLine:('@-rm -f "%1/"*/*.sav "%1/"*/*/*.sav "%1/"*/*/*/*.sav' bindWith:macOSDir). |
2926 "/ s tab; nextPutLine:('@-rm -f "%1/"*/*.sav "%1/"*/*/*.sav "%1/"*/*/*/*.sav' bindWith:macOSDir). |
2925 s tab; nextPutLine:('@-find "%1/" -name "CSV" -exec rm -rf {} \;' bindWith:contentsDir). |
2930 s tab; nextPutLine:('@-find "%1/" -name "CSV" -exec rm -rf {} \;' bindWith:contentsDir). |
2926 s tab; nextPutLine:('@-find "%1/" -name ".cvsignore" -exec rm {} \;' bindWith:contentsDir). |
2931 s tab; nextPutLine:('@-find "%1/" -name ".cvsignore" -exec rm {} \;' bindWith:contentsDir). |
2927 ]. |
2932 ]. |
2928 |
2933 |
2929 "Modified: / 24-02-2017 / 16:37:22 / cg" |
2934 "Modified: / 24-02-2017 / 16:37:22 / cg" |
2930 "Modified: / 24-10-2018 / 20:58:37 / Claus Gittinger" |
2935 "Modified: / 25-10-2018 / 02:01:22 / Claus Gittinger" |
2931 ! |
2936 ! |
2932 |
2937 |
2933 osxPkgDistributionScript |
2938 osxPkgDistributionScript |
2934 "unfinished. |
2939 "unfinished. |
2935 generate (OSX unix) copy commands to generate a directory holding the pkg prototype image directory. |
2940 generate (OSX unix) copy commands to generate a directory holding the pkg prototype image directory. |