mirror of https://github.com/YosysHQ/abc.git
Merge pull request #486 from wjrforcyber/fix_windows_build
Refactor(Workflow): Windows build refactor
This commit is contained in:
commit
ea6be8a51c
|
|
@ -0,0 +1,62 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
|
<ProjectConfiguration Include="Release|Win32">
|
||||||
|
<Configuration>Release</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
</ItemGroup>
|
||||||
|
<PropertyGroup Label="Globals">
|
||||||
|
<VCProjectVersion>17.0</VCProjectVersion>
|
||||||
|
<ProjectGuid>{6B6D7E0F-1234-4567-89AB-CDEF01234568}</ProjectGuid>
|
||||||
|
<Keyword>Win32Proj</Keyword>
|
||||||
|
<RootNamespace>abcexe</RootNamespace>
|
||||||
|
<TargetName>abc</TargetName>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<UseDebugLibraries>false</UseDebugLibraries>
|
||||||
|
<PlatformToolset>v143</PlatformToolset>
|
||||||
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||||
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
|
<OutDir>_TEST\</OutDir>
|
||||||
|
<IntDir>ReleaseExe\</IntDir>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DisableSpecificWarnings>4146;4334;4996;4703;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||||
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
|
<SDLCheck>true</SDLCheck>
|
||||||
|
<PreprocessorDefinitions>WIN32;WINDOWS;NDEBUG;_CONSOLE;ABC_DLL=ABC_DLLEXPORT;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ABC_USE_PTHREADS;ABC_USE_CUDD;HAVE_STRUCT_TIMESPEC;_WINSOCKAPI_;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<ConformanceMode>true</ConformanceMode>
|
||||||
|
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||||
|
<AdditionalIncludeDirectories>src</AdditionalIncludeDirectories>
|
||||||
|
<AdditionalOptions>/Zc:strictStrings- %(AdditionalOptions)</AdditionalOptions>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;lib\x86\pthreadVC2.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="src\base\main\main.c" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="abclib.vcxproj">
|
||||||
|
<Project>{6B6D7E0F-1234-4567-89AB-CDEF01234567}</Project>
|
||||||
|
</ProjectReference>
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
|
</Project>
|
||||||
|
|
@ -0,0 +1,52 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
|
<ProjectConfiguration Include="Release|Win32">
|
||||||
|
<Configuration>Release</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
</ItemGroup>
|
||||||
|
<PropertyGroup Label="Globals">
|
||||||
|
<VCProjectVersion>17.0</VCProjectVersion>
|
||||||
|
<ProjectGuid>{6B6D7E0F-1234-4567-89AB-CDEF01234567}</ProjectGuid>
|
||||||
|
<Keyword>Win32Proj</Keyword>
|
||||||
|
<RootNamespace>abclib</RootNamespace>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
|
<UseDebugLibraries>false</UseDebugLibraries>
|
||||||
|
<PlatformToolset>v143</PlatformToolset>
|
||||||
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||||
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
|
<OutDir>lib\</OutDir>
|
||||||
|
<IntDir>ReleaseLib\</IntDir>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DisableSpecificWarnings>4146;4334;4996;4703;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||||
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
|
<SDLCheck>true</SDLCheck>
|
||||||
|
<PreprocessorDefinitions>WIN32;WINDOWS;NDEBUG;_LIB;ABC_DLL=ABC_DLLEXPORT;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ABC_USE_PTHREADS;ABC_USE_CUDD;HAVE_STRUCT_TIMESPEC;_WINSOCKAPI_;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<ConformanceMode>true</ConformanceMode>
|
||||||
|
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||||
|
<AdditionalIncludeDirectories>src</AdditionalIncludeDirectories>
|
||||||
|
<AdditionalOptions>/Zc:strictStrings- %(AdditionalOptions)</AdditionalOptions>
|
||||||
|
</ClCompile>
|
||||||
|
<Lib>
|
||||||
|
<OutputFile>$(OutDir)abcr.lib</OutputFile>
|
||||||
|
</Lib>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
{{SOURCE_FILES}}
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
|
</Project>
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
|
# Visual Studio Version 17
|
||||||
|
VisualStudioVersion = 17.0.31903.59
|
||||||
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "abclib", "abclib.vcxproj", "{6B6D7E0F-1234-4567-89AB-CDEF01234567}"
|
||||||
|
EndProject
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "abcexe", "abcexe.vcxproj", "{6B6D7E0F-1234-4567-89AB-CDEF01234568}"
|
||||||
|
ProjectSection(ProjectDependencies) = postProject
|
||||||
|
{6B6D7E0F-1234-4567-89AB-CDEF01234567} = {6B6D7E0F-1234-4567-89AB-CDEF01234567}
|
||||||
|
EndProjectSection
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Release|Win32 = Release|Win32
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{6B6D7E0F-1234-4567-89AB-CDEF01234567}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
|
{6B6D7E0F-1234-4567-89AB-CDEF01234567}.Release|Win32.Build.0 = Release|Win32
|
||||||
|
{6B6D7E0F-1234-4567-89AB-CDEF01234568}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
|
{6B6D7E0F-1234-4567-89AB-CDEF01234568}.Release|Win32.Build.0 = Release|Win32
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
||||||
|
|
@ -22,179 +22,38 @@ jobs:
|
||||||
with:
|
with:
|
||||||
arch: x86
|
arch: x86
|
||||||
|
|
||||||
- name: Generate solution and project files from dsp
|
- name: Copy project files from scripts
|
||||||
|
run: |
|
||||||
|
copy .github\scripts\abcspace.sln .
|
||||||
|
copy .github\scripts\abcexe.vcxproj .
|
||||||
|
|
||||||
|
- name: Generate abclib.vcxproj from dsp
|
||||||
shell: powershell
|
shell: powershell
|
||||||
run: |
|
run: |
|
||||||
# Parse source files from abclib.dsp
|
# Parse source files from abclib.dsp
|
||||||
$dspContent = Get-Content "abclib.dsp" -Raw
|
$dspContent = Get-Content "abclib.dsp" -Raw
|
||||||
# Match SOURCE=. followed by path (e.g., SOURCE=.\src\base\abc\abc.c)
|
|
||||||
# Capture the path without the leading backslash
|
|
||||||
$sourceFiles = [regex]::Matches($dspContent, 'SOURCE=\.\\([^\r\n]+)') | ForEach-Object { $_.Groups[1].Value } | Sort-Object -Unique
|
$sourceFiles = [regex]::Matches($dspContent, 'SOURCE=\.\\([^\r\n]+)') | ForEach-Object { $_.Groups[1].Value } | Sort-Object -Unique
|
||||||
|
|
||||||
Write-Host "Found $($sourceFiles.Count) source files"
|
Write-Host "Found $($sourceFiles.Count) source files"
|
||||||
|
|
||||||
# Create the solution file (use tabs for indentation)
|
# Build source file items
|
||||||
$slnContent = "Microsoft Visual Studio Solution File, Format Version 12.00`r`n"
|
$sourceItems = ""
|
||||||
$slnContent += "VisualStudioVersion = 17.0.31903.59`r`n"
|
|
||||||
$slnContent += "MinimumVisualStudioVersion = 10.0.40219.1`r`n"
|
|
||||||
$slnContent += 'Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "abclib", "abclib.vcxproj", "{6B6D7E0F-1234-4567-89AB-CDEF01234567}"' + "`r`n"
|
|
||||||
$slnContent += "EndProject`r`n"
|
|
||||||
$slnContent += 'Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "abcexe", "abcexe.vcxproj", "{6B6D7E0F-1234-4567-89AB-CDEF01234568}"' + "`r`n"
|
|
||||||
$slnContent += "`tProjectSection(ProjectDependencies) = postProject`r`n"
|
|
||||||
$slnContent += "`t`t{6B6D7E0F-1234-4567-89AB-CDEF01234567} = {6B6D7E0F-1234-4567-89AB-CDEF01234567}`r`n"
|
|
||||||
$slnContent += "`tEndProjectSection`r`n"
|
|
||||||
$slnContent += "EndProject`r`n"
|
|
||||||
$slnContent += "Global`r`n"
|
|
||||||
$slnContent += "`tGlobalSection(SolutionConfigurationPlatforms) = preSolution`r`n"
|
|
||||||
$slnContent += "`t`tRelease|Win32 = Release|Win32`r`n"
|
|
||||||
$slnContent += "`tEndGlobalSection`r`n"
|
|
||||||
$slnContent += "`tGlobalSection(ProjectConfigurationPlatforms) = postSolution`r`n"
|
|
||||||
$slnContent += "`t`t{6B6D7E0F-1234-4567-89AB-CDEF01234567}.Release|Win32.ActiveCfg = Release|Win32`r`n"
|
|
||||||
$slnContent += "`t`t{6B6D7E0F-1234-4567-89AB-CDEF01234567}.Release|Win32.Build.0 = Release|Win32`r`n"
|
|
||||||
$slnContent += "`t`t{6B6D7E0F-1234-4567-89AB-CDEF01234568}.Release|Win32.ActiveCfg = Release|Win32`r`n"
|
|
||||||
$slnContent += "`t`t{6B6D7E0F-1234-4567-89AB-CDEF01234568}.Release|Win32.Build.0 = Release|Win32`r`n"
|
|
||||||
$slnContent += "`tEndGlobalSection`r`n"
|
|
||||||
$slnContent += "EndGlobal`r`n"
|
|
||||||
Set-Content "abcspace.sln" $slnContent -NoNewline
|
|
||||||
|
|
||||||
# Build source file items for vcxproj
|
|
||||||
# Separate .c and .cpp files - .c files compile as C, .cpp files compile as C++
|
|
||||||
$cCompileItems = ""
|
|
||||||
$cppCompileItems = ""
|
|
||||||
$clIncludeItems = ""
|
|
||||||
foreach ($src in $sourceFiles) {
|
foreach ($src in $sourceFiles) {
|
||||||
if ($src -match '\.c$') {
|
if ($src -match '\.c$') {
|
||||||
$cCompileItems += " <ClCompile Include=`"$src`" />`r`n"
|
$sourceItems += " <ClCompile Include=`"$src`" />`r`n"
|
||||||
} elseif ($src -match '\.(cpp|cc)$') {
|
} elseif ($src -match '\.(cpp|cc)$') {
|
||||||
$cppCompileItems += " <ClCompile Include=`"$src`" />`r`n"
|
$sourceItems += " <ClCompile Include=`"$src`" />`r`n"
|
||||||
} elseif ($src -match '\.h$') {
|
} elseif ($src -match '\.h$') {
|
||||||
$clIncludeItems += " <ClInclude Include=`"$src`" />`r`n"
|
$sourceItems += " <ClInclude Include=`"$src`" />`r`n"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Create abclib.vcxproj (static library)
|
# Read template and replace placeholder
|
||||||
$libVcxproj = '<?xml version="1.0" encoding="utf-8"?>' + "`r`n"
|
$template = Get-Content ".github\scripts\abclib.vcxproj.template" -Raw
|
||||||
$libVcxproj += '<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">' + "`r`n"
|
$vcxproj = $template -replace '\{\{SOURCE_FILES\}\}', $sourceItems
|
||||||
$libVcxproj += ' <ItemGroup Label="ProjectConfigurations">' + "`r`n"
|
Set-Content "abclib.vcxproj" $vcxproj -NoNewline
|
||||||
$libVcxproj += ' <ProjectConfiguration Include="Release|Win32">' + "`r`n"
|
|
||||||
$libVcxproj += ' <Configuration>Release</Configuration>' + "`r`n"
|
|
||||||
$libVcxproj += ' <Platform>Win32</Platform>' + "`r`n"
|
|
||||||
$libVcxproj += ' </ProjectConfiguration>' + "`r`n"
|
|
||||||
$libVcxproj += ' </ItemGroup>' + "`r`n"
|
|
||||||
$libVcxproj += ' <PropertyGroup Label="Globals">' + "`r`n"
|
|
||||||
$libVcxproj += ' <VCProjectVersion>17.0</VCProjectVersion>' + "`r`n"
|
|
||||||
$libVcxproj += ' <ProjectGuid>{6B6D7E0F-1234-4567-89AB-CDEF01234567}</ProjectGuid>' + "`r`n"
|
|
||||||
$libVcxproj += ' <Keyword>Win32Proj</Keyword>' + "`r`n"
|
|
||||||
$libVcxproj += ' <RootNamespace>abclib</RootNamespace>' + "`r`n"
|
|
||||||
$libVcxproj += ' </PropertyGroup>' + "`r`n"
|
|
||||||
$libVcxproj += ' <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />' + "`r`n"
|
|
||||||
$libVcxproj += ' <PropertyGroup Condition="''$(Configuration)|$(Platform)''==''Release|Win32''" Label="Configuration">' + "`r`n"
|
|
||||||
$libVcxproj += ' <ConfigurationType>StaticLibrary</ConfigurationType>' + "`r`n"
|
|
||||||
$libVcxproj += ' <UseDebugLibraries>false</UseDebugLibraries>' + "`r`n"
|
|
||||||
$libVcxproj += ' <PlatformToolset>v143</PlatformToolset>' + "`r`n"
|
|
||||||
$libVcxproj += ' <WholeProgramOptimization>true</WholeProgramOptimization>' + "`r`n"
|
|
||||||
$libVcxproj += ' <CharacterSet>MultiByte</CharacterSet>' + "`r`n"
|
|
||||||
$libVcxproj += ' </PropertyGroup>' + "`r`n"
|
|
||||||
$libVcxproj += ' <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />' + "`r`n"
|
|
||||||
$libVcxproj += ' <ImportGroup Label="PropertySheets" Condition="''$(Configuration)|$(Platform)''==''Release|Win32''">' + "`r`n"
|
|
||||||
$libVcxproj += ' <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists(''$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props'')" Label="LocalAppDataPlatform" />' + "`r`n"
|
|
||||||
$libVcxproj += ' </ImportGroup>' + "`r`n"
|
|
||||||
$libVcxproj += ' <PropertyGroup Condition="''$(Configuration)|$(Platform)''==''Release|Win32''">' + "`r`n"
|
|
||||||
$libVcxproj += ' <OutDir>lib\</OutDir>' + "`r`n"
|
|
||||||
$libVcxproj += ' <IntDir>ReleaseLib\</IntDir>' + "`r`n"
|
|
||||||
$libVcxproj += ' </PropertyGroup>' + "`r`n"
|
|
||||||
$libVcxproj += ' <ItemDefinitionGroup Condition="''$(Configuration)|$(Platform)''==''Release|Win32''">' + "`r`n"
|
|
||||||
$libVcxproj += ' <ClCompile>' + "`r`n"
|
|
||||||
$libVcxproj += ' <WarningLevel>Level3</WarningLevel>' + "`r`n"
|
|
||||||
$libVcxproj += ' <DisableSpecificWarnings>4146;4334;4996;4703;%(DisableSpecificWarnings)</DisableSpecificWarnings>' + "`r`n"
|
|
||||||
$libVcxproj += ' <FunctionLevelLinking>true</FunctionLevelLinking>' + "`r`n"
|
|
||||||
$libVcxproj += ' <IntrinsicFunctions>true</IntrinsicFunctions>' + "`r`n"
|
|
||||||
$libVcxproj += ' <SDLCheck>true</SDLCheck>' + "`r`n"
|
|
||||||
$libVcxproj += ' <PreprocessorDefinitions>WIN32;WINDOWS;NDEBUG;_LIB;ABC_DLL=ABC_DLLEXPORT;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ABC_USE_PTHREADS;ABC_USE_CUDD;HAVE_STRUCT_TIMESPEC;_WINSOCKAPI_;%(PreprocessorDefinitions)</PreprocessorDefinitions>' + "`r`n"
|
|
||||||
$libVcxproj += ' <ConformanceMode>true</ConformanceMode>' + "`r`n"
|
|
||||||
$libVcxproj += ' <LanguageStandard>stdcpp17</LanguageStandard>' + "`r`n"
|
|
||||||
$libVcxproj += ' <AdditionalIncludeDirectories>src</AdditionalIncludeDirectories>' + "`r`n"
|
|
||||||
$libVcxproj += ' <AdditionalOptions>/Zc:strictStrings- %(AdditionalOptions)</AdditionalOptions>' + "`r`n"
|
|
||||||
$libVcxproj += ' </ClCompile>' + "`r`n"
|
|
||||||
$libVcxproj += ' <Lib>' + "`r`n"
|
|
||||||
$libVcxproj += ' <OutputFile>$(OutDir)abcr.lib</OutputFile>' + "`r`n"
|
|
||||||
$libVcxproj += ' </Lib>' + "`r`n"
|
|
||||||
$libVcxproj += ' </ItemDefinitionGroup>' + "`r`n"
|
|
||||||
$libVcxproj += ' <ItemGroup>' + "`r`n"
|
|
||||||
$libVcxproj += $cCompileItems
|
|
||||||
$libVcxproj += $cppCompileItems
|
|
||||||
$libVcxproj += $clIncludeItems
|
|
||||||
$libVcxproj += ' </ItemGroup>' + "`r`n"
|
|
||||||
$libVcxproj += ' <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />' + "`r`n"
|
|
||||||
$libVcxproj += '</Project>' + "`r`n"
|
|
||||||
Set-Content "abclib.vcxproj" $libVcxproj -NoNewline
|
|
||||||
|
|
||||||
# Create abcexe.vcxproj (executable)
|
Write-Host "abclib.vcxproj generated successfully"
|
||||||
$exeVcxproj = '<?xml version="1.0" encoding="utf-8"?>' + "`r`n"
|
|
||||||
$exeVcxproj += '<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">' + "`r`n"
|
|
||||||
$exeVcxproj += ' <ItemGroup Label="ProjectConfigurations">' + "`r`n"
|
|
||||||
$exeVcxproj += ' <ProjectConfiguration Include="Release|Win32">' + "`r`n"
|
|
||||||
$exeVcxproj += ' <Configuration>Release</Configuration>' + "`r`n"
|
|
||||||
$exeVcxproj += ' <Platform>Win32</Platform>' + "`r`n"
|
|
||||||
$exeVcxproj += ' </ProjectConfiguration>' + "`r`n"
|
|
||||||
$exeVcxproj += ' </ItemGroup>' + "`r`n"
|
|
||||||
$exeVcxproj += ' <PropertyGroup Label="Globals">' + "`r`n"
|
|
||||||
$exeVcxproj += ' <VCProjectVersion>17.0</VCProjectVersion>' + "`r`n"
|
|
||||||
$exeVcxproj += ' <ProjectGuid>{6B6D7E0F-1234-4567-89AB-CDEF01234568}</ProjectGuid>' + "`r`n"
|
|
||||||
$exeVcxproj += ' <Keyword>Win32Proj</Keyword>' + "`r`n"
|
|
||||||
$exeVcxproj += ' <RootNamespace>abcexe</RootNamespace>' + "`r`n"
|
|
||||||
$exeVcxproj += ' <TargetName>abc</TargetName>' + "`r`n"
|
|
||||||
$exeVcxproj += ' </PropertyGroup>' + "`r`n"
|
|
||||||
$exeVcxproj += ' <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />' + "`r`n"
|
|
||||||
$exeVcxproj += ' <PropertyGroup Condition="''$(Configuration)|$(Platform)''==''Release|Win32''" Label="Configuration">' + "`r`n"
|
|
||||||
$exeVcxproj += ' <ConfigurationType>Application</ConfigurationType>' + "`r`n"
|
|
||||||
$exeVcxproj += ' <UseDebugLibraries>false</UseDebugLibraries>' + "`r`n"
|
|
||||||
$exeVcxproj += ' <PlatformToolset>v143</PlatformToolset>' + "`r`n"
|
|
||||||
$exeVcxproj += ' <WholeProgramOptimization>true</WholeProgramOptimization>' + "`r`n"
|
|
||||||
$exeVcxproj += ' <CharacterSet>MultiByte</CharacterSet>' + "`r`n"
|
|
||||||
$exeVcxproj += ' </PropertyGroup>' + "`r`n"
|
|
||||||
$exeVcxproj += ' <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />' + "`r`n"
|
|
||||||
$exeVcxproj += ' <ImportGroup Label="PropertySheets" Condition="''$(Configuration)|$(Platform)''==''Release|Win32''">' + "`r`n"
|
|
||||||
$exeVcxproj += ' <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists(''$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props'')" Label="LocalAppDataPlatform" />' + "`r`n"
|
|
||||||
$exeVcxproj += ' </ImportGroup>' + "`r`n"
|
|
||||||
$exeVcxproj += ' <PropertyGroup Condition="''$(Configuration)|$(Platform)''==''Release|Win32''">' + "`r`n"
|
|
||||||
$exeVcxproj += ' <OutDir>_TEST\</OutDir>' + "`r`n"
|
|
||||||
$exeVcxproj += ' <IntDir>ReleaseExe\</IntDir>' + "`r`n"
|
|
||||||
$exeVcxproj += ' </PropertyGroup>' + "`r`n"
|
|
||||||
$exeVcxproj += ' <ItemDefinitionGroup Condition="''$(Configuration)|$(Platform)''==''Release|Win32''">' + "`r`n"
|
|
||||||
$exeVcxproj += ' <ClCompile>' + "`r`n"
|
|
||||||
$exeVcxproj += ' <WarningLevel>Level3</WarningLevel>' + "`r`n"
|
|
||||||
$exeVcxproj += ' <DisableSpecificWarnings>4146;4334;4996;4703;%(DisableSpecificWarnings)</DisableSpecificWarnings>' + "`r`n"
|
|
||||||
$exeVcxproj += ' <FunctionLevelLinking>true</FunctionLevelLinking>' + "`r`n"
|
|
||||||
$exeVcxproj += ' <IntrinsicFunctions>true</IntrinsicFunctions>' + "`r`n"
|
|
||||||
$exeVcxproj += ' <SDLCheck>true</SDLCheck>' + "`r`n"
|
|
||||||
$exeVcxproj += ' <PreprocessorDefinitions>WIN32;WINDOWS;NDEBUG;_CONSOLE;ABC_DLL=ABC_DLLEXPORT;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ABC_USE_PTHREADS;ABC_USE_CUDD;HAVE_STRUCT_TIMESPEC;_WINSOCKAPI_;%(PreprocessorDefinitions)</PreprocessorDefinitions>' + "`r`n"
|
|
||||||
$exeVcxproj += ' <ConformanceMode>true</ConformanceMode>' + "`r`n"
|
|
||||||
$exeVcxproj += ' <LanguageStandard>stdcpp17</LanguageStandard>' + "`r`n"
|
|
||||||
$exeVcxproj += ' <AdditionalIncludeDirectories>src</AdditionalIncludeDirectories>' + "`r`n"
|
|
||||||
$exeVcxproj += ' <AdditionalOptions>/Zc:strictStrings- %(AdditionalOptions)</AdditionalOptions>' + "`r`n"
|
|
||||||
$exeVcxproj += ' </ClCompile>' + "`r`n"
|
|
||||||
$exeVcxproj += ' <Link>' + "`r`n"
|
|
||||||
$exeVcxproj += ' <SubSystem>Console</SubSystem>' + "`r`n"
|
|
||||||
$exeVcxproj += ' <EnableCOMDATFolding>true</EnableCOMDATFolding>' + "`r`n"
|
|
||||||
$exeVcxproj += ' <OptimizeReferences>true</OptimizeReferences>' + "`r`n"
|
|
||||||
$exeVcxproj += ' <GenerateDebugInformation>true</GenerateDebugInformation>' + "`r`n"
|
|
||||||
$exeVcxproj += ' <AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;lib\x86\pthreadVC2.lib;%(AdditionalDependencies)</AdditionalDependencies>' + "`r`n"
|
|
||||||
$exeVcxproj += ' </Link>' + "`r`n"
|
|
||||||
$exeVcxproj += ' </ItemDefinitionGroup>' + "`r`n"
|
|
||||||
$exeVcxproj += ' <ItemGroup>' + "`r`n"
|
|
||||||
$exeVcxproj += ' <ClCompile Include="src\base\main\main.c" />' + "`r`n"
|
|
||||||
$exeVcxproj += ' </ItemGroup>' + "`r`n"
|
|
||||||
$exeVcxproj += ' <ItemGroup>' + "`r`n"
|
|
||||||
$exeVcxproj += ' <ProjectReference Include="abclib.vcxproj">' + "`r`n"
|
|
||||||
$exeVcxproj += ' <Project>{6B6D7E0F-1234-4567-89AB-CDEF01234567}</Project>' + "`r`n"
|
|
||||||
$exeVcxproj += ' </ProjectReference>' + "`r`n"
|
|
||||||
$exeVcxproj += ' </ItemGroup>' + "`r`n"
|
|
||||||
$exeVcxproj += ' <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />' + "`r`n"
|
|
||||||
$exeVcxproj += '</Project>' + "`r`n"
|
|
||||||
Set-Content "abcexe.vcxproj" $exeVcxproj -NoNewline
|
|
||||||
|
|
||||||
Write-Host "Project files generated successfully"
|
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
|
|
@ -216,4 +75,4 @@ jobs:
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: package-windows
|
name: package-windows
|
||||||
path: staging/
|
path: staging/
|
||||||
|
|
@ -37,7 +37,7 @@ abcext.dsp
|
||||||
|
|
||||||
abcexe.vcproj*
|
abcexe.vcproj*
|
||||||
abclib.vcproj*
|
abclib.vcproj*
|
||||||
abcspace.sln
|
/abcspace.sln
|
||||||
abcspace.suo
|
abcspace.suo
|
||||||
|
|
||||||
*.pyc
|
*.pyc
|
||||||
|
|
@ -62,4 +62,4 @@ tags
|
||||||
|
|
||||||
/cmake
|
/cmake
|
||||||
/cscope
|
/cscope
|
||||||
abc.history
|
abc.history
|
||||||
Loading…
Reference in New Issue