mirror of
https://github.com/Z3Prover/z3
synced 2025-04-12 12:08:18 +00:00
Fix echo
command for Windows.
This commit is contained in:
parent
2fbaad15d7
commit
d4567a1255
|
@ -2396,27 +2396,35 @@ class DotNetExampleComponent(ExampleComponent):
|
||||||
for csfile in get_cs_files(self.ex_dir):
|
for csfile in get_cs_files(self.ex_dir):
|
||||||
out.write(' ')
|
out.write(' ')
|
||||||
out.write(os.path.join(self.to_ex_dir, csfile))
|
out.write(os.path.join(self.to_ex_dir, csfile))
|
||||||
|
|
||||||
|
def mk_echo(msg):
|
||||||
|
echo_ex_qu = '' if IS_WINDOWS else '"'
|
||||||
|
echo_in_qu = '"' if IS_WINDOWS else '\\"'
|
||||||
|
echo_esc = '^' if IS_WINDOWS else ''
|
||||||
|
|
||||||
|
msg = msg.replace('"', echo_in_qu).replace('<', echo_esc + '<').replace('>', echo_esc + '>')
|
||||||
|
out.write('\t@echo %s%s%s > %s\n' % (echo_ex_qu, msg, echo_ex_qu, proj_name))
|
||||||
|
|
||||||
out.write('\n')
|
out.write('\n')
|
||||||
out.write('\t@echo "<Project Sdk=\\"Microsoft.NET.Sdk\\">" > %s\n' % proj_name)
|
mk_echo('<Project Sdk="Microsoft.NET.Sdk">')
|
||||||
out.write('\t@echo " <PropertyGroup>" >> %s\n' % proj_name)
|
mk_echo(' <PropertyGroup>')
|
||||||
out.write('\t@echo " <OutputType>Exe</OutputType>" >> %s\n' % proj_name)
|
mk_echo(' <OutputType>Exe</OutputType>')
|
||||||
out.write('\t@echo " <TargetFramework>netcoreapp2.0</TargetFramework>" >> %s\n' % proj_name)
|
mk_echo(' <TargetFramework>netcoreapp2.0</TargetFramework>')
|
||||||
out.write('\t@echo " <PlatformTarget>')
|
|
||||||
if VS_X64:
|
if VS_X64:
|
||||||
out.write('x64')
|
platform = 'x64'
|
||||||
elif VS_ARM:
|
elif VS_ARM:
|
||||||
out.write('ARM')
|
platform = 'ARM'
|
||||||
else:
|
else:
|
||||||
out.write('x86')
|
platform = 'x86'
|
||||||
out.write('</PlatformTarget>" >> %s\n' % proj_name)
|
mk_echo(' <PlatformTarget>%s</PlatformTarget>' % platform)
|
||||||
out.write('\t@echo " </PropertyGroup>" >> %s\n' % proj_name)
|
mk_echo(' </PropertyGroup>')
|
||||||
out.write('\t@echo " <ItemGroup>" >> %s\n' % proj_name)
|
mk_echo(' <ItemGroup>')
|
||||||
out.write('\t@echo " <Compile Include=\\"%s/*.cs\\" />" >> %s\n' % (self.to_ex_dir, proj_name))
|
mk_echo(' <Compile Include="%s/*.cs" />' % self.to_ex_dir)
|
||||||
out.write('\t@echo " <Reference Include=\\"Microsoft.Z3\\">" >> %s\n' % proj_name)
|
mk_echo(' <Reference Include="Microsoft.Z3">')
|
||||||
out.write('\t@echo " <HintPath>Microsoft.Z3.dll</HintPath>" >> %s\n' % proj_name)
|
mk_echo(' <HintPath>Microsoft.Z3.dll</HintPath')
|
||||||
out.write('\t@echo " </Reference>" >> %s\n' % proj_name)
|
mk_echo(' </Reference>')
|
||||||
out.write('\t@echo " </ItemGroup>" >> %s\n' % proj_name)
|
mk_echo(' </ItemGroup>')
|
||||||
out.write('\t@echo "</Project>" >> %s\n' % proj_name)
|
mk_echo('</Project>')
|
||||||
|
|
||||||
dotnetCmdLine = [DOTNET, "build", proj_name]
|
dotnetCmdLine = [DOTNET, "build", proj_name]
|
||||||
dotnetCmdLine.extend(['-c'])
|
dotnetCmdLine.extend(['-c'])
|
||||||
|
|
Loading…
Reference in a new issue