Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'develop'

  • Loading branch information...
commit d96f1bd4e00ddc024da2f82c1e74b69a351b448b 2 parents 83e95e8 + 6eb341d
Viktor Lidholt authored
Showing with 5,383 additions and 6,474 deletions.
  1. +3 −0  .gitmodules
  2. +1 −0  Add to Your Project/cocos2d-iphone/SSZipArchive/LICENSE
  3. +1 −0  Add to Your Project/cocos2d-iphone/SSZipArchive/SSZipArchive.h
  4. +1 −0  Add to Your Project/cocos2d-iphone/SSZipArchive/SSZipArchive.m
  5. +1 −0  Add to Your Project/cocos2d-iphone/SSZipArchive/minizip
  6. +3 −0  CHANGELOG
  7. +0 −2  CocosBuilder/CCLabelTTF/CCBPProperties.plist
  8. +112 −14 CocosBuilder/CocosBuilder.xcodeproj/project.pbxproj
  9. +0 −2  CocosBuilder/ccBuilder/CCBDocument.h
  10. +1 −6 CocosBuilder/ccBuilder/CCBDocument.m
  11. +45 −0 CocosBuilder/ccBuilder/CCBPublisher.h
  12. +287 −0 CocosBuilder/ccBuilder/CCBPublisher.m
  13. +49 −0 CocosBuilder/ccBuilder/CCBWarnings.h
  14. +83 −0 CocosBuilder/ccBuilder/CCBWarnings.m
  15. +31 −2 CocosBuilder/ccBuilder/CocosBuilderAppDelegate.h
  16. +235 −119 CocosBuilder/ccBuilder/CocosBuilderAppDelegate.m
  17. +0 −1  CocosBuilder/ccBuilder/InspectorBlockCCControl.xib
  18. +9 −7 CocosBuilder/ccBuilder/InspectorByte.xib
  19. +7 −6 CocosBuilder/ccBuilder/InspectorDegrees.xib
  20. +7 −6 CocosBuilder/ccBuilder/InspectorFloat.xib
  21. +7 −6 CocosBuilder/ccBuilder/InspectorFloatScale.xib
  22. +9 −7 CocosBuilder/ccBuilder/InspectorFloatVar.xib
  23. +7 −6 CocosBuilder/ccBuilder/InspectorInteger.xib
  24. +9 −7 CocosBuilder/ccBuilder/InspectorPoint.xib
  25. +9 −7 CocosBuilder/ccBuilder/InspectorPointLock.xib
  26. +9 −8 CocosBuilder/ccBuilder/InspectorPosition.xib
  27. +9 −7 CocosBuilder/ccBuilder/InspectorScaleLock.xib
  28. +9 −7 CocosBuilder/ccBuilder/InspectorSize.xib
  29. +2 −0  CocosBuilder/ccBuilder/PlugInExport.h
  30. +4 −2 CocosBuilder/ccBuilder/PlugInExport.m
  31. +1 −1  CocosBuilder/ccBuilder/PositionPropertySetter.m
  32. +53 −0 CocosBuilder/ccBuilder/ProjectSettings.h
  33. +152 −0 CocosBuilder/ccBuilder/ProjectSettings.m
  34. +38 −0 CocosBuilder/ccBuilder/ProjectSettingsWindow.h
  35. +99 −0 CocosBuilder/ccBuilder/ProjectSettingsWindow.m
  36. +1,213 −0 CocosBuilder/ccBuilder/ProjectSettingsWindow.xib
  37. +3 −0  CocosBuilder/ccBuilder/ResourceManager.h
  38. +39 −3 CocosBuilder/ccBuilder/ResourceManager.m
  39. +46 −0 CocosBuilder/ccBuilder/ResourceManagerOutlineHandler.h
  40. +351 −0 CocosBuilder/ccBuilder/ResourceManagerOutlineHandler.m
  41. +5 −3 CocosBuilder/ccBuilder/ResourceManagerPanel.h
  42. +11 −261 CocosBuilder/ccBuilder/ResourceManagerPanel.m
  43. +36 −0 CocosBuilder/ccBuilder/SavePanelLimiter.h
  44. +72 −0 CocosBuilder/ccBuilder/SavePanelLimiter.m
  45. +3 −0  CocosBuilder/ccBuilder/StickyNote.m
  46. +20 −0 CocosBuilder/ccBuilder/TaskStatusWindow.h
  47. +32 −0 CocosBuilder/ccBuilder/TaskStatusWindow.m
  48. +332 −0 CocosBuilder/ccBuilder/TaskStatusWindow.xib
  49. +36 −0 CocosBuilder/ccBuilder/WarningsWindow.h
  50. +57 −0 CocosBuilder/ccBuilder/WarningsWindow.m
  51. +481 −0 CocosBuilder/ccBuilder/WarningsWindow.xib
  52. +926 −368 CocosBuilder/ccBuilder/en.lproj/MainMenu.xib
  53. +52 −0 CocosBuilder/libs/HashValue/HashValue.h
  54. +157 −0 CocosBuilder/libs/HashValue/HashValue.m
  55. +1 −1  CocosBuilder/libs/cocos2d-iphone
  56. +1 −0  CocosBuilder/libs/ssziparchive
  57. +29 −0 CocosBuilderExample/CocosBuilder Files (start here)/Project/CocosBuilderExample.ccbproj
  58. 0  ...xample/{CocosBuilderExample/Resources → CocosBuilder Files (start here)/Project}/HelloCocosBuilder.ccb
  59. 0  ...xample/{CocosBuilderExample/Resources → CocosBuilder Files (start here)/Project/Tests}/TestButtons.ccb
  60. 0  ...Example/{CocosBuilderExample/Resources → CocosBuilder Files (start here)/Project/Tests}/TestHeader.ccb
  61. 0  ...Example/{CocosBuilderExample/Resources → CocosBuilder Files (start here)/Project/Tests}/TestLabels.ccb
  62. 0  ...rExample/{CocosBuilderExample/Resources → CocosBuilder Files (start here)/Project/Tests}/TestMenus.ccb
  63. 0  ...CocosBuilderExample/Resources → CocosBuilder Files (start here)/Project/Tests}/TestParticleSystems.ccb
  64. 0  ...le/{CocosBuilderExample/Resources → CocosBuilder Files (start here)/Project/Tests}/TestScrollViews.ccb
  65. 0  ...sBuilderExample/Resources → CocosBuilder Files (start here)/Project/Tests}/TestScrollViewsContentA.ccb
  66. 0  ...xample/{CocosBuilderExample/Resources → CocosBuilder Files (start here)/Project/Tests}/TestSprites.ccb
  67. 0  CocosBuilderExample/{CocosBuilderExample → CocosBuilder Files (start here)}/Resources/btn-a-0.png
  68. 0  CocosBuilderExample/{CocosBuilderExample → CocosBuilder Files (start here)}/Resources/btn-a-1.png
  69. 0  CocosBuilderExample/{CocosBuilderExample → CocosBuilder Files (start here)}/Resources/btn-a-2.png
  70. 0  CocosBuilderExample/{CocosBuilderExample → CocosBuilder Files (start here)}/Resources/btn-b-0.png
  71. 0  CocosBuilderExample/{CocosBuilderExample → CocosBuilder Files (start here)}/Resources/btn-b-1.png
  72. 0  CocosBuilderExample/{CocosBuilderExample → CocosBuilder Files (start here)}/Resources/btn-b-2.png
  73. 0  CocosBuilderExample/{CocosBuilderExample → CocosBuilder Files (start here)}/Resources/btn-back-0.png
  74. 0  CocosBuilderExample/{CocosBuilderExample → CocosBuilder Files (start here)}/Resources/btn-back-1.png
  75. 0  CocosBuilderExample/{CocosBuilderExample → CocosBuilder Files (start here)}/Resources/btn-test-0.png
  76. 0  CocosBuilderExample/{CocosBuilderExample → CocosBuilder Files (start here)}/Resources/btn-test-1.png
  77. 0  CocosBuilderExample/{CocosBuilderExample → CocosBuilder Files (start here)}/Resources/btn-test-2.png
  78. 0  CocosBuilderExample/{CocosBuilderExample → CocosBuilder Files (start here)}/Resources/burst-hd.png
  79. 0  CocosBuilderExample/{CocosBuilderExample → CocosBuilder Files (start here)}/Resources/burst-ipad.png
  80. 0  CocosBuilderExample/{CocosBuilderExample → CocosBuilder Files (start here)}/Resources/burst.png
  81. 0  CocosBuilderExample/{CocosBuilderExample → CocosBuilder Files (start here)}/Resources/comic andy.ttf
  82. 0  CocosBuilderExample/{CocosBuilderExample → CocosBuilder Files (start here)}/Resources/flower.jpg
  83. 0  ...uilderExample/{CocosBuilderExample → CocosBuilder Files (start here)}/Resources/grossini-generic.plist
  84. 0  ...sBuilderExample/{CocosBuilderExample → CocosBuilder Files (start here)}/Resources/grossini-generic.png
  85. 0  ...sBuilderExample/{CocosBuilderExample → CocosBuilder Files (start here)}/Resources/jungle-left-ipad.png
  86. 0  CocosBuilderExample/{CocosBuilderExample → CocosBuilder Files (start here)}/Resources/jungle-left.png
  87. 0  ...BuilderExample/{CocosBuilderExample → CocosBuilder Files (start here)}/Resources/jungle-right-ipad.png
  88. 0  CocosBuilderExample/{CocosBuilderExample → CocosBuilder Files (start here)}/Resources/jungle-right.png
  89. 0  CocosBuilderExample/{CocosBuilderExample → CocosBuilder Files (start here)}/Resources/jungle.png
  90. 0  CocosBuilderExample/{CocosBuilderExample → CocosBuilder Files (start here)}/Resources/logo-icon.png
  91. 0  CocosBuilderExample/{CocosBuilderExample → CocosBuilder Files (start here)}/Resources/logo.png
  92. 0  ...uilderExample/{CocosBuilderExample → CocosBuilder Files (start here)}/Resources/markerfelt24shadow.fnt
  93. 0  ...uilderExample/{CocosBuilderExample → CocosBuilder Files (start here)}/Resources/markerfelt24shadow.png
  94. 0  CocosBuilderExample/{CocosBuilderExample → CocosBuilder Files (start here)}/Resources/particle-fire.png
  95. 0  CocosBuilderExample/{CocosBuilderExample → CocosBuilder Files (start here)}/Resources/particle-smoke.png
  96. 0  CocosBuilderExample/{CocosBuilderExample → CocosBuilder Files (start here)}/Resources/particle-snow.png
  97. 0  CocosBuilderExample/{CocosBuilderExample → CocosBuilder Files (start here)}/Resources/particle-stars.png
  98. 0  CocosBuilderExample/{CocosBuilderExample → CocosBuilder Files (start here)}/Resources/scale-9-demo.png
  99. +71 −160 CocosBuilderExample/CocosBuilderExample.xcodeproj/project.pbxproj
  100. +7 −1 CocosBuilderExample/CocosBuilderExample/AppDelegate.m
  101. +11 −0 CocosBuilderExample/CocosBuilderExample/CCBReader.h
  102. +80 −0 CocosBuilderExample/CocosBuilderExample/CCBReader.m
  103. BIN  CocosBuilderExample/CocosBuilderExample/Resources/HelloCocosBuilder.ccbi
  104. BIN  CocosBuilderExample/CocosBuilderExample/Resources/TestButtons.ccbi
  105. BIN  CocosBuilderExample/CocosBuilderExample/Resources/TestHeader.ccbi
  106. BIN  CocosBuilderExample/CocosBuilderExample/Resources/TestLabels.ccbi
  107. BIN  CocosBuilderExample/CocosBuilderExample/Resources/TestMenus.ccbi
  108. BIN  CocosBuilderExample/CocosBuilderExample/Resources/TestParticleSystems.ccbi
  109. BIN  CocosBuilderExample/CocosBuilderExample/Resources/TestScrollViews.ccbi
  110. BIN  CocosBuilderExample/CocosBuilderExample/Resources/TestScrollViewsContentA.ccbi
  111. BIN  CocosBuilderExample/CocosBuilderExample/Resources/TestSprites.ccbi
  112. BIN  CocosBuilderExample/CocosBuilderExample/Resources/ccb.zip
  113. +0 −5,448 CocosBuilderExample/CocosBuilderExample/Resources/missing-font.fnt
  114. BIN  CocosBuilderExample/CocosBuilderExample/Resources/missing-font.png
  115. +1 −0  CocosBuilderExample/CocosBuilderExample/libs/ssziparchive
  116. +17 −6 Documentation/1. User Guide.md
View
3  .gitmodules
@@ -4,3 +4,6 @@
[submodule "CocosBuilder/libs/CCControlExtension"]
path = CocosBuilder/libs/CCControlExtension
url = https://github.com/vlidholt/CCControlExtension.git
+[submodule "CocosBuilder/libs/ssziparchive"]
+ path = CocosBuilder/libs/ssziparchive
+ url = https://github.com/vlidholt/ssziparchive
View
1  Add to Your Project/cocos2d-iphone/SSZipArchive/LICENSE
View
1  Add to Your Project/cocos2d-iphone/SSZipArchive/SSZipArchive.h
View
1  Add to Your Project/cocos2d-iphone/SSZipArchive/SSZipArchive.m
View
1  Add to Your Project/cocos2d-iphone/SSZipArchive/minizip
View
3  CHANGELOG
@@ -5,6 +5,9 @@ version 1.1-beta2 XX-May-2012
. [NEW] Improved support for CCControlButton
. [NEW] Command line tool for publishing files
. [NEW] Added examples/test cases
+. [NEW] CocosBuilder is now project based, with the capability to publish a complete project with a single click
+. [NEW] Support for multiple resource directories
+. [NEW] Support for publishing to zip-files
. [FIX] Various bug fixes, prevent crash when opening ccb files in directories with many sub directories
. [FIX] Snapping to pixels now work in Lion when dragging objects
View
2  CocosBuilder/CCLabelTTF/CCBPProperties.plist
@@ -50,8 +50,6 @@
<array>
<string>contentSize</string>
</array>
- <key>default</key>
- <integer>12</integer>
<key>displayName</key>
<string>Font size</string>
<key>type</key>
View
126 CocosBuilder/CocosBuilder.xcodeproj/project.pbxproj
@@ -119,6 +119,7 @@
E325F66114F65C8F00D29BCF /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = E325F65F14F65C8F00D29BCF /* InfoPlist.strings */; };
E325F66714F65D4100D29BCF /* CCBPProperties.plist in Resources */ = {isa = PBXBuildFile; fileRef = E325F66614F65D4100D29BCF /* CCBPProperties.plist */; };
E325F66A14F6611F00D29BCF /* CCMenuItemImage.ccbPlugNode in Copy PlugIns */ = {isa = PBXBuildFile; fileRef = E325F65A14F65C8E00D29BCF /* CCMenuItemImage.ccbPlugNode */; };
+ E32BBCB11561361200C58395 /* HashValue.m in Sources */ = {isa = PBXBuildFile; fileRef = E32BBCB01561361200C58395 /* HashValue.m */; };
E32D8CC514EC257000F4BD5E /* InspectorCodeConnections.xib in Resources */ = {isa = PBXBuildFile; fileRef = E32D8CC414EC257000F4BD5E /* InspectorCodeConnections.xib */; };
E32D8CC814EC25D800F4BD5E /* InspectorCodeConnections.m in Sources */ = {isa = PBXBuildFile; fileRef = E32D8CC714EC25D800F4BD5E /* InspectorCodeConnections.m */; };
E334069715517225000FBD0B /* InspectorFloatScale.xib in Resources */ = {isa = PBXBuildFile; fileRef = E334069615517225000FBD0B /* InspectorFloatScale.xib */; };
@@ -126,6 +127,10 @@
E33BC1971510B8D0009AE29A /* Sparkle.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E33BC1961510B8D0009AE29A /* Sparkle.framework */; };
E33BC1981510B9DE009AE29A /* Sparkle.framework in Copy Files (Sparkle framework) */ = {isa = PBXBuildFile; fileRef = E33BC1961510B8D0009AE29A /* Sparkle.framework */; };
E33BC1B81510E4B6009AE29A /* NodeGraphPropertySetter.m in Sources */ = {isa = PBXBuildFile; fileRef = E33BC1B71510E4B6009AE29A /* NodeGraphPropertySetter.m */; };
+ E3462867155BF6C50043EAB1 /* ResourceManagerOutlineHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = E3462866155BF6C50043EAB1 /* ResourceManagerOutlineHandler.m */; };
+ E346286B155C18D80043EAB1 /* SavePanelLimiter.m in Sources */ = {isa = PBXBuildFile; fileRef = E346286A155C18D80043EAB1 /* SavePanelLimiter.m */; };
+ E3462870155D22290043EAB1 /* CCBPublisher.m in Sources */ = {isa = PBXBuildFile; fileRef = E346286F155D22290043EAB1 /* CCBPublisher.m */; };
+ E3462873155D22FC0043EAB1 /* CCBWarnings.m in Sources */ = {isa = PBXBuildFile; fileRef = E3462872155D22FC0043EAB1 /* CCBWarnings.m */; };
E34E5D6615357CF2000201FB /* RulersLayer.m in Sources */ = {isa = PBXBuildFile; fileRef = E34E5D6515357CF2000201FB /* RulersLayer.m */; };
E34E5D6A153585EC000201FB /* ruler-bg-horizontal.png in Resources */ = {isa = PBXBuildFile; fileRef = E34E5D68153585EC000201FB /* ruler-bg-horizontal.png */; };
E34E5D6B153585EC000201FB /* ruler-bg-vertical.png in Resources */ = {isa = PBXBuildFile; fileRef = E34E5D69153585EC000201FB /* ruler-bg-vertical.png */; };
@@ -282,6 +287,9 @@
E36F3C3D152C756D00AAD805 /* NSString+RelativePath.m in Sources */ = {isa = PBXBuildFile; fileRef = E36F3C3C152C756D00AAD805 /* NSString+RelativePath.m */; };
E370BA0C1549B2460048ED73 /* scale-0.png in Resources */ = {isa = PBXBuildFile; fileRef = E370BA0A1549B2460048ED73 /* scale-0.png */; };
E370BA0D1549B2460048ED73 /* scale-1.png in Resources */ = {isa = PBXBuildFile; fileRef = E370BA0B1549B2460048ED73 /* scale-1.png */; };
+ E3799EA6155970F400196B4A /* ProjectSettingsWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = E3799EA5155970F400196B4A /* ProjectSettingsWindow.xib */; };
+ E3799EAA1559771E00196B4A /* ProjectSettingsWindow.m in Sources */ = {isa = PBXBuildFile; fileRef = E3799EA91559771D00196B4A /* ProjectSettingsWindow.m */; };
+ E3799EAD155979BF00196B4A /* ProjectSettings.m in Sources */ = {isa = PBXBuildFile; fileRef = E3799EAC155979BF00196B4A /* ProjectSettings.m */; };
E383BF6B152478940032F371 /* CCScrollView.m in Sources */ = {isa = PBXBuildFile; fileRef = E383BF6A152478940032F371 /* CCScrollView.m */; };
E3850809150AA9AE007E162A /* ImageAndTextCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E3850808150AA9AE007E162A /* ImageAndTextCell.m */; };
E385080B150AB232007E162A /* segmctrl-bg.png in Resources */ = {isa = PBXBuildFile; fileRef = E385080A150AB232007E162A /* segmctrl-bg.png */; };
@@ -364,6 +372,10 @@
E3D59139150F8C5A004180CA /* CCBPCCBFile.m in Sources */ = {isa = PBXBuildFile; fileRef = E3D59138150F8C5A004180CA /* CCBPCCBFile.m */; };
E3DC1B8C154F18660087724C /* size-3.png in Resources */ = {isa = PBXBuildFile; fileRef = E3DC1B8A154F18660087724C /* size-3.png */; };
E3DC1B8D154F18660087724C /* size-4.png in Resources */ = {isa = PBXBuildFile; fileRef = E3DC1B8B154F18660087724C /* size-4.png */; };
+ E3DCFD9415627FAB00BD7D7F /* WarningsWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = E3DCFD9315627FAB00BD7D7F /* WarningsWindow.xib */; };
+ E3DCFD9715627FCF00BD7D7F /* WarningsWindow.m in Sources */ = {isa = PBXBuildFile; fileRef = E3DCFD9615627FCF00BD7D7F /* WarningsWindow.m */; };
+ E3DCFD9C15629FC700BD7D7F /* TaskStatusWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = E3DCFD9B15629FC700BD7D7F /* TaskStatusWindow.xib */; };
+ E3DCFD9F1562A3AD00BD7D7F /* TaskStatusWindow.m in Sources */ = {isa = PBXBuildFile; fileRef = E3DCFD9E1562A3AD00BD7D7F /* TaskStatusWindow.m */; };
E3EDBC101546D23000EEF1F3 /* ResolutionSetting.m in Sources */ = {isa = PBXBuildFile; fileRef = E3EDBC0F1546D23000EEF1F3 /* ResolutionSetting.m */; };
E3EDBC1415483E3200EEF1F3 /* ResolutionSettingsWindow.m in Sources */ = {isa = PBXBuildFile; fileRef = E3EDBC1315483E3200EEF1F3 /* ResolutionSettingsWindow.m */; };
E3EDBC1615483EE000EEF1F3 /* ResolutionSettingsWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = E3EDBC1515483EE000EEF1F3 /* ResolutionSettingsWindow.xib */; };
@@ -722,6 +734,8 @@
E325F66014F65C8F00D29BCF /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
E325F66214F65C8F00D29BCF /* CCMenuItemImage-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "CCMenuItemImage-Prefix.pch"; sourceTree = "<group>"; };
E325F66614F65D4100D29BCF /* CCBPProperties.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = CCBPProperties.plist; sourceTree = "<group>"; };
+ E32BBCAF1561361200C58395 /* HashValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HashValue.h; path = HashValue/HashValue.h; sourceTree = "<group>"; };
+ E32BBCB01561361200C58395 /* HashValue.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = HashValue.m; path = HashValue/HashValue.m; sourceTree = "<group>"; };
E32D8CC414EC257000F4BD5E /* InspectorCodeConnections.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = InspectorCodeConnections.xib; sourceTree = "<group>"; };
E32D8CC614EC25D800F4BD5E /* InspectorCodeConnections.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorCodeConnections.h; sourceTree = "<group>"; };
E32D8CC714EC25D800F4BD5E /* InspectorCodeConnections.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = InspectorCodeConnections.m; sourceTree = "<group>"; };
@@ -731,6 +745,14 @@
E33BC1961510B8D0009AE29A /* Sparkle.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Sparkle.framework; path = libs/Sparkle.framework; sourceTree = "<group>"; };
E33BC1B61510E4B6009AE29A /* NodeGraphPropertySetter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NodeGraphPropertySetter.h; sourceTree = "<group>"; };
E33BC1B71510E4B6009AE29A /* NodeGraphPropertySetter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NodeGraphPropertySetter.m; sourceTree = "<group>"; };
+ E3462865155BF6C50043EAB1 /* ResourceManagerOutlineHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ResourceManagerOutlineHandler.h; sourceTree = "<group>"; };
+ E3462866155BF6C50043EAB1 /* ResourceManagerOutlineHandler.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ResourceManagerOutlineHandler.m; sourceTree = "<group>"; };
+ E3462869155C18D80043EAB1 /* SavePanelLimiter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SavePanelLimiter.h; sourceTree = "<group>"; };
+ E346286A155C18D80043EAB1 /* SavePanelLimiter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SavePanelLimiter.m; sourceTree = "<group>"; };
+ E346286E155D22290043EAB1 /* CCBPublisher.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCBPublisher.h; sourceTree = "<group>"; };
+ E346286F155D22290043EAB1 /* CCBPublisher.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CCBPublisher.m; sourceTree = "<group>"; };
+ E3462871155D22FC0043EAB1 /* CCBWarnings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCBWarnings.h; sourceTree = "<group>"; };
+ E3462872155D22FC0043EAB1 /* CCBWarnings.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CCBWarnings.m; sourceTree = "<group>"; };
E34E5D6415357CF2000201FB /* RulersLayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RulersLayer.h; sourceTree = "<group>"; };
E34E5D6515357CF2000201FB /* RulersLayer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RulersLayer.m; sourceTree = "<group>"; };
E34E5D68153585EC000201FB /* ruler-bg-horizontal.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "ruler-bg-horizontal.png"; sourceTree = "<group>"; };
@@ -1022,6 +1044,11 @@
E36F3C3C152C756D00AAD805 /* NSString+RelativePath.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSString+RelativePath.m"; sourceTree = "<group>"; };
E370BA0A1549B2460048ED73 /* scale-0.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "scale-0.png"; sourceTree = "<group>"; };
E370BA0B1549B2460048ED73 /* scale-1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "scale-1.png"; sourceTree = "<group>"; };
+ E3799EA5155970F400196B4A /* ProjectSettingsWindow.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = ProjectSettingsWindow.xib; sourceTree = "<group>"; };
+ E3799EA81559771D00196B4A /* ProjectSettingsWindow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ProjectSettingsWindow.h; sourceTree = "<group>"; };
+ E3799EA91559771D00196B4A /* ProjectSettingsWindow.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ProjectSettingsWindow.m; sourceTree = "<group>"; };
+ E3799EAB155979BF00196B4A /* ProjectSettings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ProjectSettings.h; sourceTree = "<group>"; };
+ E3799EAC155979BF00196B4A /* ProjectSettings.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ProjectSettings.m; sourceTree = "<group>"; };
E383BF69152478940032F371 /* CCScrollView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCScrollView.h; sourceTree = "<group>"; };
E383BF6A152478940032F371 /* CCScrollView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CCScrollView.m; sourceTree = "<group>"; };
E3850807150AA9AE007E162A /* ImageAndTextCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ImageAndTextCell.h; sourceTree = "<group>"; };
@@ -1158,6 +1185,12 @@
E3D59138150F8C5A004180CA /* CCBPCCBFile.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CCBPCCBFile.m; sourceTree = "<group>"; };
E3DC1B8A154F18660087724C /* size-3.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "size-3.png"; sourceTree = "<group>"; };
E3DC1B8B154F18660087724C /* size-4.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "size-4.png"; sourceTree = "<group>"; };
+ E3DCFD9315627FAB00BD7D7F /* WarningsWindow.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = WarningsWindow.xib; sourceTree = "<group>"; };
+ E3DCFD9515627FCE00BD7D7F /* WarningsWindow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WarningsWindow.h; sourceTree = "<group>"; };
+ E3DCFD9615627FCF00BD7D7F /* WarningsWindow.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WarningsWindow.m; sourceTree = "<group>"; };
+ E3DCFD9B15629FC700BD7D7F /* TaskStatusWindow.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = TaskStatusWindow.xib; sourceTree = "<group>"; };
+ E3DCFD9D1562A3AD00BD7D7F /* TaskStatusWindow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TaskStatusWindow.h; sourceTree = "<group>"; };
+ E3DCFD9E1562A3AD00BD7D7F /* TaskStatusWindow.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TaskStatusWindow.m; sourceTree = "<group>"; };
E3EDBC0E1546D23000EEF1F3 /* ResolutionSetting.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ResolutionSetting.h; sourceTree = "<group>"; };
E3EDBC0F1546D23000EEF1F3 /* ResolutionSetting.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ResolutionSetting.m; sourceTree = "<group>"; };
E3EDBC1215483E3200EEF1F3 /* ResolutionSettingsWindow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ResolutionSettingsWindow.h; sourceTree = "<group>"; };
@@ -1381,6 +1414,11 @@
772BE571133E48340009B5B9 /* CCBGlobals.m */,
E3EDBC0E1546D23000EEF1F3 /* ResolutionSetting.h */,
E3EDBC0F1546D23000EEF1F3 /* ResolutionSetting.m */,
+ E3799EAB155979BF00196B4A /* ProjectSettings.h */,
+ E3799EAC155979BF00196B4A /* ProjectSettings.m */,
+ E3799EA5155970F400196B4A /* ProjectSettingsWindow.xib */,
+ E3799EA81559771D00196B4A /* ProjectSettingsWindow.h */,
+ E3799EA91559771D00196B4A /* ProjectSettingsWindow.m */,
);
name = "Application Settings & Globals";
sourceTree = "<group>";
@@ -1406,6 +1444,8 @@
E35A2D9B1540207000F78B72 /* PositionPropertySetter.m */,
E3EDBC231549971000EEF1F3 /* CCBFileUtil.h */,
E3EDBC241549971000EEF1F3 /* CCBFileUtil.m */,
+ E3462869155C18D80043EAB1 /* SavePanelLimiter.h */,
+ E346286A155C18D80043EAB1 /* SavePanelLimiter.m */,
);
name = Util;
sourceTree = "<group>";
@@ -1417,17 +1457,8 @@
7789ACE9133AB47A00CEFCC7 /* CocosScene.m */,
7789ABD4133AA82000CEFCC7 /* CocosBuilderAppDelegate.h */,
7789ABD5133AA82000CEFCC7 /* CocosBuilderAppDelegate.m */,
- E34E5D6415357CF2000201FB /* RulersLayer.h */,
- E34E5D6515357CF2000201FB /* RulersLayer.m */,
- E3A16AF11536D096004B528A /* GuidesLayer.h */,
- E3A16AF21536D096004B528A /* GuidesLayer.m */,
776A37B41398D6B900960E94 /* CCBGLView.h */,
776A37B51398D6BD00960E94 /* CCBGLView.m */,
- E3F3F83D153C72A3005443EE /* NotesLayer.h */,
- E3F3F83E153C72A3005443EE /* NotesLayer.m */,
- E3F3F846153D9126005443EE /* StickyNoteEditView.xib */,
- E3F3F841153C7700005443EE /* StickyNote.h */,
- E3F3F842153C7700005443EE /* StickyNote.m */,
);
name = "AppDelegate & Cocos2D Scene";
sourceTree = "<group>";
@@ -1668,12 +1699,15 @@
isa = PBXGroup;
children = (
776041E31498F5E80078095D /* AppDelegate & Cocos2D Scene */,
- 776041E21498F5A70078095D /* Util */,
+ E346286C155C23100043EAB1 /* Rulers, Guides & Notes */,
+ E3C5C1A11504D144000CF6F3 /* Resource Manager */,
776041E11498F56D0078095D /* Application Settings & Globals */,
776041E01498F4A00078095D /* Document Readers & Writers */,
- 7789ACF8133BFA9700CEFCC7 /* Interface */,
- E3C5C1A11504D144000CF6F3 /* Resource Manager */,
+ E346286D155D21F10043EAB1 /* Publishing */,
+ E3DCFD851562611700BD7D7F /* Error handling & warnings */,
E3B7AEDA14E3242600DFD402 /* PlugIn Manager */,
+ 7789ACF8133BFA9700CEFCC7 /* Interface */,
+ 776041E21498F5A70078095D /* Util */,
7789ABC9133AA82000CEFCC7 /* Supporting Files */,
);
name = CocosBuilder;
@@ -1695,6 +1729,7 @@
7789ABEF133AB17100CEFCC7 /* libs */ = {
isa = PBXGroup;
children = (
+ E32BBCAA156135C300C58395 /* HashValue */,
E36A270F152263B4004986A8 /* cocos2d */,
E383BF68152478940032F371 /* CCScrollView */,
E35392491518AF2100471721 /* CCControlExtension */,
@@ -1878,6 +1913,43 @@
name = "Supporting Files";
sourceTree = "<group>";
};
+ E32BBCAA156135C300C58395 /* HashValue */ = {
+ isa = PBXGroup;
+ children = (
+ E32BBCAF1561361200C58395 /* HashValue.h */,
+ E32BBCB01561361200C58395 /* HashValue.m */,
+ );
+ name = HashValue;
+ sourceTree = "<group>";
+ };
+ E346286C155C23100043EAB1 /* Rulers, Guides & Notes */ = {
+ isa = PBXGroup;
+ children = (
+ E34E5D6415357CF2000201FB /* RulersLayer.h */,
+ E34E5D6515357CF2000201FB /* RulersLayer.m */,
+ E3A16AF11536D096004B528A /* GuidesLayer.h */,
+ E3A16AF21536D096004B528A /* GuidesLayer.m */,
+ E3F3F83D153C72A3005443EE /* NotesLayer.h */,
+ E3F3F83E153C72A3005443EE /* NotesLayer.m */,
+ E3F3F846153D9126005443EE /* StickyNoteEditView.xib */,
+ E3F3F841153C7700005443EE /* StickyNote.h */,
+ E3F3F842153C7700005443EE /* StickyNote.m */,
+ );
+ name = "Rulers, Guides & Notes";
+ sourceTree = "<group>";
+ };
+ E346286D155D21F10043EAB1 /* Publishing */ = {
+ isa = PBXGroup;
+ children = (
+ E346286E155D22290043EAB1 /* CCBPublisher.h */,
+ E346286F155D22290043EAB1 /* CCBPublisher.m */,
+ E3DCFD9B15629FC700BD7D7F /* TaskStatusWindow.xib */,
+ E3DCFD9D1562A3AD00BD7D7F /* TaskStatusWindow.h */,
+ E3DCFD9E1562A3AD00BD7D7F /* TaskStatusWindow.m */,
+ );
+ name = Publishing;
+ sourceTree = "<group>";
+ };
E35392461518AD0A00471721 /* Core */ = {
isa = PBXGroup;
children = (
@@ -2584,11 +2656,13 @@
children = (
E3C5C1A21504D17E000CF6F3 /* ResourceManager.h */,
E3C5C1A31504D17E000CF6F3 /* ResourceManager.m */,
+ E3C5C1B315075CDD000CF6F3 /* ResourceManagerUtil.h */,
+ E3C5C1B415075CDD000CF6F3 /* ResourceManagerUtil.m */,
E3C5C1AE150610D8000CF6F3 /* ResourceManagerPanel.xib */,
E3C5C1B015061882000CF6F3 /* ResourceManagerPanel.h */,
E3C5C1B115061882000CF6F3 /* ResourceManagerPanel.m */,
- E3C5C1B315075CDD000CF6F3 /* ResourceManagerUtil.h */,
- E3C5C1B415075CDD000CF6F3 /* ResourceManagerUtil.m */,
+ E3462865155BF6C50043EAB1 /* ResourceManagerOutlineHandler.h */,
+ E3462866155BF6C50043EAB1 /* ResourceManagerOutlineHandler.m */,
);
name = "Resource Manager";
sourceTree = "<group>";
@@ -2646,6 +2720,18 @@
name = "Supporting Files";
sourceTree = "<group>";
};
+ E3DCFD851562611700BD7D7F /* Error handling & warnings */ = {
+ isa = PBXGroup;
+ children = (
+ E3462871155D22FC0043EAB1 /* CCBWarnings.h */,
+ E3462872155D22FC0043EAB1 /* CCBWarnings.m */,
+ E3DCFD9315627FAB00BD7D7F /* WarningsWindow.xib */,
+ E3DCFD9515627FCE00BD7D7F /* WarningsWindow.h */,
+ E3DCFD9615627FCF00BD7D7F /* WarningsWindow.m */,
+ );
+ name = "Error handling & warnings";
+ sourceTree = "<group>";
+ };
E3FCE8681524856D0028E8E7 /* CCScrollView */ = {
isa = PBXGroup;
children = (
@@ -3168,6 +3254,9 @@
E3DC1B8C154F18660087724C /* size-3.png in Resources */,
E3DC1B8D154F18660087724C /* size-4.png in Resources */,
E334069715517225000FBD0B /* InspectorFloatScale.xib in Resources */,
+ E3799EA6155970F400196B4A /* ProjectSettingsWindow.xib in Resources */,
+ E3DCFD9415627FAB00BD7D7F /* WarningsWindow.xib in Resources */,
+ E3DCFD9C15629FC700BD7D7F /* TaskStatusWindow.xib in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -3532,6 +3621,15 @@
E3EDBC1415483E3200EEF1F3 /* ResolutionSettingsWindow.m in Sources */,
E3EDBC251549971000EEF1F3 /* CCBFileUtil.m in Sources */,
E334069B1551725F000FBD0B /* InspectorFloatScale.m in Sources */,
+ E3799EAA1559771E00196B4A /* ProjectSettingsWindow.m in Sources */,
+ E3799EAD155979BF00196B4A /* ProjectSettings.m in Sources */,
+ E3462867155BF6C50043EAB1 /* ResourceManagerOutlineHandler.m in Sources */,
+ E346286B155C18D80043EAB1 /* SavePanelLimiter.m in Sources */,
+ E3462870155D22290043EAB1 /* CCBPublisher.m in Sources */,
+ E3462873155D22FC0043EAB1 /* CCBWarnings.m in Sources */,
+ E32BBCB11561361200C58395 /* HashValue.m in Sources */,
+ E3DCFD9715627FCF00BD7D7F /* WarningsWindow.m in Sources */,
+ E3DCFD9F1562A3AD00BD7D7F /* TaskStatusWindow.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
View
2  CocosBuilder/ccBuilder/CCBDocument.h
@@ -37,7 +37,6 @@
BOOL isDirty;
CGPoint stageScrollOffset;
float stageZoom;
- NSDictionary* project;
NSMutableArray* resolutions;
int currentResolution;
@@ -55,7 +54,6 @@
@property (nonatomic,assign) float stageZoom;
@property (nonatomic,readonly) NSString* rootPath;
- (NSString*) formattedName;
-@property (nonatomic,readonly) NSDictionary* project;
@property (nonatomic,retain) NSMutableArray* resolutions;
@property (nonatomic,assign) int currentResolution;
@end
View
7 CocosBuilder/ccBuilder/CCBDocument.m
@@ -28,7 +28,7 @@
@implementation CCBDocument
-@synthesize fileName,docData,undoManager, lastEditedProperty, isDirty, stageScrollOffset, stageZoom, exportPath, exportPlugIn,exportFlattenPaths, project, resolutions, currentResolution;
+@synthesize fileName,docData,undoManager, lastEditedProperty, isDirty, stageScrollOffset, stageZoom, exportPath, exportPlugIn,exportFlattenPaths, resolutions, currentResolution;
- (id)init
{
@@ -46,7 +46,6 @@ - (id)init
- (void)dealloc
{
- [project release];
self.exportPath = NULL;
self.exportPlugIn = NULL;
self.lastEditedProperty = NULL;
@@ -74,10 +73,6 @@ - (void) setFileName:(NSString *)fn
[fileName release];
fileName = [fn retain];
}
- // Check for project file
- NSString* projPath = [[fileName stringByDeletingLastPathComponent] stringByAppendingPathComponent:@"Project.ccbproj"];
- project = [NSDictionary dictionaryWithContentsOfFile:projPath];
- [project retain];
}
@end
View
45 CocosBuilder/ccBuilder/CCBPublisher.h
@@ -0,0 +1,45 @@
+/*
+ * CocosBuilder: http://www.cocosbuilder.com
+ *
+ * Copyright (c) 2012 Zynga Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+#import <Foundation/Foundation.h>
+
+@class ProjectSettings;
+@class CCBWarnings;
+
+@interface CCBPublisher : NSObject
+{
+ ProjectSettings* projectSettings;
+ CCBWarnings* warnings;
+ NSString* outputDir;
+ NSArray* copyExtensions;
+ NSString* publishFormat;
+}
+
+@property (nonatomic,copy) NSString* publishFormat;
+
+- (id) initWithProjectSettings:(ProjectSettings*)settings warnings:(CCBWarnings*)w;
+- (void) publish;
++ (void) cleanAllCacheDirectories;
+
+@end
View
287 CocosBuilder/ccBuilder/CCBPublisher.m
@@ -0,0 +1,287 @@
+/*
+ * CocosBuilder: http://www.cocosbuilder.com
+ *
+ * Copyright (c) 2012 Zynga Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+#import "CCBPublisher.h"
+#import "ProjectSettings.h"
+#import "CCBWarnings.h"
+#import "NSString+RelativePath.h"
+#import "PlugInExport.h"
+#import "PlugInManager.h"
+#import "CCBGlobals.h"
+#import "CocosBuilderAppDelegate.h"
+
+@implementation CCBPublisher
+
+@synthesize publishFormat;
+
+- (id) initWithProjectSettings:(ProjectSettings*)settings warnings:(CCBWarnings*)w
+{
+ self = [super init];
+ if (!self) return NULL;
+
+ // Save settings and warning log
+ projectSettings = [settings retain];
+ warnings = [w retain];
+
+ // Setup base output directory
+ if (projectSettings.publishToZipFile)
+ {
+ NSArray *paths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES);
+ outputDir = [[[[paths objectAtIndex:0] stringByAppendingPathComponent:@"com.cocosbuilder.CocosBuilder"] stringByAppendingPathComponent:@"publish"]stringByAppendingPathComponent:projectSettings.projectPathHashed];
+
+ outputDir = [outputDir retain];
+ }
+ else
+ {
+ outputDir = [[projectSettings.publishDirectory absolutePathFromBaseDirPath:[projectSettings.projectPath stringByDeletingLastPathComponent]] retain];
+ }
+
+ // Setup extensions to copy
+ copyExtensions = [[NSArray alloc] initWithObjects:@"jpg",@"png", @"pvr", @"ccz", @"plist", @"fnt", @"ttf", nil];
+
+ // Set format to use for exports
+ self.publishFormat = projectSettings.exporter;
+
+ return self;
+}
+
+- (BOOL) srcFile:(NSString*)srcFile isNewerThanDstFile:(NSString*)dstFile
+{
+ NSDictionary* srcAttributes = [[NSFileManager defaultManager] attributesOfItemAtPath:srcFile error:NULL];
+ NSDate* srcDate = [srcAttributes objectForKey:NSFileModificationDate];
+
+ NSDictionary* dstAttributes = [[NSFileManager defaultManager] attributesOfItemAtPath:dstFile error:NULL];
+ NSDate* dstDate = [dstAttributes objectForKey:NSFileModificationDate];
+
+ if (!srcDate || !dstDate) return YES;
+ if ([srcDate compare:dstDate] == NSOrderedDescending) return YES;
+
+ return NO;
+}
+
+- (BOOL) publishCCBFile:(NSString*)srcFile to:(NSString*)dstFile
+{
+ PlugInExport* plugIn = [[PlugInManager sharedManager] plugInExportForExtension:publishFormat];
+ if (!plugIn)
+ {
+ [warnings addWarningWithDescription:[NSString stringWithFormat: @"Plug-in is missing for publishing files to %@-format. You can select plug-in in Project Settings.",publishFormat] isFatal:YES];
+ return NO;
+ }
+
+ // Load src file
+ NSMutableDictionary* doc = [NSMutableDictionary dictionaryWithContentsOfFile:srcFile];
+ if (!doc)
+ {
+ [warnings addWarningWithDescription:[NSString stringWithFormat:@"Failed to publish ccb-file. File is in invalid format: %@",srcFile] isFatal:NO];
+ return YES;
+ }
+
+ // Export file
+ plugIn.flattenPaths = projectSettings.flattenPaths;
+ NSData* data = [plugIn exportDocument:doc];
+ if (!data)
+ {
+ [warnings addWarningWithDescription:[NSString stringWithFormat:@"Failed to publish ccb-file: %@",srcFile] isFatal:NO];
+ return YES;
+ }
+
+ // Save file
+ BOOL success = [data writeToFile:dstFile atomically:YES];
+ if (!success)
+ {
+ [warnings addWarningWithDescription:[NSString stringWithFormat:@"Failed to publish ccb-file. Failed to write file: %@",dstFile] isFatal:NO];
+ return YES;
+ }
+
+ return YES;
+}
+
+- (BOOL) publishDirectory:(NSString*) dir subPath:(NSString*) subPath
+{
+ CocosBuilderAppDelegate* ad = [[CCBGlobals globals] appDelegate];
+
+ NSFileManager* fm = [NSFileManager defaultManager];
+
+ // Path to output directory for the currently exported path
+ NSString* outDir = NULL;
+ if (projectSettings.flattenPaths && projectSettings.publishToZipFile)
+ {
+ outDir = outputDir;
+ }
+ else
+ {
+ outDir = [outputDir stringByAppendingPathComponent:subPath];
+ }
+
+ // Create the directory if it doesn't exist
+ BOOL createdDirs = [fm createDirectoryAtPath:outDir withIntermediateDirectories:YES attributes:NULL error:NULL];
+ if (!createdDirs)
+ {
+ [warnings addWarningWithDescription:@"Failed to create output directory %@" isFatal:YES];
+ return NO;
+ }
+
+ NSArray* files = [fm contentsOfDirectoryAtPath:dir error:NULL];
+
+ for (NSString* fileName in files)
+ {
+ if ([fileName hasPrefix:@"."]) continue;
+
+ NSString* filePath = [dir stringByAppendingPathComponent:fileName];
+
+ BOOL isDirectory;
+ BOOL fileExists = [fm fileExistsAtPath:filePath isDirectory:&isDirectory];
+ if (fileExists && isDirectory)
+ {
+ NSString* childPath = NULL;
+ if (subPath) childPath = [NSString stringWithFormat:@"%@/%@", subPath, fileName];
+ else childPath = fileName;
+
+ [self publishDirectory:filePath subPath:childPath];
+ }
+ else if (fileExists)
+ {
+ // Publish file
+
+ // Copy files
+ for (NSString* ext in copyExtensions)
+ {
+ if ([[fileName lowercaseString] hasSuffix:ext])
+ {
+ // This file should be copied
+ //NSString* dstFile = NULL;
+ //if (subPath) dstFile = [NSString stringWithFormat:@"%@/%@/%@",outputDir,subPath,fileName];
+ //else dstFile = [NSString stringWithFormat:@"%@/%@",outputDir,fileName];
+
+ NSString* dstFile = [outDir stringByAppendingPathComponent:fileName];
+
+ if ([dstFile isEqualToString:filePath])
+ {
+ [warnings addWarningWithDescription:@"Publish will overwrite file in resource directory." isFatal:YES];
+ return NO;
+ }
+
+ if (![fm fileExistsAtPath:dstFile] || [self srcFile:filePath isNewerThanDstFile:dstFile])
+ {
+ [ad modalStatusWindowUpdateStatusText:[NSString stringWithFormat:@"Copying %@...", fileName]];
+
+ // Remove old file
+ [fm removeItemAtPath:dstFile error:NULL];
+
+ // Copy the file
+ BOOL sucess = [fm copyItemAtPath:filePath toPath:dstFile error:NULL];
+ if (!sucess) [warnings addWarningWithDescription:[NSString stringWithFormat:@"Failed to publish file: %@", fileName]];
+ }
+ }
+ }
+
+ // Publish ccb files
+ if ([[fileName lowercaseString] hasSuffix:@"ccb"])
+ {
+ NSString* strippedFileName = [fileName stringByDeletingPathExtension];
+
+ //NSString* dstFile = NULL;
+ //if (subPath) dstFile = [NSString stringWithFormat:@"%@/%@/%@.%@",outputDir,subPath,strippedFileName, publishFormat];
+ //else dstFile = [NSString stringWithFormat:@"%@/%@.%@",outputDir,strippedFileName, publishFormat];
+ NSString* dstFile = [[outDir stringByAppendingPathComponent:strippedFileName] stringByAppendingPathExtension:publishFormat];
+
+ if ([dstFile isEqualToString:filePath])
+ {
+ [warnings addWarningWithDescription:@"Publish will overwrite files in resource directory." isFatal:YES];
+ return NO;
+ }
+
+ if (![fm fileExistsAtPath:dstFile] || [self srcFile:filePath isNewerThanDstFile:dstFile])
+ {
+ [ad modalStatusWindowUpdateStatusText:[NSString stringWithFormat:@"Publishing %@...", fileName]];
+
+ // Remove old file
+ [fm removeItemAtPath:dstFile error:NULL];
+
+ // Copy the file
+ BOOL sucess = [self publishCCBFile:filePath to:dstFile];
+ if (!sucess) return NO;
+ }
+ }
+ }
+ }
+
+ return YES;
+}
+
+- (BOOL) publish_
+{
+ CocosBuilderAppDelegate* ad = [[CCBGlobals globals] appDelegate];
+
+ for (NSString* dir in projectSettings.absoluteResourcePaths)
+ {
+ if (![self publishDirectory:dir subPath:NULL]) return NO;
+ }
+
+ if (projectSettings.publishToZipFile)
+ {
+ [ad modalStatusWindowUpdateStatusText:@"Zipping up project..."];
+
+ // Zip it up!
+ NSTask* zipTask = [[NSTask alloc] init];
+ [zipTask setCurrentDirectoryPath:outputDir];
+ [zipTask setLaunchPath:@"/usr/bin/zip"];
+ NSArray* args = [NSArray arrayWithObjects:@"-r", @"-q", [[projectSettings.publishDirectory absolutePathFromBaseDirPath:[projectSettings.projectPath stringByDeletingLastPathComponent]] stringByAppendingPathComponent:@"ccb.zip"], @".", @"-i", @"*", nil];
+ [zipTask setArguments:args];
+ [zipTask launch];
+ [zipTask waitUntilExit];
+ }
+
+ return YES;
+}
+
+- (void) publish
+{
+ dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0);
+ dispatch_async(queue, ^{
+ [self publish_];
+ dispatch_sync(dispatch_get_main_queue(), ^{
+ CocosBuilderAppDelegate* ad = [[CCBGlobals globals] appDelegate];
+ [ad publisher:self finishedWithWarnings:warnings];
+ });
+ });
+
+}
+
++ (void) cleanAllCacheDirectories
+{
+ NSArray *paths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES);
+ NSString* ccbChacheDir = [[paths objectAtIndex:0] stringByAppendingPathComponent:@"com.cocosbuilder.CocosBuilder"];
+ [[NSFileManager defaultManager] removeItemAtPath:ccbChacheDir error:NULL];
+}
+
+- (void) dealloc
+{
+ [warnings release];
+ [projectSettings release];
+ [outputDir release];
+ [super dealloc];
+}
+
+@end
View
49 CocosBuilder/ccBuilder/CCBWarnings.h
@@ -0,0 +1,49 @@
+/*
+ * CocosBuilder: http://www.cocosbuilder.com
+ *
+ * Copyright (c) 2012 Zynga Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+#import <Foundation/Foundation.h>
+
+@interface CCBWarning : NSObject
+{
+ NSString* description;
+ BOOL fatal;
+}
+@property (nonatomic,copy) NSString* description;
+@property (nonatomic,assign) BOOL fatal;
+
+@end
+
+@interface CCBWarnings : NSObject
+{
+ NSString* warningsDescription;
+ NSMutableArray* warnings;
+}
+@property (nonatomic,readonly) NSMutableArray* warnings;
+@property (nonatomic,copy) NSString* warningsDescription;
+
+- (void) addWarningWithDescription:(NSString*)description isFatal:(BOOL)fatal;
+- (void) addWarningWithDescription:(NSString*)description;
+- (void) addWarning:(CCBWarning*)warning;
+
+@end
View
83 CocosBuilder/ccBuilder/CCBWarnings.m
@@ -0,0 +1,83 @@
+/*
+ * CocosBuilder: http://www.cocosbuilder.com
+ *
+ * Copyright (c) 2012 Zynga Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+#import "CCBWarnings.h"
+
+@implementation CCBWarning
+@synthesize description;
+@synthesize fatal;
+
+- (void) dealloc
+{
+ self.description = NULL;
+ [super dealloc];
+}
+
+@end
+
+
+@implementation CCBWarnings
+
+@synthesize warningsDescription;
+@synthesize warnings;
+
+- (id) init
+{
+ self = [super init];
+ if (!self) return NULL;
+
+ warnings = [[NSMutableArray array] retain];
+ self.warningsDescription = @"Warnings";
+
+ return self;
+}
+
+- (void) addWarningWithDescription:(NSString*)description isFatal:(BOOL)fatal
+{
+ CCBWarning* warning = [[[CCBWarning alloc] init] autorelease];
+ warning.description = description;
+ warning.fatal = fatal;
+ [self addWarning:warning];
+}
+
+- (void) addWarningWithDescription:(NSString*)description
+{
+ CCBWarning* warning = [[[CCBWarning alloc] init] autorelease];
+ warning.description = description;
+ [self addWarning:warning];
+}
+
+- (void) addWarning:(CCBWarning*)warning
+{
+ [warnings addObject:warning];
+ NSLog(@"CCB WARNING: %@", warning.description);
+}
+
+- (void) dealloc
+{
+ [warnings release];
+ [super dealloc];
+}
+
+@end
View
33 CocosBuilder/ccBuilder/CocosBuilderAppDelegate.h
@@ -44,13 +44,19 @@ enum {
@class CCBDocument;
+@class ProjectSettings;
@class AssetsWindowController;
@class PlugInManager;
@class ResourceManager;
@class ResourceManagerPanel;
+@class ResourceManagerOutlineHandler;
@class CCBGLView;
@class CCBTransparentWindow;
@class CCBTransparentView;
+@class WarningsWindow;
+@class TaskStatusWindow;
+@class CCBPublisher;
+@class CCBWarnings;
@interface CocosBuilderAppDelegate : NSObject <NSApplicationDelegate, NSOutlineViewDataSource, NSOutlineViewDelegate, NSWindowDelegate>
{
@@ -93,7 +99,12 @@ enum {
ResourceManager* resManager;
ResourceManagerPanel* resManagerPanel;
- //NSMutableArray* assetsFontListTTF;
+ // Project
+ ProjectSettings* projectSettings;
+
+ // Project display
+ IBOutlet NSOutlineView* outlineProject;
+ ResourceManagerOutlineHandler* projectOutlineHandler;
// Documents
CCBDocument* currentDocument;
@@ -115,6 +126,12 @@ enum {
CCBTransparentWindow* guiWindow;
CCBTransparentView* guiView;
+ // Warnings
+ WarningsWindow* publishWarningsWindow;
+
+ // Modal status window
+ TaskStatusWindow* modalTaskStatusWindow;
+
@private
NSWindow *window;
@@ -142,6 +159,8 @@ enum {
@property (nonatomic,readonly) CCBTransparentView* guiView;
@property (nonatomic,readonly) CCBTransparentWindow* guiWindow;
+@property (nonatomic,retain) ProjectSettings* projectSettings;
+
// Transparent window
- (void) resizeGUIWindow:(NSSize)size;
@@ -153,9 +172,9 @@ enum {
- (void) updateInspectorFromSelection;
- (void) switchToDocument:(CCBDocument*) document;
- (void) closeLastDocument;
+- (void) openFile:(NSString*) fileName;
// Menu options
-
- (void) dropAddSpriteNamed:(NSString*)spriteFile inSpriteSheet:(NSString*)spriteSheetFile at:(CGPoint)pt parent:(CCNode*)parent;
- (void) dropAddSpriteNamed:(NSString*)spriteFile inSpriteSheet:(NSString*)spriteSheetFile at:(CGPoint)pt;
@@ -167,6 +186,7 @@ enum {
- (IBAction) menuDeselect:(id)sender;
- (IBAction) menuCloseDocument:(id)sender;
+- (void) closeProject;
- (BOOL) addCCObject:(CCNode *)obj toParent:(CCNode*)parent atIndex:(int)index;
- (BOOL) addCCObject:(CCNode *)obj toParent:(CCNode*)parent;
@@ -192,6 +212,7 @@ enum {
- (void) reloadResources;
- (IBAction) menuAlignChildren:(id)sender;
- (IBAction)menuAddStickyNote:(id)sender;
+- (IBAction) menuCleanCacheDirectories:(id)sender;
// Undo / Redo
- (void) updateDirtyMark;
@@ -203,7 +224,15 @@ enum {
- (IBAction) debug:(id)sender;
+// Publishing
+- (void) publisher:(CCBPublisher*)publisher finishedWithWarnings:(CCBWarnings*)warnings;
+
// For warning messages
- (void) modalDialogTitle: (NSString*)title message:(NSString*)msg;
+// Modal status messages (progress)
+- (void) modalStatusWindowStartWithTitle:(NSString*)title;
+- (void) modalStatusWindowFinish;
+- (void) modalStatusWindowUpdateStatusText:(NSString*) text;
+
@end
View
354 CocosBuilder/ccBuilder/CocosBuilderAppDelegate.m
@@ -55,12 +55,34 @@
#import "CCBTransparentView.h"
#import "NotesLayer.h"
#import "ResolutionSetting.h"
+#import "ProjectSettingsWindow.h"
+#import "ProjectSettings.h"
+#import "ResourceManagerOutlineHandler.h"
+#import "SavePanelLimiter.h"
+#import "CCBPublisher.h"
+#import "CCBWarnings.h"
+#import "WarningsWindow.h"
+#import "TaskStatusWindow.h"
#import <ExceptionHandling/NSExceptionHandler.h>
@implementation CocosBuilderAppDelegate
-@synthesize window, currentDocument, cocosView, canEditContentSize, canEditCustomClass, hasOpenedDocument, defaultCanvasSize, plugInManager, resManager, showGuides, snapToGuides, guiView, guiWindow, showStickyNotes;
+@synthesize window;
+@synthesize projectSettings;
+@synthesize currentDocument;
+@synthesize cocosView;
+@synthesize canEditContentSize;
+@synthesize canEditCustomClass;
+@synthesize hasOpenedDocument;
+@synthesize defaultCanvasSize;
+@synthesize plugInManager;
+@synthesize resManager;
+@synthesize showGuides;
+@synthesize snapToGuides;
+@synthesize guiView;
+@synthesize guiWindow;
+@synthesize showStickyNotes;
#pragma mark Setup functions
@@ -128,10 +150,11 @@ - (void) setupTabBar
[window setShowsToolbarButton:NO];
}
+/*
- (void) setupDefaultDocument
{
- currentDocument = [[CCBDocument alloc] init];
-}
+ //currentDocument = [[CCBDocument alloc] init];
+}*/
- (void) setupResourceManager
{
@@ -139,6 +162,9 @@ - (void) setupResourceManager
resManager = [ResourceManager sharedManager];
resManagerPanel = [[ResourceManagerPanel alloc] initWithWindowNibName:@"ResourceManagerPanel"];
[resManagerPanel.window setIsVisible:NO];
+
+ // Setup project display
+ projectOutlineHandler = [[ResourceManagerOutlineHandler alloc] initWithOutlineView:outlineProject resType:kCCBResTypeNone];
}
- (void) setupGUIWindow
@@ -171,7 +197,7 @@ - (void)applicationDidFinishLaunching:(NSNotification *)aNotification
[window setDelegate:self];
[self setupTabBar];
- [self setupDefaultDocument];
+ //[self setupDefaultDocument];
[self setupInspectorPane];
[self setupCocos2d];
[self setupOutlineView];
@@ -226,6 +252,36 @@ - (void) modalDialogTitle: (NSString*)title message:(NSString*)msg
[alert runModal];
}
+- (void) modalStatusWindowStartWithTitle:(NSString*)title
+{
+ if (!modalTaskStatusWindow)
+ {
+ modalTaskStatusWindow = [[TaskStatusWindow alloc] initWithWindowNibName:@"TaskStatusWindow"];
+ }
+
+ modalTaskStatusWindow.window.title = title;
+ [modalTaskStatusWindow.window center];
+ [modalTaskStatusWindow.window makeKeyAndOrderFront:self];
+
+ [[NSApplication sharedApplication] runModalForWindow:modalTaskStatusWindow.window];
+
+ //NSModalSession modalSession = [[NSApplication sharedApplication] beginModalSessionForWindow:modalTaskStatusWindow.window];
+ //[[NSApplication sharedApplication] runModalSession:modalSession];
+}
+
+- (void) modalStatusWindowFinish
+{
+ [[NSApplication sharedApplication] stopModal];
+ [modalTaskStatusWindow.window orderOut:self];
+
+ //[modalTaskStatusWindow.window setIsVisible:NO];
+}
+
+- (void) modalStatusWindowUpdateStatusText:(NSString*) text
+{
+ modalTaskStatusWindow.status = text;
+}
+
#pragma mark Handling the gui layer
- (void) resizeGUIWindow:(NSSize)size
@@ -263,19 +319,6 @@ - (void)tabView:(NSTabView*)tv didSelectTabViewItem:(NSTabViewItem *)tabViewItem
- (void)tabView:(NSTabView *)aTabView didCloseTabViewItem:(NSTabViewItem *)tabViewItem
{
- CCBDocument* doc = [tabViewItem identifier];
-
- // Remove directory paths from resource manager
- [resManager removeDirectory:doc.rootPath];
- NSArray* paths = [doc.project objectForKey:@"resourcePaths"];
- if (paths)
- {
- for (NSString* path in paths)
- {
- [resManager removeDirectory:path];
- }
- }
-
if ([[aTabView tabViewItems] count] == 0)
{
[self closeLastDocument];
@@ -874,16 +917,6 @@ - (void) replaceDocumentData:(NSMutableDictionary*)doc
}
}
-- (void) setRMActiveDirectoriesForDoc:(CCBDocument*)doc
-{
- NSArray* activeDirs = [NSMutableArray arrayWithObject:doc.rootPath];
- if (doc.project && [doc.project objectForKey:@"resourcePaths"])
- {
- activeDirs = [activeDirs arrayByAddingObjectsFromArray:[doc.project objectForKey:@"resourcePaths"]];
- }
- [[ResourceManager sharedManager] setActiveDirectories:activeDirs];
-}
-
- (void) switchToDocument:(CCBDocument*) document forceReload:(BOOL)forceReload
{
if (!forceReload && [document.fileName isEqualToString:currentDocument.fileName]) return;
@@ -894,9 +927,6 @@ - (void) switchToDocument:(CCBDocument*) document forceReload:(BOOL)forceReload
NSMutableDictionary* doc = document.docData;
- // Update active directories for the resource manager
- [self setRMActiveDirectoriesForDoc:document];
-
[self replaceDocumentData:doc];
[self updateResolutionMenu];
@@ -928,6 +958,7 @@ - (void) closeLastDocument
[g.cocosScene.guideLayer removeAllGuides];
[g.cocosScene.notesLayer removeAllNotes];
[g.cocosScene.rulerLayer mouseExited:NULL];
+ self.currentDocument = NULL;
[outlineHierarchy reloadData];
@@ -958,19 +989,6 @@ - (NSTabViewItem*) tabViewItemFromDoc:(CCBDocument*)docRef
return NULL;
}
-- (void) addRMDirectoriesForDoc:(CCBDocument*)doc
-{
- [resManager addDirectory:doc.rootPath];
- NSArray* paths = [doc.project objectForKey:@"resourcePaths"];
- if (paths)
- {
- for (NSString* path in paths)
- {
- [resManager addDirectory:path];
- }
- }
-}
-
- (void) checkForTooManyDirectoriesInCurrentDoc
{
if (!currentDocument) return;
@@ -988,13 +1006,98 @@ - (void) checkForTooManyDirectoriesInCurrentDoc
}
}
-- (void) openFile:(NSString*) fileName
+- (void) checkForTooManyDirectoriesInCurrentProject
{
- [[[CCDirector sharedDirector] view] lockOpenGLContext];
-
+ NSLog(@"checkForTooManyDirectoriesInCurrentProject");
+
+ if (!projectSettings) return;
+
+ if ([ResourceManager sharedManager].tooManyDirectoriesAdded)
+ {
+ [self closeProject];
+
+ // Notify the user
+ [[[CCBGlobals globals] appDelegate] modalDialogTitle:@"Too Many Directories" message:@"You have created or opened a project which is in a directory with very many sub directories. Please save your project-files in a directory together with the resources you use in your project."];
+ }
+}
+
+- (BOOL) createProject:(NSString*) fileName
+{
+ // Create a default project
+ ProjectSettings* settings = [[[ProjectSettings alloc] init] autorelease];
+ settings.projectPath = fileName;
+ return [settings store];
+}
+
+- (void) updateResourcePathsFromProjectSettings
+{
+ [resManager removeAllDirectories];
+
+ // Setup links to directories
+ for (NSString* dir in [projectSettings absoluteResourcePaths])
+ {
+ [resManager addDirectory:dir];
+ }
+ [[ResourceManager sharedManager] setActiveDirectories:[projectSettings absoluteResourcePaths]];
+}
+
+- (void) closeProject
+{
+ while ([tabView numberOfTabViewItems] > 0)
+ {
+ NSTabViewItem* item = [self tabViewItemFromDoc:currentDocument];
+ if (!item) return;
+
+ if ([self tabView:tabView shouldCloseTabViewItem:item])
+ {
+ [tabView removeTabViewItem:item];
+ }
+ else
+ {
+ // Aborted close project
+ return;
+ }
+ }
+
+ // Remove resource paths
+ self.projectSettings = NULL;
+ [resManager removeAllDirectories];
+}
+
+- (void) openProject:(NSString*) fileName
+{
+ // TODO: Close currently open project
+ [self closeProject];
+
// Add to recent list of opened documents
[[NSDocumentController sharedDocumentController] noteNewRecentDocumentURL:[NSURL fileURLWithPath:fileName]];
+ NSMutableDictionary* projectDict = [NSMutableDictionary dictionaryWithContentsOfFile:fileName];
+ if (!projectDict)
+ {
+ [self modalDialogTitle:@"Invalid Project File" message:@"Failed to open the project. File may be missing or invalid."];
+ return;
+ }
+
+ ProjectSettings* project = [[[ProjectSettings alloc] initWithSerialization:projectDict] autorelease];
+ if (!project)
+ {
+ [self modalDialogTitle:@"Invalid Project File" message:@"Failed to open the project. File is invalid or is created with a newer version of CocosBuilder."];
+ return;
+ }
+ project.projectPath = fileName;
+
+ self.projectSettings = project;
+
+ [self updateResourcePathsFromProjectSettings];
+
+ [self checkForTooManyDirectoriesInCurrentProject];
+}
+
+- (void) openFile:(NSString*) fileName
+{
+ [[[CCDirector sharedDirector] view] lockOpenGLContext];
+
// Check if file is already open
CCBDocument* openDoc = [self findDocumentFromFile:fileName];
if (openDoc)
@@ -1014,9 +1117,6 @@ - (void) openFile:(NSString*) fileName
newDoc.exportPlugIn = [doc objectForKey:@"exportPlugIn"];
newDoc.exportFlattenPaths = [[doc objectForKey:@"exportFlattenPaths"] boolValue];
- // Add directories to resource manager
- [self addRMDirectoriesForDoc:newDoc];
-
[self switchToDocument:newDoc];
[self addDocument:newDoc];
@@ -1029,9 +1129,6 @@ - (void) openFile:(NSString*) fileName
- (void) saveFile:(NSString*) fileName
{
- // Add to recent list of opened documents
- [[NSDocumentController sharedDocumentController] noteNewRecentDocumentURL:[NSURL fileURLWithPath:fileName]];
-
NSMutableDictionary* doc = [self docDataFromCurrentNodeGraph];
[doc writeToFile:fileName atomically:YES];
@@ -1083,9 +1180,6 @@ - (void) newFile:(NSString*) fileName type:(NSString*)type resolutions: (NSMutab
if (item) [tabView removeTabViewItem:item];
}
- // Add to recent list of opened documents
- [[NSDocumentController sharedDocumentController] noteNewRecentDocumentURL:[NSURL fileURLWithPath:fileName]];
-
[self prepareForDocumentSwitch];
CCBGlobals* g = [CCBGlobals globals];
@@ -1107,9 +1201,6 @@ - (void) newFile:(NSString*) fileName type:(NSString*)type resolutions: (NSMutab
[self saveFile:fileName];
- [self addRMDirectoriesForDoc:self.currentDocument];
- [self setRMActiveDirectoriesForDoc:self.currentDocument];
-
[self addDocument:currentDocument];
self.hasOpenedDocument = YES;
@@ -1124,7 +1215,7 @@ - (void) newFile:(NSString*) fileName type:(NSString*)type resolutions: (NSMutab
- (BOOL) application:(NSApplication *)sender openFile:(NSString *)filename
{
- [self openFile:filename];
+ [self openProject:filename];
return YES;
}
@@ -1428,14 +1519,15 @@ - (IBAction) saveDocumentAs:(id)sender
{
if (!currentDocument) return;
- [[[CCDirector sharedDirector] view] lockOpenGLContext];
-
NSSavePanel* saveDlg = [NSSavePanel savePanel];
[saveDlg setAllowedFileTypes:[NSArray arrayWithObject:@"ccb"]];
+ SavePanelLimiter* limter = [[SavePanelLimiter alloc] initWithPanel:saveDlg resManager:resManager];
[saveDlg beginSheetModalForWindow:window completionHandler:^(NSInteger result){
if (result == NSOKButton)
{
+ [[[CCDirector sharedDirector] view] lockOpenGLContext];
+
// Save file to new path
[self saveFile:[[saveDlg URL] path]];
@@ -1444,10 +1536,11 @@ - (IBAction) saveDocumentAs:(id)sender
// Open newly created document
[self openFile:[[saveDlg URL] path]];
+
+ [[[CCDirector sharedDirector] view] unlockOpenGLContext];
}
+ [limter release];
}];
-
- [[[CCDirector sharedDirector] view] unlockOpenGLContext];
}
- (IBAction) saveDocument:(id)sender
@@ -1462,71 +1555,50 @@ - (IBAction) saveDocument:(id)sender
}
}
-- (IBAction) publishDocumentAs:(id)sender
+- (IBAction) menuPublishProject:(id)sender
{
- NSSavePanel* saveDlg = [NSSavePanel savePanel];
+ CCBWarnings* warnings = [[[CCBWarnings alloc] init] autorelease];
+ warnings.warningsDescription = @"Publisher Warnings";
- // Setup accessory view
- PublishTypeAccessoryView* accessoryView = [[PublishTypeAccessoryView alloc] init];
- accessoryView.savePanel = saveDlg;
- accessoryView.flattenPaths = currentDocument.exportFlattenPaths;
- [NSBundle loadNibNamed:@"PublishTypeAccessoryView" owner:accessoryView];
- NSView* view = accessoryView.view;
- saveDlg.accessoryView = view;
+ // Setup publisher
+ CCBPublisher* publisher = [[CCBPublisher alloc] initWithProjectSettings:projectSettings warnings:warnings];
- // Set allowed extension
- NSString* defaultFileExtension = [[[PlugInManager sharedManager] plugInExportForIndex:0] extension];
- [saveDlg setAllowedFileTypes:[NSArray arrayWithObject:defaultFileExtension]];
+ // Open progress window and publish
- // Set default name
- NSString* exportName = [[currentDocument.fileName lastPathComponent] stringByDeletingPathExtension];
- [saveDlg setNameFieldStringValue:exportName];
+ [publisher publish];
- // Run the dialog
- [saveDlg beginSheetModalForWindow:window completionHandler:^(NSInteger result){
- if (result == NSOKButton)
- {
- NSString* exportTypeName = [[[PlugInManager sharedManager] plugInExportForIndex: accessoryView.selectedIndex] extension];
- NSString* absPath = [[saveDlg URL] path];
- NSString* relPath = [absPath relativePathFromBaseDirPath:[currentDocument.fileName stringByDeletingLastPathComponent]];
-
- currentDocument.exportPlugIn = exportTypeName;
- currentDocument.exportPath = relPath;
- currentDocument.exportFlattenPaths = accessoryView.flattenPaths;
-
- [self exportFile:absPath withPlugIn:currentDocument.exportPlugIn];
- }
- }];
+ [self modalStatusWindowStartWithTitle:@"Publishing"];
+ [self modalStatusWindowUpdateStatusText:@"Starting up..."];
}
-- (IBAction) publishDocument:(id)sender
+- (IBAction) menuCleanCacheDirectories:(id)sender
{
- if (!currentDocument) return;
-
- NSString* absPath = [currentDocument.exportPath absolutePathFromBaseDirPath:[currentDocument.fileName stringByDeletingLastPathComponent]];
+ [CCBPublisher cleanAllCacheDirectories];
+}
+
+- (void) publisher:(CCBPublisher*)publisher finishedWithWarnings:(CCBWarnings*)warnings
+{
+ [self modalStatusWindowFinish];
- if (absPath &&
- currentDocument.exportPlugIn &&
- [[NSFileManager defaultManager] fileExistsAtPath:absPath] )
+ // Create warnings window if it is not already created
+ if (!publishWarningsWindow)
{
- [self exportFile:absPath withPlugIn:currentDocument.exportPlugIn];
- }
- else
- {
- if (sender)
- {
- [self publishDocumentAs:sender];
- }
- else
- {
- // Temp fix for exporting directories
- [self exportFile:[currentDocument.fileName stringByAppendingString:@"i"] withPlugIn:[[[PlugInManager sharedManager] plugInExportForIndex:0] extension]];
- }
+ publishWarningsWindow = [[WarningsWindow alloc] initWithWindowNibName:@"WarningsWindow"];
}
+
+ // Update and show warnings window
+ publishWarningsWindow.warnings = warnings;
+
+ [[publishWarningsWindow window] setIsVisible:(warnings.warnings.count > 0)];
+}
+
+- (IBAction) menuPublishProjectAndRun:(id)sender
+{
+
}
// Temporary utility function until new publish system is in place
-- (IBAction)publishDirectory:(id)sender
+- (IBAction)menuUpdateCCBsInDirectory:(id)sender
{
NSOpenPanel* openDlg = [NSOpenPanel openPanel];
[openDlg setCanChooseFiles:NO];
@@ -1562,12 +1634,28 @@ - (IBAction)publishDirectory:(id)sender
}];
}
+- (IBAction) menuProjectSettings:(id)sender
+{
+ if (!projectSettings) return;
+
+ ProjectSettingsWindow* wc = [[[ProjectSettingsWindow alloc] initWithWindowNibName:@"ProjectSettingsWindow"] autorelease];
+ wc.projectSettings = self.projectSettings;
+
+ int success = [wc runModalSheetForWindow:window];
+ if (success)
+ {
+ [self.projectSettings store];
+ [self updateResourcePathsFromProjectSettings];
+ [self reloadResources];
+ }
+}
+
- (IBAction) openDocument:(id)sender
{
// Create the File Open Dialog
NSOpenPanel* openDlg = [NSOpenPanel openPanel];
[openDlg setCanChooseFiles:YES];
- [openDlg setAllowedFileTypes:[NSArray arrayWithObject:@"ccb"]];
+ [openDlg setAllowedFileTypes:[NSArray arrayWithObject:@"ccbproj"]];
[openDlg beginSheetModalForWindow:window completionHandler:^(NSInteger result){
if (result == NSOKButton)
@@ -1577,7 +1665,34 @@ - (IBAction) openDocument:(id)sender
for (int i = 0; i < [files count]; i++)
{
NSString* fileName = [[files objectAtIndex:i] path];
- [self openFile:fileName];
+ [self openProject:fileName];
+ }
+ }
+ }];
+}
+
+- (IBAction) menuCloseProject:(id)sender
+{
+ [self closeProject];
+}
+
+- (IBAction) menuNewProject:(id)sender
+{
+ // Accepted create document, prompt for place for file
+ NSSavePanel* saveDlg = [NSSavePanel savePanel];
+ [saveDlg setAllowedFileTypes:[NSArray arrayWithObject:@"ccbproj"]];
+
+ [saveDlg beginSheetModalForWindow:window completionHandler:^(NSInteger result){
+ if (result == NSOKButton)
+ {
+ NSString* fileName = [[saveDlg URL] path];
+ if ([self createProject: fileName])
+ {
+ [self openProject:fileName];
+ }
+ else
+ {
+ [self modalDialogTitle:@"Failed to Create Project" message:@"Failed to create the project, make sure you are saving it to a writable directory."];
}
}
}];
@@ -1599,12 +1714,16 @@ - (IBAction) newDocument:(id)sender
NSSavePanel* saveDlg = [NSSavePanel savePanel];
[saveDlg setAllowedFileTypes:[NSArray arrayWithObject:@"ccb"]];
+#warning FIX
+ SavePanelLimiter* limiter = [[SavePanelLimiter alloc] initWithPanel:saveDlg resManager:resManager];
+
[saveDlg beginSheetModalForWindow:window completionHandler:^(NSInteger result){
if (result == NSOKButton)
{
[self newFile:[[saveDlg URL] path] type:wc.rootObjectType resolutions:wc.availableResolutions];
}
[wc release];
+ [limiter release];
}];
}
else
@@ -1875,9 +1994,6 @@ - (IBAction) debug:(id)sender
{
NSLog(@"DEBUG");
- //ResourceManager* rm = [ResourceManager sharedManager];
- //[rm debugPrintDirectories];
-
NSLog(@"currentDocument.resolutions: %@",currentDocument.resolutions);
}
View
1  CocosBuilder/ccBuilder/InspectorBlockCCControl.xib
@@ -55,7 +55,6 @@
<string key="NSFrameSize">{233, 5}</string>
<reference key="NSSuperview" ref="1005"/>
<reference key="NSWindow"/>
- <reference key="NSNextKeyView"/>
<string key="NSOffsets">{0, 0}</string>
<object class="NSTextFieldCell" key="NSTitleCell">
<int key="NSCellFlags">67239424</int>
View
16 CocosBuilder/ccBuilder/InspectorByte.xib
@@ -49,7 +49,7 @@
<string key="NSFrame">{{106, 12}, {57, 19}}</string>
<reference key="NSSuperview" ref="1005"/>
<reference key="NSWindow"/>
- <reference key="NSNextKeyView"/>
+ <reference key="NSNextKeyView" ref="304649497"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="825685374">
<int key="NSCellFlags">-1804468671</int>
@@ -87,7 +87,7 @@
<real value="0.0"/>
<integer value="0"/>
<string>-∞</string>
- <string/>
+ <string>L!nDy</string>
<integer value="1"/>
<string>+∞</string>
<boolean value="NO"/>
@@ -99,11 +99,8 @@
<nil key="NS.negativeattrs"/>
<nil key="NS.zero"/>
<object class="NSAttributedString" key="NS.nil">
- <string key="NSString"/>
- </object>
- <object class="NSAttributedString" key="NS.nan">
- <string key="NSString">NaN</string>
- <object class="NSDictionary" key="NSAttributes">
+ <string key="NSString">L!nDy</string>
+ <object class="NSDictionary" key="NSAttributes" id="609959516">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys" id="0">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -111,6 +108,10 @@
<reference key="dict.values" ref="0"/>
</object>
</object>
+ <object class="NSAttributedString" key="NS.nan">
+ <string key="NSString">NaN</string>
+ <reference key="NSAttributes" ref="609959516"/>
+ </object>
<real value="0.0" key="NS.min"/>
<real value="255" key="NS.max"/>
<object class="NSDecimalNumberHandler" key="NS.rounding">
@@ -182,6 +183,7 @@
<string key="NSFrame">{{103, 0}, {63, 11}}</string>
<reference key="NSSuperview" ref="1005"/>
<reference key="NSWindow"/>
+ <reference key="NSNextKeyView"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="649659982">
<int key="NSCellFlags">68288064</int>
View
13 CocosBuilder/ccBuilder/InspectorDegrees.xib
@@ -83,7 +83,7 @@
<integer value="1"/>
<integer value="1"/>
<string>-∞</string>
- <string/>
+ <string>L!nDy</string>
<integer value="1"/>
<string>+∞</string>
<boolean value="NO"/>
@@ -95,11 +95,8 @@
<nil key="NS.negativeattrs"/>
<nil key="NS.zero"/>
<object class="NSAttributedString" key="NS.nil">
- <string key="NSString"/>
- </object>
- <object class="NSAttributedString" key="NS.nan">
- <string key="NSString">NaN</string>
- <object class="NSDictionary" key="NSAttributes">
+ <string key="NSString">L!nDy</string>
+ <object class="NSDictionary" key="NSAttributes" id="691655583">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys" id="0">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -107,6 +104,10 @@
<reference key="dict.values" ref="0"/>
</object>
</object>
+ <object class="NSAttributedString" key="NS.nan">
+ <string key="NSString">NaN</string>
+ <reference key="NSAttributes" ref="691655583"/>
+ </object>
<object class="NSDecimalNumberPlaceholder" key="NS.min" id="641394971">
<int key="NS.exponent">0</int>
<int key="NS.length">0</int>
View
13 CocosBuilder/ccBuilder/InspectorFloat.xib
@@ -83,7 +83,7 @@
<integer value="2"/>
<integer value="2"/>
<string>-∞</string>
- <string/>
+ <string>L!nDy</string>
<integer value="1"/>
<string>+∞</string>
<boolean value="NO"/>
@@ -95,11 +95,8 @@
<nil key="NS.negativeattrs"/>
<nil key="NS.zero"/>
<object class="NSAttributedString" key="NS.nil">
- <string key="NSString"/>
- </object>
- <object class="NSAttributedString" key="NS.nan">
- <string key="NSString">NaN</string>
- <object class="NSDictionary" key="NSAttributes">
+ <string key="NSString">L!nDy</string>
+ <object class="NSDictionary" key="NSAttributes" id="988053295">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys" id="0">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -107,6 +104,10 @@
<reference key="dict.values" ref="0"/>
</object>
</object>
+ <object class="NSAttributedString" key="NS.nan">
+ <string key="NSString">NaN</string>
+ <reference key="NSAttributes" ref="988053295"/>
+ </object>
<object class="NSDecimalNumberPlaceholder" key="NS.min" id="641394971">
<int key="NS.exponent">0</int>
<int key="NS.length">0</int>
View
13 CocosBuilder/ccBuilder/InspectorFloatScale.xib
@@ -126,7 +126,7 @@
<integer value="2"/>
<integer value="2"/>
<string>-∞</string>
- <string/>
+ <string>L!nDy</string>
<integer value="1"/>
<string>+∞</string>
<boolean value="NO"/>
@@ -138,11 +138,8 @@
<nil key="NS.negativeattrs"/>
<nil key="NS.zero"/>
<object class="NSAttributedString" key="NS.nil">
- <string key="NSString"/>
- </object>
- <object class="NSAttributedString" key="NS.nan">
- <string key="NSString">NaN</string>
- <object class="NSDictionary" key="NSAttributes">
+ <string key="NSString">L!nDy</string>
+ <object class="NSDictionary" key="NSAttributes" id="200297769">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys" id="0">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -150,6 +147,10 @@
<reference key="dict.values" ref="0"/>
</object>
</object>
+ <object class="NSAttributedString" key="NS.nan">
+ <string key="NSString">NaN</string>
+ <reference key="NSAttributes" ref="200297769"/>
+ </object>
<object class="NSDecimalNumberPlaceholder" key="NS.min" id="641394971">
<int key="NS.exponent">0</int>
<int key="NS.length">0</int>
View
16 CocosBuilder/ccBuilder/InspectorFloatVar.xib
@@ -123,7 +123,7 @@
<integer value="2"/>
<integer value="2"/>
<string>-∞</string>
- <string/>
+ <string>L!nDy</string>
<integer value="1"/>
<string>+∞</string>
<boolean value="NO"/>
@@ -135,10 +135,7 @@
<nil key="NS.negativeattrs"/>
<nil key="NS.zero"/>
<object class="NSAttributedString" key="NS.nil">
- <string key="NSString"/>
- </object>
- <object class="NSAttributedString" key="NS.nan">
- <string key="NSString">NaN</string>
+ <string key="NSString">L!nDy</string>
<object class="NSDictionary" key="NSAttributes" id="983596387">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys" id="0">
@@ -147,6 +144,10 @@
<reference key="dict.values" ref="0"/>
</object>
</object>
+ <object class="NSAttributedString" key="NS.nan">
+ <string key="NSString">NaN</string>
+ <reference key="NSAttributes" ref="983596387"/>
+ </object>
<object class="NSDecimalNumberPlaceholder" key="NS.min" id="892198646">
<int key="NS.exponent">0</int>
<int key="NS.length">0</int>
@@ -223,7 +224,7 @@
<integer value="2"/>
<integer value="2"/>
<string>-∞</string>
- <string/>
+ <string>L!nDy</string>
<integer value="1"/>
<string>+∞</string>
<boolean value="NO"/>
@@ -235,7 +236,8 @@
<nil key="NS.negativeattrs"/>
<nil key="NS.zero"/>
<object class="NSAttributedString" key="NS.nil">
- <string key="NSString"/>
+ <string key="NSString">L!nDy</string>
+ <reference key="NSAttributes" ref="983596387"/>
</object>
<object class="NSAttributedString" key="NS.nan">
<string key="NSString">NaN</string>
View
13 CocosBuilder/ccBuilder/InspectorInteger.xib
@@ -83,7 +83,7 @@
<integer value="0"/>
<integer value="0"/>
<string>-∞</string>
- <string/>
+ <string>L!nDy</string>
<integer value="1"/>
<string>+∞</string>
<boolean value="NO"/>
@@ -95,11 +95,8 @@
<nil key="NS.negativeattrs"/>
<nil key="NS.zero"/>
<object class="NSAttributedString" key="NS.nil">
- <string key="NSString"/>
- </object>
- <object class="NSAttributedString" key="NS.nan">
- <string key="NSString">NaN</string>
- <object class="NSDictionary" key="NSAttributes">
+ <string key="NSString">L!nDy</string>
+ <object class="NSDictionary" key="NSAttributes" id="333608691">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys" id="0">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -107,6 +104,10 @@
<reference key="dict.values" ref="0"/>
</object>
</object>
+ <object class="NSAttributedString" key="NS.nan">
+ <string key="NSString">NaN</string>
+ <reference key="NSAttributes" ref="333608691"/>
+ </object>
<object class="NSDecimalNumberPlaceholder" key="NS.min" id="641394971">
<int key="NS.exponent">0</int>
<int key="NS.length">0</int>
View
16 CocosBuilder/ccBuilder/InspectorPoint.xib
@@ -85,7 +85,7 @@
<integer value="3"/>
<integer value="2"/>
<string>-∞</string>
- <string/>
+ <string>L!nDy</string>
<integer value="1"/>
<string>+∞</string>
<boolean value="NO"/>
@@ -97,10 +97,7 @@
<nil key="NS.negativeattrs"/>
<nil key="NS.zero"/>
<object class="NSAttributedString" key="NS.nil">
- <string key="NSString"/>
- </object>
- <object class="NSAttributedString" key="NS.nan">
- <string key="NSString">NaN</string>
+ <string key="NSString">L!nDy</string>
<object class="NSDictionary" key="NSAttributes" id="983596387">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys" id="0">
@@ -109,6 +106,10 @@
<reference key="dict.values" ref="0"/>
</object>
</object>
+ <object class="NSAttributedString" key="NS.nan">
+ <string key="NSString">NaN</string>
+ <reference key="NSAttributes" ref="983596387"/>
+ </object>
<object class="NSDecimalNumberPlaceholder" key="NS.min" id="892198646">
<int key="NS.exponent">0</int>
<int key="NS.length">0</int>
@@ -188,7 +189,7 @@
<integer value="3"/>
<integer value="2"/>
<string>-∞</string>
- <string/>
+ <string>L!nDy</string>
<integer value="1"/>
<string>+∞</string>
<boolean value="NO"/>
@@ -200,7 +201,8 @@
<nil key="NS.negativeattrs"/>
<nil key="NS.zero"/>
<object class="NSAttributedString" key="NS.nil">
- <string key="NSString"/>
+ <string key="NSString">L!nDy</string>
+ <reference key="NSAttributes" ref="983596387"/>
</object>
<object class="NSAttributedString" key="NS.nan">
<string key="NSString">NaN</string>
View
16 CocosBuilder/ccBuilder/InspectorPointLock.xib
@@ -121,7 +121,7 @@
<integer value="3"/>
<integer value="2"/>
<string>-∞</string>
- <string/>
+ <string>L!nDy</string>
<integer value="1"/>
<string>+∞</string>
<boolean value="NO"/>
@@ -133,10 +133,7 @@
<nil key="NS.negativeattrs"/>
<nil key="NS.zero"/>
<object class="NSAttributedString" key="NS.nil">
- <string key="NSString"/>
- </object>
- <object class="NSAttributedString" key="NS.nan">
- <string key="NSString">NaN</string>
+ <string key="NSString">L!nDy</string>
<object class="NSDictionary" key="NSAttributes" id="983596387">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys" id="0">
@@ -145,6 +142,10 @@
<reference key="dict.values" ref="0"/>
</object>
</object>
+ <object class="NSAttributedString" key="NS.nan">
+ <string key="NSString">NaN</string>
+ <reference key="NSAttributes" ref="983596387"/>
+ </object>
<object class="NSDecimalNumberPlaceholder" key="NS.min" id="892198646">
<int key="NS.exponent">0</int>
<int key="NS.length">0</int>
@@ -224,7 +225,7 @@
<integer value="3"/>
<integer value="2"/>
<string>-∞</string>
- <string/>
+ <string>L!nDy</string>
<integer value="1"/>
<string>+∞</string>
<boolean value="NO"/>
@@ -236,7 +237,8 @@
<nil key="NS.negativeattrs"/>
<nil key="NS.zero"/>
<object class="NSAttributedString" key="NS.nil">
- <string key="NSString"/>
+ <string key="NSString">L!nDy</string>
+ <reference key="NSAttributes" ref="983596387"/>
</object>
<object class="NSAttributedString" key="NS.nan">
<string key="NSString">NaN</string>
View
17 CocosBuilder/ccBuilder/InspectorPosition.xib
@@ -156,7 +156,7 @@
<integer value="1"/>
<integer value="1"/>
<string>-∞</string>
- <string/>
+ <string>L!nDy</string>
<integer value="1"/>
<string>+∞</string>
<boolean value="NO"/>
@@ -168,10 +168,7 @@
<nil key="NS.negativeattrs"/>
<nil key="NS.zero"/>
<object class="NSAttributedString" key="NS.nil">
- <string key="NSString"/>
- </object>
- <object class="NSAttributedString" key="NS.nan">
- <string key="NSString">NaN</string>
+ <string key="NSString">L!nDy</string>
<object class="NSDictionary" key="NSAttributes" id="983596387">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys" id="0">
@@ -180,6 +177,10 @@
<reference key="dict.values" ref="0"/>
</object>
</object>
+ <object class="NSAttributedString" key="NS.nan">
+ <string key="NSString">NaN</string>
+ <reference key="NSAttributes" ref="983596387"/>
+ </object>
<object class="NSDecimalNumberPlaceholder" key="NS.min" id="892198646">
<int key="NS.exponent">0</int>
<int key="NS.length">0</int>
@@ -259,7 +260,7 @@
<integer value="1"/>
<integer value="1"/>
<string>-∞</string>