-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support Windows #26
Comments
We started to handle multiple versions (3.6, 3.8, 3.10 and 3.12). With this, it should be fine for Windows people to use it. |
Window's dies while running rgtk-build at the moment. Access violation error for one of the pointers. Glue builds and appears to work fine. |
@jeremyletang and myself aren't developing under windows. We'll test more on this platform when the development will be in a more advanced stage I think. Feel free to create a pull request if you fix that issue and thank you for your interest. |
I played around with this a bunch, I just can't get past the rust compilation error. I am not sure if it is a Rust compiler error as there are a bunch of them on Windows. Or it is related to something else. I reported it anyways rust-lang/rust#15811 |
The ICE on rust-lang/rust#15811 is triggered by src/gtk/signals.rs#L239: signal!(show_help, ShowHelp(help_type : gtk::WidgetHelpType) -> bool) which defines |
@klutzy thanks for the help ! It seems that WidgetHelpType was an enum, if change this in my last commit, maybe this fix the ICE? |
I'll give it a try later today. |
(rust-lang/rust#16484 fixed the ICE issue!) --- a/src/cairo/fonts.rs
+++ b/src/cairo/fonts.rs
@@ -111,7 +111,7 @@ impl FontOptions{
pub fn hash(&self) -> u64{
unsafe{
- ffi::cairo_font_options_hash(self.get_ptr())
+ ffi::cairo_font_options_hash(self.get_ptr()) as u64
}
}
--- a/src/gtk/traits/recentchooser.rs
+++ b/src/gtk/traits/recentchooser.rs
@@ -176,7 +176,7 @@ pub trait RecentChooser: traits::Widget {
}
fn get_uris(&self) -> Option<Vec<String>> {
- let mut length = 0i64;
+ let mut length = 0;
let tmp = unsafe { ffi::gtk_recent_chooser_get_uris(GTK_RECENT_CHOOSER(self.get_widget()), &mut length) }
if tmp.is_null() {
@@ -184,7 +184,7 @@ pub trait RecentChooser: traits::Widget {
} else {
let mut ret = Vec::with_capacity(length as uint);
- for count in range(0i64, length) {
+ for count in range(0, length) {
ret.push(unsafe { string::raw::from_buf(*tmp.offset(count as int) as *const u8) });
}
Some(ret)
diff --git a/src/gtk/widgets/recentinfo.rs b/src/gtk/widgets/recentinfo.rs
index be2aa4d..107d08c 100644
--- a/src/gtk/widgets/recentinfo.rs
+++ b/src/gtk/widgets/recentinfo.rs
@@ -115,7 +115,7 @@ impl RecentInfo {
}
pub fn get_applications(&self) -> Option<Vec<String>> {
if tmp.is_null() {;
@@ -123,7 +123,7 @@ impl RecentInfo {recent_info_get_applications(GTK_RECENT_INFO(self.get_widget()), &mut length) } else {
let mut ret = Vec::with_capacity(length as uint);
- for count in range(0i64, length) {
+ for count in range(0, length) {
ret.push(unsafe { string::raw::from_buf(*tmp.offset(count as int) as *const u8) });
}
Some(ret)
@@ -150,7 +150,7 @@ impl RecentInfo {
}
pub fn get_groups(&self) -> Option<Vec<String>> {
- let mut length = 0i64;
+ let mut length = 0;
let tmp = unsafe { ffi::gtk_recent_info_get_groups(GTK_RECENT_INFO(self.get_widget()), &mut length) };
if tmp.is_null() {
@@ -158,7 +158,7 @@ impl RecentInfo {
} else {
let mut ret = Vec::with_capacity(length as uint);
- for count in range(0i64, length) {
+ for count in range(0, length) {
ret.push(unsafe { string::raw::from_buf(*tmp.offset(count as int) as *const u8) });
}
Some(ret) After touching some lines, I've succeeded to get |
Oh nice ! I like when bugs nearly disappear by themselves haha. Thanks ! |
http://win32builder.gnome.org/ has unoffical builds for 3.10 for Windows. Also this is another reason to have #1 to allow Windows people to use 3.6.4 (the last "official" release).
Either way it would be nice to redo the Makefile (or switch to something slightly more cross platform like cmake) to allow for Windows support.
The text was updated successfully, but these errors were encountered: