Some Tweaks
This commit is contained in:
parent
c0156336df
commit
9bb6b86c73
@ -19,3 +19,9 @@ function(mcpi_option name description type default)
|
||||
list(APPEND MCPI_OPTIONS "-D${full_name}:${type}=${${full_name}}")
|
||||
set(MCPI_OPTIONS "${MCPI_OPTIONS}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
# Clear External CFLAGS When Building ARM Components
|
||||
if(BUILD_ARM_COMPONENTS)
|
||||
unset(ENV{CFLAGS})
|
||||
unset(ENV{CXXFLAGS})
|
||||
endif()
|
@ -84,6 +84,7 @@ void bootstrap(const options_t &options) {
|
||||
}
|
||||
|
||||
// Resolve Binary Path & Set MCPI_DIRECTORY
|
||||
std::string original_game_binary;
|
||||
std::string game_binary;
|
||||
{
|
||||
// Log
|
||||
@ -91,7 +92,13 @@ void bootstrap(const options_t &options) {
|
||||
|
||||
// Resolve Full Binary Path
|
||||
const std::string full_path = binary_directory + ("/" MCPI_BINARY);
|
||||
game_binary = safe_realpath(full_path);
|
||||
original_game_binary = safe_realpath(full_path);
|
||||
const char *custom_binary = getenv(MCPI_BINARY_ENV);
|
||||
if (custom_binary != nullptr) {
|
||||
game_binary = safe_realpath(custom_binary);
|
||||
} else {
|
||||
game_binary = original_game_binary;
|
||||
}
|
||||
}
|
||||
|
||||
// Fix MCPI Dependencies
|
||||
@ -119,7 +126,7 @@ void bootstrap(const options_t &options) {
|
||||
|
||||
// Set MCPI_VANILLA_ASSETS_PATH
|
||||
{
|
||||
std::string assets_path = game_binary;
|
||||
std::string assets_path = original_game_binary;
|
||||
chop_last_component(assets_path);
|
||||
assets_path += "/data";
|
||||
set_and_print_env(_MCPI_VANILLA_ASSETS_PATH_ENV, assets_path.c_str());
|
||||
|
@ -20,6 +20,7 @@ ENV(MCPI_SKIN_SERVER, "Custom Skin Server")
|
||||
ENV(MCPI_API_PORT, "Custom API Port")
|
||||
ENV(MCPI_BLOCK_OUTLINE_WIDTH, "Custom Width For Block Outline (In Pixels)")
|
||||
ENV(MCPI_GUI_SCALE, "Custom GUI Scale")
|
||||
ENV(MCPI_BINARY, "Custom Game Binary")
|
||||
// $HOME
|
||||
ENV(_MCPI_HOME, "")
|
||||
ENV(MCPI_PROFILE_DIRECTORY, "Custom Profile Directory")
|
Loading…
Reference in New Issue
Block a user