Revert "TEMPORARY Push with all relative paths changed for building exe"

This reverts commit 0979ee93e6.
This commit is contained in:
Xiao Qi 2022-11-02 22:44:27 +08:00
parent 0979ee93e6
commit f24346a6fd
5 changed files with 12 additions and 21 deletions

View File

@ -56,7 +56,7 @@ enum class AssetType : AssetTypeMeta
constexpr size_t TYPE_COUNT{ static_cast<size_t>(AssetType::MAX_COUNT) };
//Directory
#ifndef _PUBLISH
#ifdef _PUBLISH
constexpr std::string_view ASSET_ROOT{ "Assets" };
constexpr std::string_view BUILT_IN_ASSET_ROOT {"Built_In"};
#else

View File

@ -79,10 +79,10 @@ namespace SHADE
//SHResourceManager::LoadAllAudio(system, soundList);
LoadBank("Assets/Audio/Master.bank");
LoadBank("Assets/Audio/Master.strings.bank");
LoadBank("../../Assets/Audio/Master.bank");
LoadBank("../../Assets/Audio/Master.strings.bank");
//LoadBank("../../Assets/Audio/Music.bank");
LoadBank("Assets/Audio/footsteps.bank");
LoadBank("../../Assets/Audio/footsteps.bank");
//auto clip = CreateAudioClip("event:/Characters/sfx_footsteps_human");
//clip->Play();

View File

@ -38,7 +38,7 @@ namespace SHADE
void SHEditorMenuBar::Init()
{
SHEditorWindow::Init();
constexpr std::string_view path = "Assets/Editor/Layouts";
constexpr std::string_view path = "../../Assets/Editor/Layouts";
for(auto const& entry : std::filesystem::directory_iterator(path))
{
layoutPaths.push_back(entry.path());
@ -77,11 +77,11 @@ namespace SHADE
{
if(ImGui::Selectable("Save"))
{
SHSerialization::SerializeSceneToFile("Assets/Scenes/Test.SHADE");
SHSerialization::SerializeSceneToFile("../../Assets/Scenes/Test.SHADE");
}
if(ImGui::Selectable("Load"))
{
SHSerialization::DeserializeSceneFromFile("Assets/Scenes/Test.SHADE");
SHSerialization::DeserializeSceneFromFile("../../Assets/Scenes/Test.SHADE");
}
ImGui::EndMenu();
}

View File

@ -102,11 +102,7 @@ namespace SHADE
io->ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls
io->ConfigFlags |= ImGuiConfigFlags_ViewportsEnable; //Enable for Multi-Viewports
io->ConfigFlags |= ImGuiConfigFlags_DockingEnable; //Enable docking
#ifndef _PUBLISH
io->IniFilename = "Assets/Editor/Layouts/UserLayout.ini";
#else
io->IniFilename = "../../Assets/Editor/Layouts/UserLayout.ini";
#endif
io->ConfigWindowsMoveFromTitleBarOnly = true;
InitLayout();
@ -180,20 +176,20 @@ namespace SHADE
{
if(!std::filesystem::exists(io->IniFilename))
{
std::filesystem::copy_file("Assets/Editor/Layouts/Default.ini", io->IniFilename);
std::filesystem::copy_file("../../Assets/Editor/Layouts/Default.ini", io->IniFilename);
}
//eventually load preferred layout here
}
void SHEditor::InitFonts() noexcept
{
ImFont* mainFont = io->Fonts->AddFontFromFileTTF("Assets/Editor/Fonts/Segoe UI.ttf", 20.f);//TODO: Change to config based assets path
ImFont* mainFont = io->Fonts->AddFontFromFileTTF("../../Assets/Editor/Fonts/Segoe UI.ttf", 20.f);//TODO: Change to config based assets path
ImFontConfig icons_config{}; icons_config.MergeMode = true; icons_config.GlyphOffset.y = 5.f;
constexpr ImWchar icon_ranges_fa[] = { ICON_MIN_FA, ICON_MAX_FA, 0 };
ImFont* UIFontFA = io->Fonts->AddFontFromFileTTF("Assets/Editor/Fonts/fa-solid-900.ttf", 20.f, &icons_config, icon_ranges_fa); //TODO: Change to config based assets path
ImFont* UIFontFA = io->Fonts->AddFontFromFileTTF("../../Assets/Editor/Fonts/fa-solid-900.ttf", 20.f, &icons_config, icon_ranges_fa); //TODO: Change to config based assets path
constexpr ImWchar icon_ranges_md[] = { ICON_MIN_MD, ICON_MAX_16_MD, 0 };
ImFont* UIFontMD = io->Fonts->AddFontFromFileTTF("Assets/Editor/Fonts/MaterialIcons-Regular.ttf", 20.f, &icons_config, icon_ranges_md); //TODO: Change to config based assets path
ImFont* UIFontMD = io->Fonts->AddFontFromFileTTF("../../Assets/Editor/Fonts/MaterialIcons-Regular.ttf", 20.f, &icons_config, icon_ranges_md); //TODO: Change to config based assets path
io->Fonts->Build();
}

View File

@ -32,11 +32,7 @@ namespace SHADE
/* Static Definitions */
/*----------------------------------------------------------------------------------*/
const std::string SHScriptEngine::DEFAULT_CSHARP_NAMESPACE = std::string("SHADE");
#ifndef _PUBLISH
const std::string SHScriptEngine::CSPROJ_DIR = "TempScriptsFolder";
#else
const std::string SHScriptEngine::CSPROJ_DIR = "..\\..\\TempScriptsFolder";
#endif
const std::string SHScriptEngine::CSPROJ_DIR = "..\\..\\TempScriptsFolder";
const std::string SHScriptEngine::CSPROJ_PATH = std::string(CSPROJ_DIR) + "\\SHADE_Scripting.csproj";
/*-----------------------------------------------------------------------------------*/
@ -268,7 +264,6 @@ namespace SHADE
<Reference Include=\"SHADE_Managed\">\n\
<HintPath Condition=\"Exists('..\\bin\\Debug\\SHADE_Managed.dll')\">..\\bin\\Debug\\SHADE_Managed.dll</HintPath>\n\
<HintPath Condition=\"Exists('..\\bin\\Release\\SHADE_Managed.dll')\">..\\bin\\Release\\SHADE_Managed.dll</HintPath>\n\
<HintPath Condition=\"Exists('SHADE_Managed.dll')\">SHADE_Managed.dll</HintPath>\n\
</Reference>\n\
<Reference Include=\"SHADE_CSharp\">\n\
<HintPath Condition=\"Exists('..\\bin\\Debug\\SHADE_Managed.dll')\">..\\bin\\Debug\\SHADE_CSharp.dll</HintPath>\n\