fxruby 1.6.28-x64-mingw32 → 1.6.29-x64-mingw32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (229) hide show
  1. checksums.yaml +7 -7
  2. checksums.yaml.gz.sig +0 -0
  3. data.tar.gz.sig +3 -2
  4. data/.gitignore +1 -1
  5. data/History.txt +13 -1
  6. data/Manifest.txt +1 -1
  7. data/Rakefile +49 -39
  8. data/examples/RAA.rb +8 -2
  9. data/examples/WhatAQuietStiff.rb +2 -2
  10. data/examples/babelfish.rb +9 -2
  11. data/examples/browser.rb +1 -1
  12. data/examples/button.rb +3 -9
  13. data/examples/canvasdemo.rb +3 -3
  14. data/examples/charts.rb +9 -2
  15. data/examples/dctest.rb +4 -10
  16. data/examples/gembrowser.rb +4 -4
  17. data/examples/gltest.rb +3 -3
  18. data/examples/glviewer.rb +3 -9
  19. data/examples/groupbox.rb +3 -9
  20. data/examples/header.rb +1 -1
  21. data/examples/hello2.rb +1 -1
  22. data/examples/iRAA.rb +7 -1
  23. data/examples/iconlist.rb +3 -9
  24. data/examples/imageviewer.rb +3 -9
  25. data/examples/mditest.rb +1 -1
  26. data/examples/raabrowser.rb +8 -2
  27. data/examples/rmagick.rb +7 -1
  28. data/examples/shutter.rb +3 -9
  29. data/examples/splitter.rb +3 -9
  30. data/examples/table.rb +26 -3
  31. data/examples/textedit/textedit.rb +3 -3
  32. data/ext/fox16_c/FXRbApp.cpp +1 -1
  33. data/ext/fox16_c/FXRuby.cpp +18 -9
  34. data/ext/fox16_c/extconf.rb +252 -11
  35. data/ext/fox16_c/include/FXRbTreeList.h +3 -3
  36. data/ext/fox16_c/include/FXRuby.h +7 -6
  37. data/ext/fox16_c/markfuncs.cpp +3 -22
  38. data/ext/fox16_c/unregisterOwnedObjects.cpp +1 -2
  39. data/lib/2.0/fox16_c.so +0 -0
  40. data/lib/2.1/fox16_c.so +0 -0
  41. data/lib/2.2/fox16_c.so +0 -0
  42. data/lib/fox16.rb +16 -6
  43. data/lib/fox16/core.rb +14 -0
  44. data/lib/fox16/glshapes.rb +1 -0
  45. data/lib/fox16/version.rb +1 -1
  46. data/lib/x64-mingw32/libFOX-1.6-0.dll +0 -0
  47. data/lib/x64-mingw32/libfxscintilla-20.dll +0 -0
  48. data/lib/x64-mingw32/libgcc_s_sjlj-1.dll +0 -0
  49. data/lib/x64-mingw32/libjpeg-8.dll +0 -0
  50. data/lib/x64-mingw32/libpng15-15.dll +0 -0
  51. data/lib/x64-mingw32/libstdc++-6.dll +0 -0
  52. data/lib/x64-mingw32/libtiff-5.dll +0 -0
  53. data/lib/x64-mingw32/libwinpthread-1.dll +0 -0
  54. data/lib/x64-mingw32/zlib1.dll +0 -0
  55. data/rdoc-sources/FXBMPIcon.rb +1 -1
  56. data/rdoc-sources/FXImage.rb +8 -2
  57. data/swig-interfaces/FX4Splitter.i +0 -6
  58. data/swig-interfaces/FX7Segment.i +0 -8
  59. data/swig-interfaces/FXAccelTable.i +0 -7
  60. data/swig-interfaces/FXApp.i +15 -23
  61. data/swig-interfaces/FXArrowButton.i +0 -10
  62. data/swig-interfaces/FXBMPIcon.i +0 -2
  63. data/swig-interfaces/FXBMPImage.i +0 -2
  64. data/swig-interfaces/FXBitmap.i +0 -6
  65. data/swig-interfaces/FXButton.i +0 -4
  66. data/swig-interfaces/FXCURCursor.i +0 -2
  67. data/swig-interfaces/FXCanvas.i +0 -2
  68. data/swig-interfaces/FXCheckButton.i +0 -7
  69. data/swig-interfaces/FXChoiceBox.i +0 -8
  70. data/swig-interfaces/FXColorBar.i +0 -8
  71. data/swig-interfaces/FXColorDialog.i +0 -4
  72. data/swig-interfaces/FXColorList.i +0 -9
  73. data/swig-interfaces/FXColorRing.i +0 -40
  74. data/swig-interfaces/FXColorSelector.i +0 -25
  75. data/swig-interfaces/FXColorWell.i +0 -10
  76. data/swig-interfaces/FXColorWheel.i +0 -15
  77. data/swig-interfaces/FXComboBox.i +0 -7
  78. data/swig-interfaces/FXComposeContext.i +0 -5
  79. data/swig-interfaces/FXComposite.i +0 -4
  80. data/swig-interfaces/FXCursor.i +0 -9
  81. data/swig-interfaces/FXDC.i +0 -26
  82. data/swig-interfaces/FXDCPrint.i +0 -19
  83. data/swig-interfaces/FXDataTarget.i +0 -5
  84. data/swig-interfaces/FXDebugTarget.i +0 -4
  85. data/swig-interfaces/FXDelegator.i +0 -2
  86. data/swig-interfaces/FXDial.i +0 -14
  87. data/swig-interfaces/FXDialogBox.i +0 -2
  88. data/swig-interfaces/FXDict.i +0 -27
  89. data/swig-interfaces/FXDirDialog.i +0 -5
  90. data/swig-interfaces/FXDirList.i +0 -31
  91. data/swig-interfaces/FXDirSelector.i +0 -19
  92. data/swig-interfaces/FXDockBar.i +0 -8
  93. data/swig-interfaces/FXDockHandler.i +0 -10
  94. data/swig-interfaces/FXDockSite.i +0 -7
  95. data/swig-interfaces/FXDockTitle.i +0 -6
  96. data/swig-interfaces/FXDragCorner.i +0 -9
  97. data/swig-interfaces/FXDrawable.i +0 -7
  98. data/swig-interfaces/FXFileDialog.i +0 -5
  99. data/swig-interfaces/FXFileDict.i +0 -5
  100. data/swig-interfaces/FXFileList.i +0 -23
  101. data/swig-interfaces/FXFileSelector.i +0 -33
  102. data/swig-interfaces/FXFoldingList.i +6 -19
  103. data/swig-interfaces/FXFont.i +0 -20
  104. data/swig-interfaces/FXFontDialog.i +3 -7
  105. data/swig-interfaces/FXFontSelector.i +3 -29
  106. data/swig-interfaces/FXFrame.i +0 -20
  107. data/swig-interfaces/FXGIFIcon.i +0 -2
  108. data/swig-interfaces/FXGIFImage.i +0 -2
  109. data/swig-interfaces/FXGLCanvas.i +0 -4
  110. data/swig-interfaces/FXGLContext.i +0 -4
  111. data/swig-interfaces/FXGLShape.i +0 -11
  112. data/swig-interfaces/FXGLViewer.i +0 -65
  113. data/swig-interfaces/FXGradientBar.i +8 -9
  114. data/swig-interfaces/FXGroupBox.i +0 -6
  115. data/swig-interfaces/FXHeader.i +0 -24
  116. data/swig-interfaces/FXHorizontalFrame.i +0 -2
  117. data/swig-interfaces/FXICOIcon.i +0 -2
  118. data/swig-interfaces/FXICOImage.i +0 -2
  119. data/swig-interfaces/FXIcon.i +0 -7
  120. data/swig-interfaces/FXIconList.i +0 -51
  121. data/swig-interfaces/FXIconSource.i +0 -4
  122. data/swig-interfaces/FXId.i +0 -4
  123. data/swig-interfaces/FXImage.i +21 -4
  124. data/swig-interfaces/FXImageFrame.i +0 -7
  125. data/swig-interfaces/FXImageView.i +0 -6
  126. data/swig-interfaces/FXInputDialog.i +0 -8
  127. data/swig-interfaces/FXJPGIcon.i +0 -4
  128. data/swig-interfaces/FXJPGImage.i +0 -4
  129. data/swig-interfaces/FXKnob.i +0 -12
  130. data/swig-interfaces/FXLabel.i +0 -16
  131. data/swig-interfaces/FXList.i +0 -33
  132. data/swig-interfaces/FXListBox.i +0 -7
  133. data/swig-interfaces/FXMDIButton.i +0 -12
  134. data/swig-interfaces/FXMDIChild.i +0 -51
  135. data/swig-interfaces/FXMDIClient.i +0 -6
  136. data/swig-interfaces/FXMainWindow.i +0 -2
  137. data/swig-interfaces/FXMat3d.i +0 -2
  138. data/swig-interfaces/FXMat3f.i +0 -2
  139. data/swig-interfaces/FXMat4d.i +0 -2
  140. data/swig-interfaces/FXMat4f.i +0 -2
  141. data/swig-interfaces/FXMatrix.i +0 -4
  142. data/swig-interfaces/FXMemoryStream.i +0 -1
  143. data/swig-interfaces/FXMenuBar.i +0 -2
  144. data/swig-interfaces/FXMenuButton.i +0 -7
  145. data/swig-interfaces/FXMenuCaption.i +0 -15
  146. data/swig-interfaces/FXMenuCascade.i +0 -5
  147. data/swig-interfaces/FXMenuCheck.i +0 -8
  148. data/swig-interfaces/FXMenuCommand.i +0 -5
  149. data/swig-interfaces/FXMenuPane.i +0 -2
  150. data/swig-interfaces/FXMenuRadio.i +0 -8
  151. data/swig-interfaces/FXMenuSeparator.i +0 -5
  152. data/swig-interfaces/FXMenuTitle.i +0 -4
  153. data/swig-interfaces/FXMessageBox.i +13 -10
  154. data/swig-interfaces/FXOptionMenu.i +0 -7
  155. data/swig-interfaces/FXPCXIcon.i +0 -2
  156. data/swig-interfaces/FXPCXImage.i +0 -2
  157. data/swig-interfaces/FXPNGIcon.i +0 -2
  158. data/swig-interfaces/FXPNGImage.i +0 -2
  159. data/swig-interfaces/FXPPMIcon.i +0 -2
  160. data/swig-interfaces/FXPPMImage.i +0 -2
  161. data/swig-interfaces/FXPacker.i +0 -23
  162. data/swig-interfaces/FXPicker.i +0 -2
  163. data/swig-interfaces/FXPopup.i +0 -18
  164. data/swig-interfaces/FXPrintDialog.i +0 -31
  165. data/swig-interfaces/FXProgressBar.i +0 -12
  166. data/swig-interfaces/FXProgressDialog.i +0 -8
  167. data/swig-interfaces/FXRGBIcon.i +0 -2
  168. data/swig-interfaces/FXRGBImage.i +0 -2
  169. data/swig-interfaces/FXRadioButton.i +0 -7
  170. data/swig-interfaces/FXRecentFiles.i +0 -6
  171. data/swig-interfaces/FXRegion.i +0 -2
  172. data/swig-interfaces/FXRegistry.i +0 -12
  173. data/swig-interfaces/FXReplaceDialog.i +0 -15
  174. data/swig-interfaces/FXRootWindow.i +0 -6
  175. data/swig-interfaces/FXRuler.i +0 -45
  176. data/swig-interfaces/FXScrollArea.i +0 -14
  177. data/swig-interfaces/FXScrollBar.i +0 -2
  178. data/swig-interfaces/FXScrollPane.i +0 -10
  179. data/swig-interfaces/FXScrollWindow.i +0 -2
  180. data/swig-interfaces/FXSearchDialog.i +0 -2
  181. data/swig-interfaces/FXSeparator.i +0 -9
  182. data/swig-interfaces/FXSettings.i +0 -11
  183. data/swig-interfaces/FXShell.i +0 -4
  184. data/swig-interfaces/FXShutter.i +0 -14
  185. data/swig-interfaces/FXSlider.i +0 -19
  186. data/swig-interfaces/FXSpinner.i +0 -9
  187. data/swig-interfaces/FXSplashWindow.i +0 -8
  188. data/swig-interfaces/FXSplitter.i +0 -10
  189. data/swig-interfaces/FXSpring.i +0 -8
  190. data/swig-interfaces/FXStatusBar.i +0 -5
  191. data/swig-interfaces/FXStatusLine.i +0 -8
  192. data/swig-interfaces/FXStringDict.i +0 -3
  193. data/swig-interfaces/FXSwitcher.i +0 -4
  194. data/swig-interfaces/FXTGAIcon.i +0 -2
  195. data/swig-interfaces/FXTGAImage.i +0 -2
  196. data/swig-interfaces/FXTIFIcon.i +0 -4
  197. data/swig-interfaces/FXTIFImage.i +0 -4
  198. data/swig-interfaces/FXTabBar.i +0 -5
  199. data/swig-interfaces/FXTabBook.i +0 -2
  200. data/swig-interfaces/FXTabItem.i +0 -2
  201. data/swig-interfaces/FXTable.i +0 -17
  202. data/swig-interfaces/FXToggleButton.i +0 -12
  203. data/swig-interfaces/FXToolBarGrip.i +0 -4
  204. data/swig-interfaces/FXToolBarShell.i +0 -16
  205. data/swig-interfaces/FXToolBarTab.i +0 -13
  206. data/swig-interfaces/FXToolTip.i +0 -10
  207. data/swig-interfaces/FXTopWindow.i +0 -17
  208. data/swig-interfaces/FXTranslator.i +0 -2
  209. data/swig-interfaces/FXTreeList.i +18 -75
  210. data/swig-interfaces/FXTreeListBox.i +18 -38
  211. data/swig-interfaces/FXVerticalFrame.i +0 -2
  212. data/swig-interfaces/FXVisual.i +0 -38
  213. data/swig-interfaces/FXWindow.i +3 -53
  214. data/swig-interfaces/FXWizard.i +0 -17
  215. data/swig-interfaces/FXXBMIcon.i +0 -2
  216. data/swig-interfaces/FXXBMImage.i +0 -2
  217. data/swig-interfaces/FXXPMIcon.i +0 -2
  218. data/swig-interfaces/FXXPMImage.i +0 -2
  219. data/swig-interfaces/fxdefs.i +33 -35
  220. data/swig-interfaces/ruby-typemaps.i +19 -2
  221. data/test/TC_FXBMPImage.rb +13 -0
  222. data/test/TC_FXFileStream.rb +3 -3
  223. data/test/TC_FXImage.rb +40 -2
  224. data/test/TC_FXSize.rb +12 -0
  225. data/test/TC_FXWindow.rb +26 -0
  226. data/test/TC_Misc.rb +2 -0
  227. metadata +175 -159
  228. metadata.gz.sig +0 -0
  229. data/Rakefile.cross +0 -421
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
- ---
2
- SHA1:
3
- data.tar.gz: c320803e0fb89a6409f251244ee43abae6e67a8f
4
- metadata.gz: 7a5cd6026a8bb9b1ad4b448f2531f12d1fd2774f
5
- SHA512:
6
- data.tar.gz: 6f6f455985eb61e7d1708167ef1b8d441ad116670ea493068d376447fd1c492a1c9b1a8ff170976927ae79c5abfa0a7d66df82e5e086ed9a1db15054761d4717
7
- metadata.gz: 798a5fae533ffa5072a11f93406b08990198bfd6245cbf34d85f29b467992b33d34bd86ffb984faec6f1e3f796c9d784f2617a37e525bfd9dc09a0484afc2076
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 62ea05a13170399b0045b4f1b8dc4676e6406e99
4
+ data.tar.gz: 31ce6631312ea1da5af8f6ba9364ed66f24834df
5
+ SHA512:
6
+ metadata.gz: eea35082e677a3c2474d8e96859b16b731b9d097e25280476e13f7501cc5cd7fd644c015463a3dcbe142002539352918126510292bca7609b76a672292ee18ef
7
+ data.tar.gz: 97c99cf164f67bd0dd8ddb20fa30724b3dfd7c58b57538fe4467bc94c38a64fa46d69f2766e365461c1afecdf5a8ba4b0ca683a89d3e609341a0f9038ba9eb66
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
@@ -1,2 +1,3 @@
1
- }{w^{��(3J&�y´�,�e-$���$���,���_gx)���d�|�[ՠ'-$�Xq����V۪���f����*Pɏ�N��q?������L��A��z
2
- x27W;ʲcD��DIL4U��l��c���d�:RsI�Z�,޻�T����`�.p%C$��t`�M���-�nb'�JϢe�g�#�-K��Ш�Ҙ� u˛�����Z,�rn�pTW��9m���=��K\����EG�� O
1
+ /DK������ca9�����+��@Z**h)F��r9F���LN���´��F9i��S�sd�ѡ
2
+ ���>�x/#�� ��͠���㳵:uG>�44?C0�����B�;_4��$T��=�G=H 1�GY�Jʹ�e�62 �1%#��q:rn���~m��v�������X�����xl_�>�DZ˶V��w��U{`��Du���l.�DnlFu�Hx�gПo$
3
+ ����7^��:�{�PHuR7@�����
data/.gitignore CHANGED
@@ -6,7 +6,7 @@ ext/fox16_c/*_wrap.cpp
6
6
  ext/fox16_c/*.o
7
7
  ext/fox16_c/conftest.dSYM
8
8
  ext/fox16_c/include/inlinestubs.h
9
- ext/fox16_c/librb.c
9
+ ext/fox16_c/swigruby.h
10
10
  ext/fox16_c/fox16.bundle
11
11
  ext/fox16_c/mkmf.log
12
12
  lib/fox16/kwargs.rb
data/History.txt CHANGED
@@ -1,6 +1,18 @@
1
- === 1.6.28 / 2013-06-28
1
+ === 1.6.29 / 2015-02-17
2
+
3
+ * Add Windows binaries for Ruby-2.1 and 2.2.
4
+ * Use shared libs for Windows binary gems to reduce gem size.
5
+ * Allow non owned assignment of image data to FXImage derivations
6
+ without copy'ing pixel data.
7
+ * Allow retrival of parts of the pixel data.
8
+ * Fix namespace specifier for FXRGB in kwargs.rb.
9
+ * Change GC'ing of TreeListBox and FXTreeItem. Fixes #10
10
+ * Update to swig version 2.0 or newer. Fixes #13
11
+
12
+ === 1.6.28 / 2013-07-05
2
13
 
3
14
  * Fix build for Ruby-2.0.0-p127+
15
+ * Update libraries for win32 build: libfox-1.6.49
4
16
 
5
17
  === 1.6.27 / 2013-04-05
6
18
 
data/Manifest.txt CHANGED
@@ -5,7 +5,6 @@ History.txt
5
5
  Manifest.txt
6
6
  README.rdoc
7
7
  Rakefile
8
- Rakefile.cross
9
8
  TODO
10
9
  doap.rdf.erb
11
10
  examples/RAA.rb
@@ -1182,6 +1181,7 @@ test/TC_FXVec3d.rb
1182
1181
  test/TC_FXVec3f.rb
1183
1182
  test/TC_FXVec4f.rb
1184
1183
  test/TC_FXViewport.rb
1184
+ test/TC_FXWindow.rb
1185
1185
  test/TC_FXXBMIcon.rb
1186
1186
  test/TC_FXXBMImage.rb
1187
1187
  test/TC_FXXPMIcon.rb
data/Rakefile CHANGED
@@ -3,7 +3,6 @@ require 'hoe'
3
3
  require 'erb'
4
4
  require 'rake/extensiontask'
5
5
  require './lib/fox16/version.rb'
6
- load 'Rakefile.cross'
7
6
 
8
7
  # Use forked process for chdir'ed environment, to allow parallel execution with drake
9
8
  module FileUtils
@@ -19,11 +18,9 @@ end
19
18
 
20
19
  # Some constants we'll need
21
20
  PKG_VERSION = Fox.fxrubyversion
22
- # TODO: Don't depend on cross compilation task
23
- FXSCINTILLA_INSTALL_DIR = Pathname( CrossLibraries.first.static_libfxscintilla_builddir ).expand_path
24
21
 
25
- SWIG = (RUBY_PLATFORM =~ /mingw/) ? "swig-1.3.22.exe" : "swig-1.3.22"
26
- SWIGFLAGS = "-fcompact -noruntime -c++ -ruby -no_default -I../fox-includes"
22
+ SWIG = (RUBY_PLATFORM =~ /mingw/) ? "swig.exe" : "swig"
23
+ SWIGFLAGS = "-c++ -ruby -nodefaultdtor -nodefaultctor -w302 -features compactdefaultargs -I../fox-includes"
27
24
  SWIG_LIB = `#{SWIG} -swiglib`.chomp
28
25
  SWIG_MODULES = {
29
26
  "core.i" => "core_wrap.cpp",
@@ -50,7 +47,7 @@ SWIG_MODULES = {
50
47
  hoe = Hoe.spec "fxruby" do
51
48
  # ... project specific data ...
52
49
  self.blog_categories = %w{FXRuby}
53
- self.clean_globs = [".config", "ext/fox16_c/Makefile", "ext/fox16_c/*.o", "ext/fox16_c/*.bundle", "ext/fox16_c/mkmf.log", "ext/fox16_c/conftest.dSYM", "ext/fox16_c/include/swigrubyrun.h", "ext/fox16_c/*_wrap.cpp"]
50
+ self.clean_globs = [".config", "ext/fox16_c/Makefile", "ext/fox16_c/*.o", "ext/fox16_c/*.bundle", "ext/fox16_c/mkmf.log", "ext/fox16_c/conftest.dSYM", "ext/fox16_c/include/swigrubyrun.h", "ext/fox16_c/librb.c", "ext/fox16_c/include/inlinestubs.h", "ext/fox16_c/*_wrap.cpp"]
54
51
  developer("Lyle Johnson", "lyle@lylejohnson.name")
55
52
  developer("Lars Kanis", "kanis@comcard.de")
56
53
  self.extra_rdoc_files = ["rdoc-sources", File.join("rdoc-sources", "README.rdoc")]
@@ -70,7 +67,7 @@ hoe = Hoe.spec "fxruby" do
70
67
  spec_extras[:files] = File.read_utf("Manifest.txt").split(/\r?\n\r?/).reject{|f| f=~/^fox-includes|^web/ }
71
68
  spec_extras[:files] += SWIG_MODULES.values.map{|f| File.join("ext/fox16_c", f) }
72
69
  spec_extras[:files] << 'ext/fox16_c/include/inlinestubs.h'
73
- spec_extras[:files] << 'ext/fox16_c/librb.c'
70
+ spec_extras[:files] << 'ext/fox16_c/swigruby.h'
74
71
  spec_extras[:files] << 'doap.rdf'
75
72
  spec_extras[:files] << 'lib/fox16/kwargs.rb'
76
73
  end
@@ -92,28 +89,40 @@ task :test => [:compile]
92
89
 
93
90
  Rake::ExtensionTask.new("fox16_c", hoe.spec) do |ext|
94
91
  ext.cross_compile = true
95
- ext.cross_platform = CrossLibraries.map &:ruby_platform
96
-
97
- ext.cross_config_options += CrossLibraries.map do |lib|
98
- {
99
- lib.ruby_platform => [
100
- "--with-fox-include=#{lib.static_installdir}/include/fox-1.6",
101
- "--with-fxscintilla-include=#{lib.static_installdir}/include/fxscintilla",
102
- "--with-installed-include=#{lib.static_installdir}/include",
103
- "--with-installed-lib=#{lib.static_installdir}/lib",
104
- "--enable-win32-static-build",
105
- "--with-fxscintilla",
106
- ]
107
- }
92
+ ext.cross_platform = ['x86-mingw32', 'x64-mingw32']
93
+
94
+ ext.cross_config_options += [
95
+ "--enable-win32-cross",
96
+ "--with-fxscintilla",
97
+ ]
98
+
99
+ # Add dependent DLLs to the cross gems
100
+ ext.cross_compiling do |spec|
101
+ plat = spec.platform
102
+ dlls = Dir["tmp/#{plat}/#{ext.name}/*/*.dll"].map{|dll| File.basename(dll) }.uniq
103
+ spec.files += dlls.map{|dll| "lib/#{plat}/#{dll}" }
104
+
105
+ directory "tmp/#{plat}/stage/lib/#{plat}/"
106
+ dlls.each do |dll|
107
+ ENV['RUBY_CC_VERSION'].to_s.split(':').last.tap do |ruby_version|
108
+ file "tmp/#{plat}/stage/lib/#{plat}/#{dll}" => ["tmp/#{plat}/stage/lib/#{plat}/", "tmp/#{plat}/#{ext.name}/#{ruby_version}/#{dll}"] do
109
+ cp "tmp/#{plat}/#{ext.name}/#{ruby_version}/#{dll}", "tmp/#{plat}/stage/lib/#{plat}"
110
+ sh "x86_64-w64-mingw32-strip", "tmp/#{plat}/stage/lib/#{plat}/#{dll}"
111
+ end
112
+ end
113
+ file "lib/#{plat}/#{dll}" => "tmp/#{plat}/stage/lib/#{plat}/#{dll}"
114
+ end
108
115
  end
109
-
110
116
  end
111
117
 
112
- CrossLibraries.each do |lib|
113
- ENV['RUBY_CC_VERSION'].split(":").each do |ruby_version|
114
- task "copy:fox16_c:#{lib.ruby_platform}:#{ruby_version}" do |t|
115
- sh "#{lib.host_platform}-strip -S tmp/#{lib.ruby_platform}/stage/lib/#{ruby_version[0,3]}/fox16_c.so"
116
- end
118
+ # To reduce the gem file size strip mingw32 dlls before packaging
119
+ ENV['RUBY_CC_VERSION'].to_s.split(':').each do |ruby_version|
120
+ task "tmp/x86-mingw32/stage/lib/#{ruby_version[/^\d+\.\d+/]}/fox16_c.so" do |t|
121
+ sh "i686-w64-mingw32-strip -S tmp/x86-mingw32/stage/lib/#{ruby_version[/^\d+\.\d+/]}/fox16_c.so"
122
+ end
123
+
124
+ task "tmp/x64-mingw32/stage/lib/#{ruby_version[/^\d+\.\d+/]}/fox16_c.so" do |t|
125
+ sh "x86_64-w64-mingw32-strip -S tmp/x64-mingw32/stage/lib/#{ruby_version[/^\d+\.\d+/]}/fox16_c.so"
117
126
  end
118
127
  end
119
128
 
@@ -145,20 +154,14 @@ namespace :swig do
145
154
  sed wrapper_src_file_name
146
155
  end
147
156
 
148
- task :swig_librb => ["ext/fox16_c/librb.c"]
149
- file "ext/fox16_c/librb.c" do |task|
157
+ task :swigruby_h => ["ext/fox16_c/swigruby.h"]
158
+ file "ext/fox16_c/swigruby.h" do |task|
150
159
  puts "generate #{task.name}"
151
- File.open(task.name, "w") do |io|
152
- io.puts "#define SWIG_GLOBAL 1"
153
- io.write(IO.read(File.join(SWIG_LIB, "ruby", "precommon.swg")))
154
- io.write(IO.read(File.join(SWIG_LIB, "common.swg")))
155
- io.write(IO.read(File.join(SWIG_LIB, "ruby", "rubyhead.swg")))
156
- io.write(IO.read(File.join(SWIG_LIB, "ruby", "rubydef.swg")))
157
- end
160
+ system "#{SWIG} -ruby -external-runtime #{task.name}"
158
161
  end
159
162
 
160
163
  desc "Run SWIG to generate the wrapper files."
161
- task :swig => [:swig_librb] + SWIG_MODULES.map{|ifile, cppfile| File.join("ext/fox16_c", cppfile) }
164
+ task :swig => [:swigruby_h] + SWIG_MODULES.map{|ifile, cppfile| File.join("ext/fox16_c", cppfile) }
162
165
 
163
166
  # add dependencies for compile *.i to *_wrap.cpp
164
167
  SWIG_MODULES.each do |ifile, cppfile|
@@ -218,12 +221,19 @@ namespace :fxruby do
218
221
  make_impl
219
222
  end
220
223
 
221
- file "ext/fox16_c/extconf.rb" => ['ext/fox16_c/librb.c', 'ext/fox16_c/impl.cpp', 'ext/fox16_c/include/inlinestubs.h'] +
224
+ file "ext/fox16_c/extconf.rb" => ['ext/fox16_c/swigruby.h', 'ext/fox16_c/impl.cpp', 'ext/fox16_c/include/inlinestubs.h'] +
222
225
  SWIG_MODULES.map{|ifile, cppfile| File.join("ext/fox16_c", cppfile) }
223
226
 
227
+ directory "tmp/fxscintilla"
228
+ task "tmp/fxscintilla/fxscintilla-2.28.0/include/Scintilla.iface" => ["tmp/fxscintilla", "ports/archives/fxscintilla-2.28.0.tar.gz"] do
229
+ chdir "tmp/fxscintilla" do
230
+ sh "tar xzf ../../ports/archives/fxscintilla-2.28.0.tar.gz"
231
+ end
232
+ end
233
+
224
234
  task :scintilla => 'lib/fox16/scintilla.rb'
225
- file 'lib/fox16/scintilla.rb' => [FXSCINTILLA_INSTALL_DIR, 'scripts/iface.rb'] do
226
- ruby "scripts/iface.rb -i #{FXSCINTILLA_INSTALL_DIR}/include/Scintilla.iface -o lib/fox16/scintilla.rb"
235
+ file 'lib/fox16/scintilla.rb' => ["tmp/fxscintilla/fxscintilla-2.28.0/include/Scintilla.iface", 'scripts/iface.rb'] do
236
+ ruby "scripts/iface.rb -i tmp/fxscintilla/fxscintilla-2.28.0/include/Scintilla.iface -o lib/fox16/scintilla.rb"
227
237
  end
228
238
 
229
239
  task :generate_kwargs_lib => 'lib/fox16/kwargs.rb'
data/examples/RAA.rb CHANGED
@@ -1,5 +1,11 @@
1
- require 'soap/rpc/driver'
2
- require 'iRAA'
1
+ begin
2
+ require 'soap/rpc/driver'
3
+ require 'iRAA'
4
+ rescue LoadError
5
+ warn("Sorry, at the moment this example is not working.")
6
+ sleep(5)
7
+ exit(false)
8
+ end
3
9
 
4
10
  module RAA
5
11
  extend SOAP
@@ -38,11 +38,11 @@ class WhatAQuietWindow < FXMainWindow
38
38
  super(app, "What a Quiet Stiff", :opts => DECOR_ALL, :width => 850, :height => 600, :padLeft => 0, :padRight => 0)
39
39
 
40
40
  # Icons for list items
41
- File.open("icons/bluebullet14x14.gif", "rb") do |f|
41
+ File.open(File.expand_path("../icons/bluebullet14x14.gif", __FILE__), "rb") do |f|
42
42
  bytes = f.read
43
43
  @itemIcon = FXGIFIcon.new(getApp(), bytes)
44
44
  end
45
- File.open("icons/transpbullet14x14.gif", "rb") do |f|
45
+ File.open(File.expand_path("../icons/transpbullet14x14.gif", __FILE__), "rb") do |f|
46
46
  bytes = f.read
47
47
  @transpIcon = FXGIFIcon.new(getApp(), bytes)
48
48
  end
@@ -1,7 +1,14 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  require 'fox16'
4
- require 'tranexp'
4
+
5
+ begin
6
+ require 'tranexp'
7
+ rescue LoadError
8
+ warn("LoadError: To execute this app you need to have 'tranexp' gem installed.")
9
+ sleep(5)
10
+ exit(false)
11
+ end
5
12
 
6
13
  include Fox
7
14
 
@@ -26,7 +33,7 @@ class Babelfish < FXMainWindow
26
33
  FXLabel.new(controlsFrame, " to:")
27
34
  @toCombo = FXComboBox.new(controlsFrame, 15, :opts => COMBOBOX_STATIC|FRAME_SUNKEN|FRAME_THICK)
28
35
  @toCombo.numVisible = 6
29
- Tranexp::Codes.constants.each do |lang|
36
+ Tranexp::Codes.constants.map(&:to_s).each do |lang|
30
37
  @fromCombo.appendItem(lang)
31
38
  @toCombo.appendItem(lang)
32
39
  end
data/examples/browser.rb CHANGED
@@ -41,7 +41,7 @@ class ClassTree
41
41
 
42
42
  # Get an hash containing class names for Fox
43
43
  classes = {}
44
- @mFox.constants.each do |name|
44
+ @mFox.constants.map(&:to_s).each do |name|
45
45
  c = @mFox.const_get(name)
46
46
  if c.kind_of? Class
47
47
  parentclass = c.superclass.name.sub("Fox::", "")
data/examples/button.rb CHANGED
@@ -134,15 +134,9 @@ class ButtonWindow < FXMainWindow
134
134
 
135
135
  # Load the named icon from a file
136
136
  def loadIcon(filename)
137
- begin
138
- filename = File.join("icons", filename)
139
- icon = nil
140
- File.open(filename, "rb") do |f|
141
- icon = FXPNGIcon.new(getApp(), f.read)
142
- end
143
- icon
144
- rescue
145
- raise RuntimeError, "Couldn't load icon: #{filename}"
137
+ filename = File.expand_path("../icons/#{filename}", __FILE__)
138
+ File.open(filename, "rb") do |f|
139
+ FXPNGIcon.new(getApp(), f.read)
146
140
  end
147
141
  end
148
142
 
@@ -1,5 +1,5 @@
1
1
  require 'fox16'
2
- require '../lib/fox16/canvas'
2
+ require 'fox16/canvas'
3
3
 
4
4
  include Fox
5
5
  include Canvas
@@ -10,7 +10,7 @@ class CanvasDemo < FXMainWindow
10
10
  super(app, "Canvas Demo", nil, nil, DECOR_ALL, 0, 0, 800, 600)
11
11
 
12
12
  # Menu bar
13
- menu_bar = FXMenubar.new(self, LAYOUT_SIDE_TOP|LAYOUT_FILL_X)
13
+ menu_bar = FXMenuBar.new(self, LAYOUT_SIDE_TOP|LAYOUT_FILL_X)
14
14
 
15
15
  # File menu
16
16
  file_menu = FXMenuPane.new(self)
@@ -53,7 +53,7 @@ class CanvasDemo < FXMainWindow
53
53
  FXMenuTitle.new(menu_bar, "&Help", nil, help_menu)
54
54
 
55
55
  # Status bar
56
- FXStatusbar.new(self,
56
+ FXStatusBar.new(self,
57
57
  LAYOUT_SIDE_BOTTOM|LAYOUT_FILL_X|STATUSBAR_WITH_DRAGCORNER)
58
58
 
59
59
  # Shapes canvas fills the remainder
data/examples/charts.rb CHANGED
@@ -1,6 +1,13 @@
1
1
  require 'fox16'
2
- require 'google_chart'
3
- require 'open-uri'
2
+
3
+ begin
4
+ require 'google_chart'
5
+ require 'open-uri'
6
+ rescue LoadError
7
+ warn("LoadError: To execute this app you need to have 'google_chart' gem installed.")
8
+ sleep(5)
9
+ exit(false)
10
+ end
4
11
 
5
12
  include Fox
6
13
 
data/examples/dctest.rb CHANGED
@@ -532,7 +532,7 @@ class DCTestWindow < FXMainWindow
532
532
  FXMenuCommand.new(@filemenu, "&Quit\tCtl-Q", nil, getApp(), FXApp::ID_QUIT)
533
533
  FXMenuTitle.new(menubar, "&File", nil, @filemenu)
534
534
 
535
- @birdImage = FXPNGImage.new(getApp(), File.open("icons/dippy.png", "rb").read)
535
+ @birdImage = FXPNGImage.new(getApp(), File.open(File.expand_path("../icons/dippy.png", __FILE__), "rb").read)
536
536
  @bitmap = FXBitmap.new(getApp(), $bitmap_bits, 0, 64, 64)
537
537
 
538
538
  @function = BLT_SRC
@@ -674,15 +674,9 @@ class DCTestWindow < FXMainWindow
674
674
 
675
675
  # Load the named icon from a file
676
676
  def loadIcon(filename, clr = FXRGB(192, 192, 192), opts = 0)
677
- begin
678
- filename = File.join("icons", filename)
679
- icon = nil
680
- File.open(filename, "rb") { |f|
681
- icon = FXPNGIcon.new(getApp(), f.read, clr, opts)
682
- }
683
- icon
684
- rescue
685
- raise RuntimeError, "Couldn't load icon: #{filename}"
677
+ filename = File.expand_path("../icons/#{filename}", __FILE__)
678
+ File.open(filename, "rb") do |f|
679
+ FXPNGIcon.new(getApp(), f.read)
686
680
  end
687
681
  end
688
682
  end
@@ -37,7 +37,7 @@ class GemBrowser
37
37
  # Return an array of the installed specifications.
38
38
  def cache
39
39
  # Gem.cache
40
- Gem::Cache.from_installed_gems
40
+ Gem::SourceIndex.from_installed_gems
41
41
  end
42
42
  end
43
43
 
@@ -53,7 +53,7 @@ class GemInfoPanel < FXVerticalFrame
53
53
 
54
54
  self.backColor = FXRGB(255, 255, 255)
55
55
 
56
- File.open(File.join("icons", "gem_big.png"), "rb") do |f|
56
+ File.open(File.expand_path("../icons/gem_big.png", __FILE__), "rb") do |f|
57
57
  @bigIcon = FXPNGIcon.new(getApp(), f.read)
58
58
  end
59
59
 
@@ -107,10 +107,10 @@ class GemsPanel < FXVerticalFrame
107
107
  # Save a reference to the browser
108
108
  @browser = br
109
109
 
110
- File.open(File.join("icons", "gem_big.png"), "rb") do |f|
110
+ File.open(File.expand_path("../icons/gem_big.png", __FILE__), "rb") do |f|
111
111
  @bigIcon = FXPNGIcon.new(getApp(), f.read)
112
112
  end
113
- File.open(File.join("icons", "gem_small.png"), "rb") do |f|
113
+ File.open(File.expand_path("../icons/gem_small.png", __FILE__), "rb") do |f|
114
114
  @smallIcon = FXPNGIcon.new(getApp(), f.read)
115
115
  end
116
116
 
data/examples/gltest.rb CHANGED
@@ -3,12 +3,12 @@
3
3
  require 'fox16'
4
4
  begin
5
5
  require 'opengl'
6
+ require 'glu'
6
7
  rescue LoadError
7
8
  require 'fox16/missingdep'
8
9
  MSG = <<EOM
9
- Sorry, this example depends on the OpenGL extension. Please
10
- check the Ruby Application Archives for an appropriate
11
- download site.
10
+ Sorry, this example depends on the opengl gems. Please execute:
11
+ gem install opengl glu
12
12
  EOM
13
13
  missingDependency(MSG)
14
14
  end
data/examples/glviewer.rb CHANGED
@@ -152,15 +152,9 @@ class GLViewWindow < FXMainWindow
152
152
 
153
153
  # Load the named PNG icon from a file
154
154
  def loadIcon(filename)
155
- begin
156
- filename = File.join("icons", filename) + ".png"
157
- icon = nil
158
- File.open(filename, "rb") do |f|
159
- icon = FXPNGIcon.new(getApp(), f.read)
160
- end
161
- icon
162
- rescue
163
- raise RuntimeError, "Couldn't load icon: #{filename}"
155
+ filename = File.expand_path("../icons/#{filename}.png", __FILE__)
156
+ File.open(filename, "rb") do |f|
157
+ FXPNGIcon.new(getApp(), f.read)
164
158
  end
165
159
  end
166
160
 
data/examples/groupbox.rb CHANGED
@@ -8,15 +8,9 @@ class GroupWindow < FXMainWindow
8
8
 
9
9
  # Convenience function to load & construct an icon
10
10
  def getIcon(filename)
11
- begin
12
- filename = File.join("icons", filename)
13
- icon = nil
14
- File.open(filename, "rb") { |f|
15
- icon = FXPNGIcon.new(getApp(), f.read)
16
- }
17
- icon
18
- rescue
19
- raise RuntimeError, "Couldn't load icon: #{filename}"
11
+ filename = File.expand_path("../icons/#{filename}", __FILE__)
12
+ File.open(filename, "rb") do |f|
13
+ FXPNGIcon.new(getApp(), f.read)
20
14
  end
21
15
  end
22
16