GithubHelp home page GithubHelp logo

Testing on Mac? about ggez HOT 12 CLOSED

ggez avatar ggez commented on May 7, 2024
Testing on Mac?

from ggez.

Comments (12)

Gordon-F avatar Gordon-F commented on May 7, 2024 2

@icefoxen How about using appveyor build like other Rust project do? For example - zoc.

Download SDL2 dll and compile like Travis do id.

from ggez.

svenstaro avatar svenstaro commented on May 7, 2024

We can always cross-compile to OSX and Windows at least. Running Windows tests with wine works alright for me.

from ggez.

icefoxen avatar icefoxen commented on May 7, 2024

Well it's possible to at least build and run this by hand on windows using mingw, if you acquire the pre-built SDL libraries and manage to put them in the right place (they go somewhere under ~/.multirust, not in the mingw system directories). So it's good that it's at least possible.

from ggez.

shmutalov avatar shmutalov commented on May 7, 2024

image

Works on Windows 10 x64, rust 0.13 mingw, also with sounds

from ggez.

icefoxen avatar icefoxen commented on May 7, 2024

Great! I just wish there were a good way to do so automatically.

from ggez.

svenstaro avatar svenstaro commented on May 7, 2024

I think we can. Travis does have Mac system's and we can certainly test Windows using Wine.

from ggez.

icefoxen avatar icefoxen commented on May 7, 2024

Looks fairly reasonable, that might be a solution if we don't want to mess with Wine. Any thoughts, @svenstaro ?

from ggez.

shmutalov avatar shmutalov commented on May 7, 2024

@icefoxen ZoC builds Windows binaries with AppVeyor:

  1. Makefile
  2. appveyor.yml

from ggez.

kevinw avatar kevinw commented on May 7, 2024

I'm on OS X 10.11.6 and just tried running the example program on the website, and got:

 🐇  RUST_BACKTRACE=1 cargo run
    Finished debug [unoptimized + debuginfo] target(s) in 0.0 secs
     Running `target/debug/gg_test`
WARNING: Encountered error: ResourceNotFound("\'resources\' directory not found!  Should be in \"/Users/kevin/src/gg_test/target/resources\"")
WARNING: Encountered error: ResourceNotFound("\'resources.zip\' file not found!  Should be in \"/Users/kevin/src/gg_test/target/resources.zip\"")
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: UnknownError("")', ../src/libcore/result.rs:799
stack backtrace:
   1:        0x10dd8e828 - std::sys::backtrace::tracing::imp::write::h6f1d53a70916b90d
   2:        0x10dd90b8f - std::panicking::default_hook::{{closure}}::h137e876f7d3b5850
   3:        0x10dd8fc85 - std::panicking::default_hook::h0ac3811ec7cee78c
   4:        0x10dd901d6 - std::panicking::rust_panic_with_hook::hc303199e04562edf
   5:        0x10dd90074 - std::panicking::begin_panic::h6ed03353807cf54d
   6:        0x10dd8ff92 - std::panicking::begin_panic_fmt::hc321cece241bb2f5
   7:        0x10dd8fef7 - rust_begin_unwind
   8:        0x10ddb70b0 - core::panicking::panic_fmt::h27224b181f9f037f
   9:        0x10dc7e0bc - core::result::unwrap_failed::h17c345877c1909d8
  10:        0x10dc7a7b5 - <core::result::Result<T, E>>::unwrap::hd08a8659915d4635
  11:        0x10dc82e63 - gg_test::main::h429237970e4d4bd7
  12:        0x10dd9114a - __rust_maybe_catch_panic
  13:        0x10dd8f7c6 - std::rt::lang_start::h538f8960e7644c80
  14:        0x10dc83249 - main

This is with:

 🐇  rustc --version
rustc 1.13.0 (2c6933acc 2016-11-07)

from ggez.

icefoxen avatar icefoxen commented on May 7, 2024

@kevinw Did try making a resources dir under /Users/kevin/src/gg_test/target/resources and putting the DejaVuSerif.ttf font file in it?

from ggez.

kevinw avatar kevinw commented on May 7, 2024

@icefoxen that did remove the first WARNING, but ultimately did not fix the panic. a bit of googling tells me there's no line numbers on OS X :(

 🐇  RUST_BACKTRACE=1 cargo run
    Finished debug [unoptimized + debuginfo] target(s) in 0.0 secs
     Running `target/debug/gg_test`
WARNING: Encountered error: ResourceNotFound("\'resources.zip\' file not found!  Should be in \"/Users/kevin/src/gg_test/target/resources.zip\"")
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: UnknownError("")', ../src/libcore/result.rs:799
stack backtrace:
   1:        0x101119828 - std::sys::backtrace::tracing::imp::write::h6f1d53a70916b90d
   2:        0x10111bb8f - std::panicking::default_hook::{{closure}}::h137e876f7d3b5850
   3:        0x10111ac85 - std::panicking::default_hook::h0ac3811ec7cee78c
   4:        0x10111b1d6 - std::panicking::rust_panic_with_hook::hc303199e04562edf
   5:        0x10111b074 - std::panicking::begin_panic::h6ed03353807cf54d
   6:        0x10111af92 - std::panicking::begin_panic_fmt::hc321cece241bb2f5
   7:        0x10111aef7 - rust_begin_unwind
   8:        0x1011420b0 - core::panicking::panic_fmt::h27224b181f9f037f
   9:        0x1010090bc - core::result::unwrap_failed::h17c345877c1909d8
  10:        0x1010057b5 - <core::result::Result<T, E>>::unwrap::hd08a8659915d4635
  11:        0x10100de63 - gg_test::main::h429237970e4d4bd7
  12:        0x10111c14a - __rust_maybe_catch_panic
  13:        0x10111a7c6 - std::rt::lang_start::h538f8960e7644c80
  14:        0x10100e249 - main

from ggez.

icefoxen avatar icefoxen commented on May 7, 2024

@kevinw Do any of the other example programs in the repository work? Does it build when you remove all the code from the GameState methods? It's kind of crappy that we can't see where the unwrap is actually happening, but the only unwraps in the example code are in the resource loading code...

from ggez.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.