aboutsummaryrefslogtreecommitdiff
path: root/src/steam.h
blob: c58613793bfec573fb51003a2ea20ad9c77d2a21 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#ifndef STEAM_H
#define STEAM_H

#ifdef __cplusplus
extern "C" {
#endif

#include <stddef.h>
#include <stdbool.h>

#include "fs.h"

#ifdef _WIN32
#define STEAM_PROC "steam.exe"
#define STEAM_BIN OS_PATH_SEP STEAM_PROC
#else
// Works on Linux and FreeBSD
#define STEAM_PROC "steam"
#define STEAM_BIN "steam.sh"
#endif

#define LIBARYFOLDERS_VDF "libraryfolders.vdf"
#define SOURCESDK_APPID "243750"
#define STEAM_MANIFEST "appmanifest_%s.acf"

#if defined(_WIN32)
#define HL2_EXE "hl2.exe"
#define STEAM_PGRM_64 "C:\\Program Files (x86)\\Steam"
#define STEAM_PGRM_86 "C:\\Program Files\\Steam"
// TODO check if this is the right registry path for x86
#define REG_PATH "SOFTWARE\\Wow6432Node\\Valve\\Steam"

#elif defined(__linux__)
#define HL2_EXE "hl2.sh"
#define STEAM_DIR "/.local/share/Steam"
#define FLATPAK_DIR "/.var/app/com.valvesoftware.Steam" STEAM_DIR

#elif defined(__FreeBSD__)
#define HL2_EXE "hl2.sh"
#define STEAM_DIR "/.steam/steam"

#endif

#define STEAMAPPS "steamapps"
#define STEAMAPPS_COMMON STEAMAPPS OS_PATH_SEP "common"
#define SOURCEMOD_DIR STEAMAPPS OS_PATH_SEP "sourcemods"
#define OPEN_FORTRESS_DIR "open_fortress"

#if defined(_WIN32)
#else
#endif

char* getSteamDir(void);
char* getSourcemodDir(void);
char* getOpenFortressDir(void);
char* getAppInstallDir(const char* appid);
char* getSourceSDK2013MpDir(void);
long getSteamPID(void);
int runOpenFortress(char**, size_t);

#ifdef __cplusplus
}
#endif

#endif