Skip to content

Commit

Permalink
Fix bug #265. Created new ext 'winject'. It'd binject with just the W…
Browse files Browse the repository at this point in the history
…indows pe handling. No hfs/dmg. Source code for binject is still there but not used.
  • Loading branch information
Cecil Coupe committed Sep 3, 2014
1 parent c68bc8a commit 828698b
Show file tree
Hide file tree
Showing 23 changed files with 2,490 additions and 12 deletions.
4 changes: 4 additions & 0 deletions fixed/bug265.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
require 'winject'
Shoes.app do
button "OK"
end
10 changes: 7 additions & 3 deletions lib/shoes/app_package.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# The 'New' packager for Shoes 3.2
require 'shoes/shy'
require 'binject'
require 'winject'
require 'open-uri'
require 'rubygems/package'
require 'zlib'
Expand Down Expand Up @@ -99,7 +99,7 @@
end
end

# FIXME: Assumes lines are sorted by filename at server
# Assumes lines are sorted by filename on server (cgi select/pkg.rb)
def platform_merge ln
flds = ln.split(' ')
return if flds[0].to_i == 0
Expand Down Expand Up @@ -314,7 +314,11 @@ def repack_exe
script = @path
size = File.size(script)
f = File.open(script, 'rb')
exe = Binject::EXE.new(File.join(DIR, "static", "stubs", "blank.exe"))
begin
exe = Winject::EXE.new(File.join(DIR, "static", "stubs", "blank.exe"))
rescue StandardError => e
puts "Failed to create Winject::EXE #{e}"
end
size += script.length
exe.inject("SHOES_FILENAME", File.basename(script))
size += File.size(script)
Expand Down
2 changes: 1 addition & 1 deletion make/linux/tasks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def common_build
%w[req/ftsearch/lib/* req/rake/lib/*].each do |rdir|
FileList[rdir].each { |rlib| cp_r rlib, "#{TGT_DIR}/lib/ruby/#{RUBY_V}" }
end
%w[req/binject/ext/binject_c req/ftsearch/ext/ftsearchrt req/chipmunk/ext/chipmunk].
%w[req/ftsearch/ext/ftsearchrt req/chipmunk/ext/chipmunk req/winject/ext/winject_c].
#%w[req/binject/ext/binject_c req/ftsearch/ext/ftsearchrt req/bloopsaphone/ext/bloops req/chipmunk/ext/chipmunk].
each { |xdir| copy_ext xdir, "#{TGT_DIR}/lib/ruby/#{RUBY_V}/#{SHOES_RUBY_ARCH}" }

Expand Down
4 changes: 2 additions & 2 deletions make/mavericks-x86_64/tasks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def common_build
FileList[rdir].each { |rlib| cp_r rlib, "#{TGT_DIR}/lib/ruby/#{RUBY_V}" }
end
#%w[req/binject/ext/binject_c req/ftsearch/ext/ftsearchrt req/bloopsaphone/ext/bloops req/chipmunk/ext/chipmunk].
%w[req/binject/ext/binject_c req/ftsearch/ext/ftsearchrt req/chipmunk/ext/chipmunk].
%w[req/winject/ext/winject_c req/ftsearch/ext/ftsearchrt req/chipmunk/ext/chipmunk].
each { |xdir| copy_ext xdir, "#{TGT_DIR}/lib/ruby/#{RUBY_V}/#{SHOES_RUBY_ARCH}" }

gdir = "#{TGT_DIR}/lib/ruby/gems/#{RUBY_V}"
Expand Down Expand Up @@ -364,4 +364,4 @@ def make_smaller
end

end
end
end
2 changes: 1 addition & 1 deletion make/x86_64-linux/tasks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def common_build
%w[req/ftsearch/lib/* req/rake/lib/*].each do |rdir|
FileList[rdir].each { |rlib| cp_r rlib, "#{TGT_DIR}/lib/ruby/#{RUBY_V}" }
end
%w[req/binject/ext/binject_c req/ftsearch/ext/ftsearchrt req/chipmunk/ext/chipmunk].
%w[req/winject/ext/winject_c req/ftsearch/ext/ftsearchrt req/chipmunk/ext/chipmunk].
#%w[req/binject/ext/binject_c req/ftsearch/ext/ftsearchrt req/bloopsaphone/ext/bloops req/chipmunk/ext/chipmunk].
each { |xdir| copy_ext xdir, "#{TGT_DIR}/lib/ruby/#{RUBY_V}/#{SHOES_TGT_ARCH}" }

Expand Down
2 changes: 1 addition & 1 deletion make/xarmv6-pi/tasks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def common_build
%w[req/ftsearch/lib/* req/rake/lib/*].each do |rdir|
FileList[rdir].each { |rlib| cp_r rlib, "#{TGT_DIR}/lib/ruby/#{TGT_RUBY_V}" }
end
%w[req/binject/ext/binject_c req/ftsearch/ext/ftsearchrt req/chipmunk/ext/chipmunk].
%w[req/winject/ext/winject_c req/ftsearch/ext/ftsearchrt req/chipmunk/ext/chipmunk].
#%w[req/binject/ext/binject_c req/ftsearch/ext/ftsearchrt req/bloopsaphone/ext/bloops req/chipmunk/ext/chipmunk].
each { |xdir| copy_ext xdir, "#{TGT_DIR}/lib/ruby/#{TGT_RUBY_V}/#{SHOES_TGT_ARCH}" }

Expand Down
2 changes: 1 addition & 1 deletion make/xi386-gnu-linux/tasks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def common_build
%w[req/ftsearch/lib/* req/rake/lib/*].each do |rdir|
FileList[rdir].each { |rlib| cp_r rlib, "#{TGT_DIR}/lib/ruby/#{RUBY_V}" }
end
%w[req/binject/ext/binject_c req/ftsearch/ext/ftsearchrt req/chipmunk/ext/chipmunk].
%w[req/winject/ext/winject_c req/ftsearch/ext/ftsearchrt req/chipmunk/ext/chipmunk].
#%w[req/binject/ext/binject_c req/ftsearch/ext/ftsearchrt req/bloopsaphone/ext/bloops req/chipmunk/ext/chipmunk].
each { |xdir| copy_ext xdir, "#{TGT_DIR}/lib/ruby/#{RUBY_V}/#{SHOES_TGT_ARCH}" }

Expand Down
2 changes: 1 addition & 1 deletion make/xmingw32/tasks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def common_build
%w[req/ftsearch/lib/* req/rake/lib/*].each do |rdir|
FileList[rdir].each { |rlib| cp_r rlib, "#{TGT_DIR}/lib/ruby/#{RUBY_V}" }
end
%w[req/ftsearch/ext/ftsearchrt req/chipmunk/ext/chipmunk req/binject/ext/binject_c].
%w[req/ftsearch/ext/ftsearchrt req/chipmunk/ext/chipmunk req/winject/ext/winject_c].
#%w[req/binject/ext/binject_c req/ftsearch/ext/ftsearchrt req/bloopsaphone/ext/bloops req/chipmunk/ext/chipmunk].
each { |xdir| copy_ext xdir, "#{TGT_DIR}/lib/ruby/#{RUBY_V}/#{SHOES_TGT_ARCH}" }

Expand Down
51 changes: 49 additions & 2 deletions notes/Bugs.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,55 @@
Bugs/Status - stick with Ruby 2.0.0 and gtk2 until things get sorted
out with GKt3

2014-09-02
Interesting possibilities with jfxruby toolkit. When Shoes is too
limited? The jfxruby wiki has good info. https://github.com/jruby/jrubyfx

Might work for Android, iOS building. see:
http://www.infoq.com/articles/Building-JavaFX-Android-Apps?utm_campaign=infoq_content&utm_source=infoq&utm_medium=feed&utm_term=global


done: select/pkg.rb cgi script sorts by file name.
done: minimized winject to just Windows slinging . Test: creating isp.exe
done: dist: 9551872 Sep 2 23:13 isp.exe
x86_64 9551872
i686 9551872
armhf 9551872
osx 9551872
xmingw32 9551872
done: yes Windows started working again. Not sure why (other than winject
name change and try/catch
which shouldn't have changed anything but it did
----> git commit
----> update issue 265
----> blog post

2014-09-01
done: copy binject to winject and remove the osx/dmg stuff.

2014-08-31
pay attention to the error message:
'126: the specified module could not be found C:/Users/Cecil.../binject.so'

If the file is actually missing the error is:
'cannot load such file -- binject'

Did I screw something related to gem building/handling when I
did the hpricot/sqlite3 gem building and loading? I did write
the packaging first and reading below I did have gem loading/path
issues - perhaps I screwed something up?

2014-08-28
===>: Bug #266 App freezes on Windows (backgrounding)

2014-08-27 3.2.15 release
----> Build all
done: Build all & upload
done: update shoesrb.mvmanila.com and issue pull request to mothership
done: Blog announcement

===>: Bug #265 reported. binject.so won't load on Win7. reproducible.
co-ext's Ftsearch and chipmonk work fine. It's not the stripped
symbols. No problem on Linux.

2014-08-26 Wiki
----> place holder wiki posts for these topics:
Expand All @@ -26,7 +73,7 @@ done: for Dist/shoes, changes inside static/ need a rake clean; rake.
done: Update manual for edit_line finish=
----> Many changes to manual and pngs to get it current.
====> embed 3.2.{teeny} [app.yaml] version number in compiled in constant
====> Add a tips section at the end of manual - link to wiki articles on
done: Add a tips section at the end of manual - link to wiki articles on
command line things, Cobbler, Packaging
====> Convert some of my blog posts/pages to Wiki (cobbler, gems)

Expand Down
Loading

0 comments on commit 828698b

Please sign in to comment.