Fix armv7-apple-ios compile target (#1083)

This commit is contained in:
Aleksi Juvani 2019-08-01 10:30:05 +03:00 committed by Hal Gentz
parent 3c27e7d88f
commit 1e4c176506
4 changed files with 35 additions and 18 deletions

View file

@ -34,7 +34,7 @@ matrix:
os: osx
rust: stable
# iOS
# iOS x86_64
- env: TARGET=x86_64-apple-ios
os: osx
rust: nightly
@ -42,6 +42,22 @@ matrix:
os: osx
rust: stable
# iOS armv7
- env: TARGET=armv7-apple-ios
os: osx
rust: nightly
- env: TARGET=armv7-apple-ios
os: osx
rust: stable
# iOS arm64
- env: TARGET=aarch64-apple-ios
os: osx
rust: nightly
- env: TARGET=aarch64-apple-ios
os: osx
rust: stable
install:
- rustup self update
- rustup target add $TARGET; true
@ -52,9 +68,9 @@ script:
- cargo +stable fmt --all -- --check
- cargo build --target $TARGET --verbose
- cargo build --target $TARGET --features serde --verbose
# Running iOS apps on OSX requires the simulator so we skip that for now
- if [ "$TARGET" != "x86_64-apple-ios" ]; then cargo test --target $TARGET --verbose; fi
- if [ "$TARGET" != "x86_64-apple-ios" ]; then cargo test --target $TARGET --features serde --verbose; fi
# Running iOS apps on macOS requires the Simulator so we skip that for now
- if [[ $TARGET != *-apple-ios ]]; then cargo test --target $TARGET --verbose; fi
- if [[ $TARGET != *-apple-ios ]]; then cargo test --target $TARGET --features serde --verbose; fi
after_success:
- |

View file

@ -14,6 +14,7 @@
- On iOS, add support for hiding the home indicator.
- On iOS, add support for deferring system gestures.
- On iOS, fix a crash that occurred while acquiring a monitor's name.
- On iOS, fix armv7-apple-ios compile target.
# 0.20.0 Alpha 2 (2019-07-09)

View file

@ -93,8 +93,8 @@ unsafe fn get_view_class(root_view_class: &'static Class) -> &'static Class {
let screen_frame: CGRect =
msg_send![object, convertRect:bounds toCoordinateSpace:screen_space];
let size = crate::dpi::LogicalSize {
width: screen_frame.size.width,
height: screen_frame.size.height,
width: screen_frame.size.width as _,
height: screen_frame.size.height as _,
};
AppState::handle_nonuser_event(Event::WindowEvent {
window_id: RootWindowId(window.into()),
@ -258,8 +258,8 @@ unsafe fn get_window_class() -> &'static Class {
let screen_frame: CGRect =
msg_send![object, convertRect:bounds toCoordinateSpace:screen_space];
let size = crate::dpi::LogicalSize {
width: screen_frame.size.width,
height: screen_frame.size.height,
width: screen_frame.size.width as _,
height: screen_frame.size.height as _,
};
AppState::handle_nonuser_events(
std::iter::once(Event::WindowEvent {

View file

@ -66,8 +66,8 @@ impl Inner {
unsafe {
let safe_area = self.safe_area_screen_space();
Ok(LogicalPosition {
x: safe_area.origin.x,
y: safe_area.origin.y,
x: safe_area.origin.x as _,
y: safe_area.origin.y as _,
})
}
}
@ -76,8 +76,8 @@ impl Inner {
unsafe {
let screen_frame = self.screen_frame();
Ok(LogicalPosition {
x: screen_frame.origin.x,
y: screen_frame.origin.y,
x: screen_frame.origin.x as _,
y: screen_frame.origin.y as _,
})
}
}
@ -101,8 +101,8 @@ impl Inner {
unsafe {
let safe_area = self.safe_area_screen_space();
LogicalSize {
width: safe_area.size.width,
height: safe_area.size.height,
width: safe_area.size.width as _,
height: safe_area.size.height as _,
}
}
}
@ -111,8 +111,8 @@ impl Inner {
unsafe {
let screen_frame = self.screen_frame();
LogicalSize {
width: screen_frame.size.width,
height: screen_frame.size.height,
width: screen_frame.size.width as _,
height: screen_frame.size.height as _,
}
}
}
@ -317,8 +317,8 @@ impl Window {
Some(dim) => CGRect {
origin: screen_bounds.origin,
size: CGSize {
width: dim.width,
height: dim.height,
width: dim.width as _,
height: dim.height as _,
},
},
None => screen_bounds,