109 lines
2.2 KiB
C++
109 lines
2.2 KiB
C++
#ifndef XSTEAM_BASE_H
|
|
#define XSTEAM_BASE_H
|
|
|
|
#include <QString>
|
|
#include <QStringList>
|
|
#include <iostream>
|
|
#include <vector>
|
|
#include <map>
|
|
|
|
// fetch remote type
|
|
typedef enum
|
|
{
|
|
BRANCH,
|
|
TAG
|
|
} GIT_MODE;
|
|
|
|
typedef enum{
|
|
STEAM,
|
|
STEAMTOOLS
|
|
}RUN_MODE;
|
|
|
|
typedef enum
|
|
{
|
|
PUSH_ADD,
|
|
PUSH_UPDATE
|
|
} PUSH_MODE;
|
|
// vdf file read mode
|
|
typedef enum
|
|
{
|
|
ADD,
|
|
DEL
|
|
} VDF_EDIT_MODE;
|
|
|
|
// remote src url class
|
|
typedef struct
|
|
{
|
|
std::string src_name = {};
|
|
std::string src_url = {};
|
|
GIT_MODE src_type = BRANCH;
|
|
} SrcData;
|
|
|
|
// gloabal game data struct
|
|
typedef struct
|
|
{
|
|
std::string name = {};
|
|
std::string uid = {};
|
|
std::string m_time = {};
|
|
std::string i_time = {};
|
|
std::string s_name = {};
|
|
std::vector<std::string> n_dlc={};
|
|
std::vector<std::string> r_dlc={};
|
|
std::vector<std::string> manifest = {};
|
|
std::string ico={};
|
|
// temp_save steam for uid and key,
|
|
// first opt->uid
|
|
// second->key=opt->uid type
|
|
// second->value=opt->uid key
|
|
std::map<std::string, std::string> uid_key = {};
|
|
} UidData;
|
|
|
|
typedef struct
|
|
{
|
|
int style = 0;
|
|
int font = 0;
|
|
int font_bold=0;
|
|
std::string steam_dir={};
|
|
std::string steamtools_dir={};
|
|
std::string steamtools_st_dir={};
|
|
std::string steam_api_url={};
|
|
std::string steam_logo_url={};
|
|
} XSteamConfig;
|
|
|
|
// gloabal data
|
|
typedef struct
|
|
{
|
|
XSteamConfig x_config = {};
|
|
std::vector<SrcData> s_data = {};
|
|
std::vector<UidData> u_data = {};
|
|
std::map<std::string, std::vector<std::string>> s_ex_data = {};
|
|
|
|
} GloablData;
|
|
|
|
extern GloablData _data;
|
|
|
|
extern QString ex_base_exe_path;
|
|
|
|
extern QString ex_base_exe_ex;
|
|
|
|
// 保存目录路径
|
|
extern QString ex_save_path;
|
|
// 保存目录路径带"/"
|
|
extern QString ex_save_path_ex;
|
|
// 源编辑表头文本
|
|
extern QStringList ex_src_table_head_tips;
|
|
// 入库游戏表头文本
|
|
extern QStringList ex_uid_table_head_tips;
|
|
|
|
extern QStringList ex_in_dlc_table_head_tips;
|
|
|
|
extern QStringList ex_all_dlc_table_head_tips;
|
|
|
|
extern QStringList ex_default_src_name;
|
|
|
|
extern QStringList ex_default_src_url;
|
|
|
|
extern QStringList font_table;
|
|
|
|
extern QStringList style_table;
|
|
#endif |