Skip to content

Commit

Permalink
Merge branch 'master' of git://github.com/shoes/shoes
Browse files Browse the repository at this point in the history
Conflicts:
	Rakefile

I'm adding shoes_dev/sandbox/deps_cairo_1.8.10 directory to use cairo 1.8.10 dependencies instead of shoes/deps directory. So, decided not to merge Rakefile so far.
  • Loading branch information
ashbb committed Mar 22, 2010
2 parents 5b9c39f + 43dab3e commit 373b9e7
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 37 deletions.
2 changes: 1 addition & 1 deletion lib/shoes.rb
Expand Up @@ -113,7 +113,7 @@ def self.package_app

def self.splash
font "#{DIR}/fonts/Lacuna.ttf"
Shoes.app :width => 400, :height => 300, :resizable => false do
Shoes.app :width => 400, :height => 325, :resizable => false do
style(Para, :align => "center", :weight => "bold", :font => "Lacuna Regular", :size => 13)
style(Link, :stroke => yellow, :underline => nil)
style(LinkHover, :stroke => yellow, :fill => nil)
Expand Down
75 changes: 40 additions & 35 deletions lib/shoes/pack.rb
Expand Up @@ -34,45 +34,50 @@ def self.pkg(platform, opt)
local_file_path = File.join(LIB_DIR, RELEASE_NAME.downcase, platform, "latest_shoes.#{extension}")
when Shoes::I_NOV then
url = "http://shoes.heroku.com/pkg/#{RELEASE_NAME.downcase}/#{platform}/shoes-novideo"
local_file_path = File.join(LIB_DIR, RELEASE_NAME.downcase, platform, "latest_shoes-novideo.#{extension}")
local_file_path = File.join(LIB_DIR, RELEASE_NAME.downcase, platform, "latest_shoes-novideo.#{extension}")
when I_NET then
url = false
end

FileUtils.makedirs File.join(LIB_DIR, RELEASE_NAME.downcase, platform)

begin
url = open(url).read.strip
debug url
rescue Exception => e
error e
internet_failed = true
end

unless File.exists? local_file_path
unless internet_failed then
begin
debug "Downloading #{url}..."
downloaded = open(url)
debug "Download of #{url} finished"
rescue Exception => e
error e
internet_failed = true
end
end
unless internet_failed then
begin
File.open(local_file_path, "wb") do |f|
f.write(downloaded.read)
end
return open(local_file_path)
rescue Exception => e
error e
alert "Couldnt find local_file_path or download it from internet"
end
end
else
return open(local_file_path)
end
end
if url then
begin
url = open(url).read.strip
debug url
internet_ok = true
rescue Exception => e
error e
internet_ok = false
end

if File.exists? local_file_path
return open(local_file_path)
elsif internet_ok then
begin
debug "Downloading #{url}..."
downloaded = open(url)
debug "Download of #{url} finished"
rescue Exception => e
error "Could not download from the internet" + e
internet_ok = false
end
if internet_ok then
begin
File.open(local_file_path, "wb") do |f|
f.write(downloaded.read)
end
return open(local_file_path)
rescue Exception => e
error "Could not download from the internet" + e
alert "Couldn't find an Shoes at:\n #{local_file_path}\n or download it from the internet to include with the application.\n Will package application without Shoes."
end
end
else
alert "Couldn't find an existing Shoes at:\n #{local_file_path}\n or download it from the internet to include with the application.\n Will package application without Shoes."
end
end
end

def self.exe(script, opt, &blk)
size = File.size(script)
Expand Down
2 changes: 1 addition & 1 deletion use-deps
Expand Up @@ -8,5 +8,5 @@ PKG_CONFIG_PATH=./deps/lib/pkgconfig; export PKG_CONFIG_PATH
DYLD_LIBRARY_PATH=./deps/lib; export DYLD_LIBRARY_PATH
LD_LIBRARY_PATH=./deps/lib; export LD_LIBRARY_PATH
SHOES_DEPS_PATH=./deps; export SHOES_DEPS_PATH
RUBYOPT="-I./deps/lib/ruby/site_ruby/1.8 -I./deps/lib/ruby/1.8 -I./deps/lib/ruby/1.8/i686-darwin8.9.1"
RUBYOPT="-I./deps/lib/ruby/site_ruby/1.9.1 -I./deps/lib/ruby/1.9.1 -I./deps/lib/ruby/1.9.1/i386-darwin9.8.0"
export RUBYOPT

0 comments on commit 373b9e7

Please sign in to comment.