summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--dragon/geometry.rb14
-rw-r--r--dragon/ios_wizard.rb10
2 files changed, 14 insertions, 10 deletions
diff --git a/dragon/geometry.rb b/dragon/geometry.rb
index b16c5b7..db3ebfc 100644
--- a/dragon/geometry.rb
+++ b/dragon/geometry.rb
@@ -26,8 +26,8 @@ module GTK
# Returns true if a primitive's rectangle is entirely inside another primitive's rectangle.
# @gtk
- def inside_rect? outer
- Geometry.inside_rect? self, outer
+ def inside_rect? outer, tolerance = 0.0
+ Geometry.inside_rect? self, outer, tolerance
end
# Returns true if a primitive's rectangle overlaps another primitive's rectangle.
@@ -308,11 +308,11 @@ S
end
# @gtk
- def self.inside_rect? inner_rect, outer_rect
- inner_rect.x >= outer_rect.x &&
- inner_rect.right <= outer_rect.right &&
- inner_rect.y >= outer_rect.y &&
- inner_rect.top <= outer_rect.top
+ def self.inside_rect? inner_rect, outer_rect, tolerance = 0.0
+ inner_rect.x + tolerance >= outer_rect.x - tolerance &&
+ inner_rect.right - tolerance <= outer_rect.right + tolerance &&
+ inner_rect.y + tolerance >= outer_rect.y - tolerance &&
+ inner_rect.top - tolerance <= outer_rect.top + tolerance
rescue Exception => e
raise e, ":inside_rect? failed for inner_rect: #{inner_rect} outer_rect: #{outer_rect}."
end
diff --git a/dragon/ios_wizard.rb b/dragon/ios_wizard.rb
index e38faf1..77fd703 100644
--- a/dragon/ios_wizard.rb
+++ b/dragon/ios_wizard.rb
@@ -140,7 +140,8 @@ class IOSWizard
end
def check_for_dev_profile
- if !($gtk.read_file 'profiles/development.mobileprovision')
+ @dev_profile_path = "profiles/development.mobileprovision"
+ if !($gtk.read_file @dev_profile_path)
$gtk.system "mkdir -p #{relative_path}/profiles"
$gtk.system "open #{relative_path}/profiles"
$gtk.system "echo Download the mobile provisioning profile and place it here with the name development.mobileprovision > #{relative_path}/profiles/README.txt"
@@ -409,7 +410,7 @@ XML
</dict>
</dict>
<key>CFBundleIdentifier</key>
- <string>com.carlile.swisscheese</string>
+ <string>:app_id</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
@@ -537,7 +538,10 @@ XML
# <string>UIInterfaceOrientationPortrait</string>
# <string>UIInterfaceOrientationLandscapeRight</string>
- $gtk.write_file_root "tmp/ios/#{@app_name}.app/Info.plist", info_plist_string.gsub(":app_name", @app_name).strip
+ info_plist_string.gsub!(":app_name", @app_name)
+ info_plist_string.gsub!(":app_id", @app_id)
+
+ $gtk.write_file_root "tmp/ios/#{@app_name}.app/Info.plist", info_plist_string.strip
@info_plist_written = true
end