Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

62 lines
1.9 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================//
  6. #ifndef SDKLAUNCHER_MAIN_H
  7. #define SDKLAUNCHER_MAIN_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. #include "tier2/vconfig.h"
  12. #include <vgui_controls/Frame.h>
  13. // This points at the root sourcesdk directory.
  14. #define SDKLAUNCHER_MAIN_PATH_ID "MAIN"
  15. const char* GetSDKLauncherBinDirectory();
  16. const char* GetSDKToolsBinDirectory();
  17. const char* GetSDKLauncherBaseDirectory();
  18. const char* GetLastWindowsErrorString();
  19. // Replace all occurences of %basedir% with the actual base dir.
  20. void SubstituteBaseDir( const char *pIn, char *pOut, int outLen );
  21. // Copy a file, applying replacements you specify.
  22. // ppReplacments must come in pairs - the first one is the string to match and
  23. // the second is the string to replace it with.
  24. bool CopyWithReplacements(
  25. const char *pInputFilename,
  26. const char **ppReplacements, int nReplacements,
  27. const char *pOutputFilenameFormat, ... );
  28. // Open the file, read it in, and do some replacements. Returns a pointer to
  29. // a string with the contents replaced. dataWriteLen specifies how much
  30. // data should be written to an output file if you write the string out
  31. // (since it may have added a null terminator).
  32. CUtlVector<char>* GetFileStringWithReplacements(
  33. const char *pInputFilename,
  34. const char **ppReplacements, int nReplacements,
  35. int &dataWriteLen );
  36. void VGUIMessageBox( vgui::Panel *pParent, const char *pTitle, PRINTF_FORMAT_STRING const char *pMsg, ... );
  37. class CSDKLauncherDialog;
  38. extern CSDKLauncherDialog *g_pMainFrame;
  39. extern bool g_bAutoHL2Mod; // skip modwizard_intro...
  40. extern bool g_bModWizard_CmdLineFields;
  41. extern char g_ModWizard_CmdLine_ModDir[MAX_PATH];
  42. extern char g_ModWizard_CmdLine_ModName[256];
  43. // Set this to make the app exit.
  44. extern bool g_bAppQuit;
  45. #endif // SDKLAUNCHER_MAIN_H