aboutsummaryrefslogtreecommitdiff
path: root/src/steam.h
blob: c6f68877b13b5433384be5c7a503692832a09be8 (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
#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 SOURCESDK_MANIFEST "appmanifest_" SOURCESDK_APPID ".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();
char* getSourcemodDir();
char* getOpenFortressDir();
char* getSourceSDK2013MpDir();
long getSteamPID();
int runOpenFortress(char**, size_t);

#ifdef __cplusplus
}
#endif

#endif