Jump to content
  • Advertisement


  • Content count

  • Joined

  • Last visited

Community Reputation

190 Neutral

About Empirical

  • Rank
  1. Quote:Original post by crudbreeder Quote:Original post by trevaaar I just used that flag in a program on XP and it seemed to work fine... I havn't tested it myself, I was just quoting from the msdn page linked to in izhbq412's post. "OFN_NOCHANGEDIR Restores the current directory to its original value if the user changed the directory while searching for files. Windows NT 4.0/2000/XP: This flag is ineffective for GetOpenFileName." Perhaps GetOpenFileName no longer changes the current directory at all under xp? So the flag is obsolete
  2. Empirical

    auto-update feature

    Simple way: Your program downloads the update to a temp directory. It then runs this program with a special "Install yourself" command on the command line, the calling program must then quit. The freshly downloaded version, having been started in special update mode, waits until it gets write access to where the exe is installed, then copies itself over, starts that new copy then quits.
  3. Empirical

    Store data inside the exe?

    Assumption: Windows You cannot write to the EXE whilst it is running. Even if you could, it would STILL require you to work with files. If you dont want to use a file, think about using the registry. Although a file would be simpler
  4. Empirical

    A C++ programming issue

    Interfaces *might* work, as you can fiddle with the class without effecting the interface. Seems like a lot of trouble to go to though. Another option would be struct ALLMYVARS4CLASSA { int stuff1,stuff2,etc; }; class A { ALLMYVARS4CLASSA * pData; //functions here }; Now as you only have a pointer in the class you might be able to fiddle with the struct veribales as much as you like without it recompiling dependancies. !Might!
  5. Empirical

    TGA file format question

    That's the code Ive got in my LoadTexture function. Perhaps the error is elsewhere? Check the format being supplied to glTexImage2D (Is that what your using yeah?) (Remeber its GL_RGB if 24bpp else GL_RGBA for 32bpp)
  6. Empirical

    Thread Probs

    Quote:Original post by SiCrane Did you declare the variable volatile? Though it would probably be more robust to use event objects or some other more normal thread synchronization methd,. Bingo! Works, thanks for that. Ill have to look that up and see what it does! Is my methord perticularly bad or just unorthodox?(which all my code is) ETA: MSDN tels me what its for. Im starting to understand it. But what happens to veriables not declared with volatile in the situation ive discribed above?
  7. Empirical

    Thread Probs

    Im beginning to think threads don't work in the way I think they do. Anyway, I have the main program thread and another thread to load thumbnails. If the user changes directory the following function is called: bool EndThumbThread() { if (Thread2Status==1) { CancelThread=true;//Cancel thumb thread while (Thread2Status);//Wait for thread to end } CancelThread=0; return 0; } Thread number two sets global int Thread2Status to one when it is called. It then loads each thumbnail and checks the global bool CancelThread. If true it exits. When it exists (either because of that or its just finished) it sets Thread2Status to 0. Thhis works fine in Debug mode or Release without optimizations. But with optimizations the veriables work as though they are not the same! The thumb thread refuses to exit until its finished, and when it is Thread2Status is not set to 0. (The instruction to do so is def executed). The obvious result is the program hangs. I got a read out of the address of these veriables from each context and they match. I can fix this problem by disabling optimizations. But I want to know whats gone wrong? Can anyone help, Ta!
  8. But what exactly is wrong with your app? In what way is it not working correctly other than calling getLastError returns non zero? GetLastError is only usefull immdiatly after a call to an WinAPI function that supports GetLastError. Its job is to tell you more information AFTER a function returns a fail code. Its not a general well-being monitor.
  9. Quote:Original post by hplus0603 No. YOUR installer needs do only the things YOUR CUSTOMERS want it to do. Which is all of the above things, and then some. Sorry the original post implied he wanted to write his own for his own software. Perhaps I should refrase it a bit "An installer for HIM need only the things HE needs it to do" :D
  10. Quote:Original post by ace_lovegrove Quote:Original post by petewood I really would recommend NSIS. It'll let you explore the questions you're asking and you can see what it does and how. Quote:Well slap my thy and call it Henry there is alot an installer does. It's 'thigh'. Took me ages to remember how to spell it. After seeing you spell it 'thy', I had a total mental block. Had to type in "connected to the knee bone" in google. [smile] well it should be thy dammit!! :) ACE I wouldnt get too daunted about this. Most of the stuff mentioned here is only for installing advanced programs (such as the updating locked files stuff). YOUR installer need do only the things YOu want to to do. Here is a disription of what my installer that im working on right now does (or will do), so you can see what a amiture half-assed installer does (not half the stuff mentioned above, And lots of things here you could do away with so it can be as simple as you like): -Read contents of package (e.g what am I?, Title? How much disc space etc?) -Display EULA if one is included in the package -Let user choose path/paths to install to (Note: Start menu shortcuts are files that live in a folder like normal files) -Display a registration form (if enabled) -Create required folders -Unpacks files to the destination folder -Creates shortcuts as required -Copies itself into the windows directory (if its a newer version)* -Adds a registry key for uninstall. The regkey points to the copy of setup in the windows dir with a command line containing uninstall info for the program. -Dispatch a notification email to myself. -Launch application if user asks -Launch read me file if user asks -Quit Anyway heres someting to play with to get started a shortcut creator (I didnt make this btw, so dont blame me for anything!) #include "shlobj.h" HRESULT CreateLink(LPCSTR lpszPathObj, LPCSTR lpszPathLink, LPCSTR lpszDesc) { HRESULT hres; IShellLink* psl; CoInitialize(0); hres = CoCreateInstance(CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, IID_IShellLink, (LPVOID*)&psl); if (SUCCEEDED(hres)) { IPersistFile* ppf; psl->SetPath(lpszPathObj); psl->SetDescription(lpszDesc); hres = psl->QueryInterface(IID_IPersistFile, (LPVOID*)&ppf); if (SUCCEEDED(hres)) { WCHAR wsz[MAX_PATH]; MultiByteToWideChar(CP_ACP, 0, lpszPathLink, -1, wsz, MAX_PATH); hres = ppf->Save(wsz, TRUE); ppf->Release(); } psl->Release(); } return hres; }
  11. If you have VC6.0 you might have a tool called Dependancy Walker* (Typicaly Start > Programs > Microsoft Visual Studio 6.0 > Tools > Depends) This will show you a tree with all the load time DLLs your EXE is linked to. (*Might only be avalible in higher editions like pro)
  12. Empirical

    How to get programing programs?

    Quote:Original post by Oberon_Command Quote:Original post by Empirical Quote:Original post by Oberon_Command C and C++ aren't programs Well technically they are :p How so? They're just languages, it's the compilers that are the programs. Ah yes that's true. My brain was automaticaly interpreting what the original poster meant, and it forgot to tell me!!
  13. Empirical

    How are most game GUI's done?

    I use the windows GDI to paint the interface onto a bitmap, and then turn it into a texture for my OpenGL stuff. Its not clever. Its not portable. But i like being diffrent! (And its faster than you would think!)
  14. Empirical

    How to get programing programs?

    Quote:Original post by Oberon_Command C and C++ aren't programs Well technically they are :p
  15. Does your game suddenly run slower when you move the mouse compared to when you dont? If not, then this isnt going to help.
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!