ruby2d 0.11.2 → 0.11.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. checksums.yaml +4 -4
  2. data/assets/wasm/libmruby.a +0 -0
  3. data/assets/wasm/template.html +51 -4
  4. data/assets/windows/mingw-w64-ucrt-x86_64/bin/mrbc.exe +0 -0
  5. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libFLAC.a +0 -0
  6. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libLerc.a +0 -0
  7. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libSDL2.a +0 -0
  8. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libSDL2_image.a +0 -0
  9. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libSDL2_mixer.a +0 -0
  10. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libSDL2_ttf.a +0 -0
  11. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libbrotlicommon.a +0 -0
  12. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libbrotlidec.a +0 -0
  13. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libbz2.a +0 -0
  14. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libdeflate.a +0 -0
  15. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libfreetype.a +0 -0
  16. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libglew32.a +0 -0
  17. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libgraphite2.a +0 -0
  18. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libharfbuzz.a +0 -0
  19. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libjbig.a +0 -0
  20. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libjpeg.a +0 -0
  21. data/assets/windows/mingw-w64-ucrt-x86_64/lib/liblzma.a +0 -0
  22. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libmodplug.a +0 -0
  23. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libmpg123.a +0 -0
  24. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libmruby.a +0 -0
  25. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libogg.a +0 -0
  26. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libopus.a +0 -0
  27. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libopusfile.a +0 -0
  28. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libpng16.a +0 -0
  29. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libsndfile.a +0 -0
  30. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libssp.a +0 -0
  31. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libstdc++.a +0 -0
  32. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libtiff.a +0 -0
  33. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libvorbis.a +0 -0
  34. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libvorbisfile.a +0 -0
  35. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libwebp.a +0 -0
  36. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libz.a +0 -0
  37. data/assets/windows/mingw-w64-ucrt-x86_64/lib/libzstd.a +0 -0
  38. data/ext/ruby2d/extconf.rb +6 -1
  39. data/lib/ruby2d/cli/build.rb +6 -1
  40. data/lib/ruby2d/version.rb +1 -1
  41. metadata +37 -4
  42. data/assets/wasm/build_config.rb +0 -13
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c12aee4afc99b74e30fe4e9e892342af166d8d27d81cf08b2b83cbc16a3ed897
4
- data.tar.gz: 3b981ee133533471f7b09e9814cb8730f9d32cc3416c884cd24f6b25d6e16924
3
+ metadata.gz: 1c378b62902a690fb3e6fbc20416f32b7ca730cf50f611dad49c88f19321e0f8
4
+ data.tar.gz: bb859fd818496a306bdfac58f844b73d4cb96c3c6d81e56e417724ac33efb8fa
5
5
  SHA512:
6
- metadata.gz: 2f1fb4a14c5716674a606236e647c616dd1f2b3bfbb62fb885722d85c5c03f4f15367aed0bbf6ae7de81fec8915d22aca080c73380ff48462b1ccb3adec66586
7
- data.tar.gz: 7f975bfe790b3bbbfdc1bbbbcf4897af7411244acdbb86ecba716562280ebb019249fc42d5a9f5a7afae95dbe675fda442aaf275a649a2a7866e9a2b89fe34c6
6
+ metadata.gz: f0fda16d525635141958f44d2f3110949f8b9c735ef641bf024d1cb18f984fbbc91ffdbf9046a81c0bf8fc814b8b46c39b52194b280df2b07d690233779aa995
7
+ data.tar.gz: fdbd5480382122cf9da9cf5510d688dfb0f5adcd6ac2ef2aa0421e2588b2ac67b9140673b096f8076e0d044d667290aace22287cb64ea7a4f9c388ed3607f316
Binary file
@@ -2,16 +2,63 @@
2
2
  <html lang="en" dir="ltr">
3
3
  <head>
4
4
  <meta charset="utf-8">
5
- <title>Ruby on WebAssembly</title>
5
+ <title>Ruby 2D</title>
6
6
  <style>
7
7
  body {
8
8
  font-family: system-ui;
9
9
  }
10
+
11
+ hr {
12
+ border: none;
13
+ height: 3px;
14
+ margin: 15px 0;
15
+ background-color: lightgray;
16
+ }
17
+
18
+ #canvas {
19
+ display: block;
20
+ margin: 0 auto;
21
+ }
22
+
23
+ #output {
24
+ display: block;
25
+ box-sizing: border-box;
26
+ width: 100%;
27
+ height: 300px;
28
+ padding: 10px;
29
+ font-size: 14px;
30
+ font-family: monospace;
31
+ color: white;
32
+ border: none;
33
+ background-color: black;
34
+ }
10
35
  </style>
11
36
  </head>
12
37
  <body>
13
- <h1>Ruby on WebAssembly</h1>
14
- <p>Open the web console to see output and errors.</p>
38
+ <h1>Ruby 2D</h1>
39
+ <p>This is a sample HTML template, but you can create your own!</p>
40
+ <hr>
41
+ <canvas id="canvas" oncontextmenu=".preventDefault()"></canvas>
42
+ <h2>Console</h2>
43
+ <textarea id="output"></textarea>
15
44
  </body>
16
- <script src="app.js"></script>
45
+
46
+ <script>
47
+ var Module = {
48
+ canvas: (function() { return document.getElementById('canvas'); })(),
49
+ print: (function() {
50
+ var element = document.getElementById('output');
51
+ if (element) element.value = ''; // clear browser cache
52
+ return function(text) {
53
+ if (arguments.length > 1) text = Array.prototype.slice.call(arguments).join(' ');
54
+ console.log(text);
55
+ if (element) {
56
+ element.value += text + "\n";
57
+ element.scrollTop = element.scrollHeight; // focus on bottom
58
+ }
59
+ };
60
+ })()
61
+ };
62
+ </script>
63
+ <script async src="app.js"></script>
17
64
  </html>
@@ -119,7 +119,12 @@ else
119
119
 
120
120
  when :windows
121
121
  add_flags(:c, '-I../../assets/include')
122
- ldir = "#{Dir.pwd}/../../assets/windows/mingw-w64-x86_64/lib"
122
+
123
+ if RUBY_PLATFORM =~ /ucrt/
124
+ ldir = "#{Dir.pwd}/../../assets/windows/mingw-w64-ucrt-x86_64/lib"
125
+ else
126
+ ldir = "#{Dir.pwd}/../../assets/windows/mingw-w64-x86_64/lib"
127
+ end
123
128
 
124
129
  # Start linker flags (needed to avoid circular dependencies)
125
130
  add_flags(:ld, "-Wl,--start-group")
@@ -178,7 +178,12 @@ def compile_native
178
178
  # ld_flags = '-lSDL2 -lSDL2_image -lSDL2_mixer -lSDL2_ttf -lm -lGL'
179
179
 
180
180
  when :windows
181
- ld_dir = "#{Ruby2D.assets}/windows/mingw-w64-x86_64/lib"
181
+
182
+ if RUBY_PLATFORM =~ /ucrt/
183
+ ld_dir = "#{Ruby2D.assets}/windows/mingw-w64-ucrt-x86_64/lib"
184
+ else
185
+ ld_dir = "#{Ruby2D.assets}/windows/mingw-w64-x86_64/lib"
186
+ end
182
187
 
183
188
  ld_flags = '-static -Wl,--start-group '
184
189
  ['mruby',
@@ -1,5 +1,5 @@
1
1
  # Ruby2D::VERSION
2
2
 
3
3
  module Ruby2D
4
- VERSION = '0.11.2'
4
+ VERSION = '0.11.3'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby2d
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.2
4
+ version: 0.11.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom Black
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-03-10 00:00:00.000000000 Z
11
+ date: 2022-04-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -210,12 +210,45 @@ files:
210
210
  - assets/test_media/sound.wav
211
211
  - assets/test_media/sprite_sheet.png
212
212
  - assets/test_media/texture_atlas.png
213
- - assets/wasm/build_config.rb
214
213
  - assets/wasm/libmruby.a
215
214
  - assets/wasm/template.html
216
215
  - assets/windows/glew/README.md
217
216
  - assets/windows/glew/glew.h
218
217
  - assets/windows/glew/libglew32.a
218
+ - assets/windows/mingw-w64-ucrt-x86_64/bin/mrbc.exe
219
+ - assets/windows/mingw-w64-ucrt-x86_64/lib/libFLAC.a
220
+ - assets/windows/mingw-w64-ucrt-x86_64/lib/libLerc.a
221
+ - assets/windows/mingw-w64-ucrt-x86_64/lib/libSDL2.a
222
+ - assets/windows/mingw-w64-ucrt-x86_64/lib/libSDL2_image.a
223
+ - assets/windows/mingw-w64-ucrt-x86_64/lib/libSDL2_mixer.a
224
+ - assets/windows/mingw-w64-ucrt-x86_64/lib/libSDL2_ttf.a
225
+ - assets/windows/mingw-w64-ucrt-x86_64/lib/libbrotlicommon.a
226
+ - assets/windows/mingw-w64-ucrt-x86_64/lib/libbrotlidec.a
227
+ - assets/windows/mingw-w64-ucrt-x86_64/lib/libbz2.a
228
+ - assets/windows/mingw-w64-ucrt-x86_64/lib/libdeflate.a
229
+ - assets/windows/mingw-w64-ucrt-x86_64/lib/libfreetype.a
230
+ - assets/windows/mingw-w64-ucrt-x86_64/lib/libglew32.a
231
+ - assets/windows/mingw-w64-ucrt-x86_64/lib/libgraphite2.a
232
+ - assets/windows/mingw-w64-ucrt-x86_64/lib/libharfbuzz.a
233
+ - assets/windows/mingw-w64-ucrt-x86_64/lib/libjbig.a
234
+ - assets/windows/mingw-w64-ucrt-x86_64/lib/libjpeg.a
235
+ - assets/windows/mingw-w64-ucrt-x86_64/lib/liblzma.a
236
+ - assets/windows/mingw-w64-ucrt-x86_64/lib/libmodplug.a
237
+ - assets/windows/mingw-w64-ucrt-x86_64/lib/libmpg123.a
238
+ - assets/windows/mingw-w64-ucrt-x86_64/lib/libmruby.a
239
+ - assets/windows/mingw-w64-ucrt-x86_64/lib/libogg.a
240
+ - assets/windows/mingw-w64-ucrt-x86_64/lib/libopus.a
241
+ - assets/windows/mingw-w64-ucrt-x86_64/lib/libopusfile.a
242
+ - assets/windows/mingw-w64-ucrt-x86_64/lib/libpng16.a
243
+ - assets/windows/mingw-w64-ucrt-x86_64/lib/libsndfile.a
244
+ - assets/windows/mingw-w64-ucrt-x86_64/lib/libssp.a
245
+ - assets/windows/mingw-w64-ucrt-x86_64/lib/libstdc++.a
246
+ - assets/windows/mingw-w64-ucrt-x86_64/lib/libtiff.a
247
+ - assets/windows/mingw-w64-ucrt-x86_64/lib/libvorbis.a
248
+ - assets/windows/mingw-w64-ucrt-x86_64/lib/libvorbisfile.a
249
+ - assets/windows/mingw-w64-ucrt-x86_64/lib/libwebp.a
250
+ - assets/windows/mingw-w64-ucrt-x86_64/lib/libz.a
251
+ - assets/windows/mingw-w64-ucrt-x86_64/lib/libzstd.a
219
252
  - assets/windows/mingw-w64-x86_64/bin/mrbc.exe
220
253
  - assets/windows/mingw-w64-x86_64/lib/libFLAC.a
221
254
  - assets/windows/mingw-w64-x86_64/lib/libLerc.a
@@ -431,7 +464,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
431
464
  - !ruby/object:Gem::Version
432
465
  version: '0'
433
466
  requirements: []
434
- rubygems_version: 3.3.9
467
+ rubygems_version: 3.3.10
435
468
  signing_key:
436
469
  specification_version: 4
437
470
  summary: Ruby 2D
@@ -1,13 +0,0 @@
1
- MRuby::Build.new do |conf|
2
- toolchain :gcc
3
- conf.gembox 'default'
4
- end
5
-
6
- MRuby::CrossBuild.new('emscripten') do |conf|
7
- toolchain :clang
8
- conf.gembox 'default'
9
- conf.cc.command = 'emcc'
10
- conf.cc.flags = %W(-Os)
11
- conf.linker.command = 'emcc'
12
- conf.archiver.command = 'emar'
13
- end