What can cause TGUI to fail on loading Black.conf?
« on: 23 August 2014, 06:05:37 »
Basically I have a program using TGUI that works perfectly fine on my computer when launched from outside the IDE. I'm on Windows 7 using Visual Studio 2012. I have the correct dlls for dynamic linking, the resources for the widgets etc. etc. It works perfectly fine on my pc.

  However, someone else using Windows 7 can't run it properly. The program launches, however when it gets to the main menu the only widget it loads is a label. The buttons don't get created. In the console window it prints out that TGUI couldn't load Black.conf. I'm not jumping to say TGUI has a bug or anything of the sort, I'm actually just asking what could cause this to happen. I made sure he had all his resources that he needed and in the right places, and TGUI isn't working right for whatever reason. I've tried googling for quite some time now, and I'm not finding hardly any information that applies to my scenario.

*

texus

  • *****
  • 1161
    • View Profile
    • Texus's Blog
Re: What can cause TGUI to fail on loading Black.conf?
« Reply #1 on: 23 August 2014, 06:16:12 »
The file is just read with an ifstream. There is a difference between "failed to parse" and "failed to open" though.
But if the error is exactly "TGUI error: Failed to open Black.conf." then it just means that the std::ifstream::is_open returned false and thus the file really isn't in the location where it should be. The error tells exactly what it tried to open, if it just said Black.conf then it is supposed to be located in the folder from where the exe is being ran. Otherwise there will be a pathname too.

I would be surprised that it would fail to open when the file is there.
I can't see any situation where it would work on your pc and not one one from someone else unless you haven't distributed the file correctly (e.g. somewhere in your code it is loading the file from a different path than you expect).

Re: What can cause TGUI to fail on loading Black.conf?
« Reply #2 on: 23 August 2014, 09:46:27 »
It should load from graphics/gui/Black.conf

I prepared the folder so that it ran just fine on my mine. He insists he didn't tamper with it, so either something really bizarre is going on or he's telling me something other than reality and he mutilated it.

*

texus

  • *****
  • 1161
    • View Profile
    • Texus's Blog
Re: What can cause TGUI to fail on loading Black.conf?
« Reply #3 on: 23 August 2014, 09:52:59 »
If its compiled with mingw then you could perhaps send it to me (including the mingw dlls that you have to ship) so that I can test to see if it runs?
Executables created by visual studio require me to boot my windows to install redistributable packages, for which I don't have time now.

You need to be sure that the error that he is getting is exactly "TGUI error: Failed to open graphics/gui/Black.conf."
If its any other error then there might be another problem.

Re: What can cause TGUI to fail on loading Black.conf?
« Reply #4 on: 23 August 2014, 15:48:00 »
Either the dlls you shipped your application are different from the ones the application is compiled or the folder/files are messed up. Windows has UAC also, maybe worth looking this as well?

A.C.A.B
ULTRAS =3=

Re: What can cause TGUI to fail on loading Black.conf?
« Reply #5 on: 27 August 2014, 22:30:41 »
Thought I should stop in and explain what happened. Basically the guy downloaded the folder I prepared for him through google drive. He didn't think to mention I suppose that the subfolders all got removed, the whole damn thing was in one folder. If he would have just fricken told me that, would have saved a lot of time. I asked him several times to make sure the file arrangement wasn't mutilated, and he never said it was all in one folder, sheesh. Some advice, don't share your test builds on google drive unless you can make sure it gets downloaded 100% as is.

*

texus

  • *****
  • 1161
    • View Profile
    • Texus's Blog
Re: What can cause TGUI to fail on loading Black.conf?
« Reply #6 on: 27 August 2014, 22:56:14 »
I don't like using google drive anyway. I always have to look for the download button for a moment.

With dropbox the download button is big and in the center of your screen. Plus I figured out that if you make the url end with "?dl=1" then you don't even get to the dropbox page but the browser starts downloading it immediately when clicking the link. So I find that easier to share.

But I guess dropbox isn't perfect either. I happen to have 19GB of space on it, but I think you normally only have 2GB which might be a bit limiting.