Quick Links: Download Gideros Studio | Gideros Documentation | Gideros Development Center | Gideros community chat | DONATE
Alternative way to deploy to android than Gideros Studio — Gideros Forum

Alternative way to deploy to android than Gideros Studio

Daimyo21Daimyo21 Member
edited November 2014 in General questions
Hey everyone so I'm trying to get my game out for testing to family/friends and need to deploy to android. I successfully followed this guide: http://giderosmobile.com/DevCenter/index.php/Deployment#Android_deployment

The game deploys successfully and crashes on my phone which I knew it would do.

I've been using gideros for over a year, but through LUA Glider 1.9 and now 2.0 (gideros studios is nice to get started but needed a better IDE).

Everything runs fine in Lua Glider (I believe this is because Glider generates its own project file). However when .gproj files are generated in LUA glider(and Gideros Studios), they show incomplete paths and my game states that there are missing files in gideros studios and subsequently crashes due to this. It does this also when deploying to device.

I realize that in Gideros studios you need to manually add and remove files/folders because it does not update automatically when you modify the project files/folders directly.

So without having to manually adjust the .gproj files and fix it all in Gideros Studios(not to mention every time I change something in Glider) just to get a deployed game out. Is there an alternative way or plugin to do this? I'd appreciate any help. Thanks!

Comments

  • So I tried transferring GliderGenerated.gproj into the Gideros Studio default and it organizes project properly. However, it doesnt give any errors and the Gideros Player just freezes.
  • @Daimyo21 do you run the game in Gideros Player from Lua Glider?
  • @ar
    @Daimyo21 do you run the game in Gideros Player from Lua Glider?
    Yes I run from Glider and everything works perfectly fine when I do. If I open the same project with Gideros Studios, even if I open the GliderGenerated.gproj, the game has missing filepaths and such even though they arent missing.

    If I manually started a new project and added in each file and folder paths and dependencies, everything would work properly but that is too much just to get a build out for testing.
  • A short term solution (assuming project file isn't changing much now) is to maintain a gproj for gideros studio that is independent and used only to load/export for build.
  • Also, how are you referencing files? Full paths or relative? Will it make a difference?
  • @Daimyo21 gproj file is passed to gdrdaemon to run the project, so the same gproj file should work ok also in Gideros Studio.
    It might not work only with absolute paths, when you move the project. So don't move the project from where you run it in Glider, go to Gideros Studio an navigate to the same gproj file which Glider uses, so all paths would be in same places.
  • Daimyo21Daimyo21 Member
    edited November 2014
    Also, how are you referencing files? Full paths or relative? Will it make a difference?
    All paths are relative.
    @Daimyo21 gproj file is passed to gdrdaemon to run the project, so the same gproj file should work ok also in Gideros Studio.
    It might not work only with absolute paths, when you move the project. So don't move the project from where you run it in Glider, go to Gideros Studio an navigate to the same gproj file which Glider uses, so all paths would be in same places.

    So I believe I found and fixed the problem(For virtual player and direct play to device ONLY) but heres something funny:

    So at first I just basically opened my project with GliderGenerated.gproj. It ran perfectly fine on the Virtual GiderosPlayer via desktop. However, anytime I ran it directly to device or deployed it to device, it would crash with the same path error.

    Then I finally looked into the gproj file and have always noticed(not sure if this was Glider or Gideros Studio that did this in the past) how most of the file paths used / but some of them used \. I never questioned this as the virtual player always ran it fine..

    Simply changing the \ to / fixed the problem. Now the game runs fine on device and Im assuming it will deploy to device and run the same.

    Im curious if this is a bug with Gideros or Glider gproj generation? If so, how does it run fine still in desktop player?

    Thanks for your guys help and input.

    EDIT UPDATE:

    So everything works fine until I want to deploy it. When deployed to device, it crashes in the exact same spot as it did before.
  • I really doubt that Gideros Studio would generate incorrect paths, at least I never heard it would happen to anyone :)
    So most probably Glider generates OS specific paths, or something like that

    About deployment to device, if you are talking about android, there are some differences in the file system, so
    1) make sure paths start with file name or directory for android:
    Wrong: Texture.new("./images/image.png")
    Right: Texture.new("images/image.png")
    2) file names are case sensitive, so if you have file named image.PNG, then calling it
    Wrong: Texture.new("images/image.png")
    Right: Texture.new("images/image.PNG")

    Hope that helps :)
  • I really doubt that Gideros Studio would generate incorrect paths, at least I never heard it would happen to anyone :)
    So most probably Glider generates OS specific paths, or something like that

    About deployment to device, if you are talking about android, there are some differences in the file system, so
    1) make sure paths start with file name or directory for android:
    Wrong: Texture.new("./images/image.png")
    Right: Texture.new("images/image.png")
    2) file names are case sensitive, so if you have file named image.PNG, then calling it
    Wrong: Texture.new("images/image.png")
    Right: Texture.new("images/image.PNG")

    Hope that helps :)
    Looking through the scripts, I do see that I did a good job of keeping things case sensitive(I double checked the functions the script uses when it crashes). All my paths are [ right: Texture.new("images/image.png") ].

    Is there a way to debug this when in Eclipse to see the exact error (even though I suspect it to be the same)? Similar to the debug console in Gideros Studios etc. The only way I did this before was debugging through desktop player or launching directly to device.

  • @Daimyo21 most probably yes, LogCat should output any related errors
  • Have you unzipped the APK and verified he actual file case I the assets list txt file matches your script?
  • Have you unzipped the APK and verified he actual file case I the assets list txt file matches your script?
    That was the problem, one of my file assets used camel case in the code and the .png was not camel case. So for any other users, what EricCarr is referring to is go into your: deployedProjectName\assets\assets folder and open the allfiles.txt to verify all assets are the same.

    To open the .apk file just change the .apk to a .rar/.zip etc. in your bin folder.

    I have one closing question. To make this process easier since Im now using the one-click deployment and not eclipse.. How could I debug the game when its on the phone? Logcat seems to just tell me what im clicking on yet it doesnt throw any errors when it crashes.

    Thanks again for the help, SO happy to finally get over this hurdle.
Sign In or Register to comment.