From d9b49e957d1c2d56b125a8f85745d9f235e81fc3 Mon Sep 17 00:00:00 2001 From: lzwdgc Date: Tue, 29 Oct 2019 02:46:49 +0300 Subject: [PATCH] Update sw build. Update emitter addition. --- src/script2txt/script2txt.yy | 16 ++++++++-------- sw.cpp | 13 ++++++++----- 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/src/script2txt/script2txt.yy b/src/script2txt/script2txt.yy index 5d73fca..6a5760c 100644 --- a/src/script2txt/script2txt.yy +++ b/src/script2txt/script2txt.yy @@ -107,7 +107,7 @@ global_statements: global_statement { auto &ctx = $1; ctx.addLine(); - ctx.addWithRelativeIndent($2); + ctx.addEmitter($2); $$ = std::move(ctx); } ; @@ -140,7 +140,7 @@ procedure: procedure_begin proc_statements END { Emitter ctx; ctx.beginBlock($1); - ctx.addWithRelativeIndent($2); + ctx.addEmitter($2); ctx.endBlock(); $$ = std::move(ctx); } @@ -155,7 +155,7 @@ procedure: procedure_begin proc_statements END { Emitter ctx; ctx.beginBlock($1); - ctx.addWithRelativeIndent($3); + ctx.addEmitter($3); ctx.endBlock(); $$ = std::move(ctx); } @@ -171,7 +171,7 @@ proc_statements: proc_statement | proc_statements proc_statement { auto &ctx = $1; - ctx.addWithRelativeIndent($2); + ctx.addEmitter($2); $$ = std::move(ctx); } ; @@ -202,7 +202,7 @@ statements: statement | statements statement { auto &ctx = $1; - ctx.addWithRelativeIndent($2); + ctx.addEmitter($2); $$ = std::move(ctx); } ; @@ -244,7 +244,7 @@ condition: condition_begin { auto &ctx = $1; ctx.beginBlock("else"); - ctx.addWithRelativeIndent($4); + ctx.addEmitter($4); ctx.endBlock(); $$ = std::move(ctx); } @@ -253,7 +253,7 @@ condition_begin: IF L_BRACKET condition_body R_BRACKET L_CURLY_BRACKET statement { Emitter ctx; ctx.beginBlock("if (" + $3 + ")"); - ctx.addWithRelativeIndent($6); + ctx.addEmitter($6); ctx.endBlock(); $$ = std::move(ctx); } @@ -261,7 +261,7 @@ condition_begin: IF L_BRACKET condition_body R_BRACKET L_CURLY_BRACKET statement { Emitter ctx; ctx.beginBlock("if (" + $3 + ")"); - ctx.addWithRelativeIndent($5); + ctx.addEmitter($5); ctx.endBlock(); $$ = std::move(ctx); } diff --git a/sw.cpp b/sw.cpp index cfe5b0a..b97f528 100644 --- a/sw.cpp +++ b/sw.cpp @@ -42,7 +42,7 @@ void build(Solution &s) add_exe_with_common("tm_converter"); add_exe("name_generator"); add_exe_with_common("save_loader"); - if (common.getSettings().TargetOS.Arch == ArchType::x86) + if (common.getBuildSettings().TargetOS.Arch == ArchType::x86) add_exe("unpaker"); // 32-bit only // not so simple targets @@ -67,10 +67,13 @@ void build(Solution &s) path sdk = "d:/arh/apps/Autodesk/FBX/FBX SDK/2019.0"; mod_converter += IncludeDirectory(sdk / "include"); String cfg = "release"; - if (mod_converter.getSettings().Native.ConfigurationType == ConfigurationType::Debug) + if (mod_converter.getBuildSettings().Native.ConfigurationType == ConfigurationType::Debug) cfg = "debug"; String arch = "x64"; - if (mod_converter.getSettings().TargetOS.Arch == ArchType::x86) - arch = "x86"; - mod_converter += LinkLibrary(sdk / ("lib/vs2015/" + arch + "/" + cfg + "/libfbxsdk-md.lib")); + if (mod_converter.getBuildSettings().TargetOS.Arch == ArchType::x86) + arch = "x86"; + String md = "md"; + if (mod_converter.getBuildSettings().Native.MT) + md = "mt"; + mod_converter += LinkLibrary(sdk / ("lib/vs2015/" + arch + "/" + cfg + "/libfbxsdk-" + md + ".lib")); }