Skip to content

Commit

Permalink
build: refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
MiroKaku committed Jan 25, 2024
1 parent 542abee commit 17f5195
Show file tree
Hide file tree
Showing 35 changed files with 537 additions and 752 deletions.
45 changes: 45 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
root = true

[*]
charset = utf-8
end_of_line = crlf

[*.md]
insert_final_newline = true

[*.{c,c++,cc,cpp,cxx,h,h++,hh,hpp,hxx,idl,inl,ipp,tlh,tli}]
indent_style = space
indent_size = 4
insert_final_newline = true
trim_trailing_whitespace = true
vc_generate_documentation_comments = doxygen_slash_star

[*.{cs,csx,vb,vbx}]
indent_style = space
indent_size = 4
insert_final_newline = true
trim_trailing_whitespace = true

[*.{js,json,xml,toml,xaml}]
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true

[*.rc]
charset = utf-16le

[Mile.Project.Properties.Template.h]
charset = utf-16le

[Mile.Project.Properties.h]
charset = utf-16le

[*.bat]
charset = utf-8
insert_final_newline = true

[*.sh]
charset = utf-8
end_of_line = lf
insert_final_newline = true
11 changes: 0 additions & 11 deletions .github/workflows/build.bat

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ on:
jobs:
analyze:
name: Analyze
runs-on: windows-2019
runs-on: Windows-2022
permissions:
actions: read
contents: read
Expand Down Expand Up @@ -58,7 +58,7 @@ jobs:

- name: Build
shell: cmd
run: call .\.github\workflows\build.bat
run: call .\BuildAllTargets.cmd

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand Down
69 changes: 65 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,23 @@
##
## PROJECT: Mouri Internal Library Essentials
## FILE: .gitignore
## PURPOSE: The root .gitignore file for Visual Studio C++ Project
##
## LICENSE: The MIT License
##
## MAINTAINER: MouriNaruto (Kenji.Mouri@outlook.com)
##

##
## Ignore Mile.Project specific temporary files, build results,
## and files generated by popular Visual Studio add-ons.
##
Output/

##
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore

# User-specific files
*.rsuser
Expand All @@ -23,6 +39,7 @@ mono_crash.*
[Rr]eleases/
x64/
x86/
[Ww][Ii][Nn]32/
[Aa][Rr][Mm]/
[Aa][Rr][Mm]64/
bld/
Expand All @@ -33,9 +50,6 @@ bld/

# Visual Studio 2015/2017 cache/options directory
.vs/
.xmake/
vsxmake*/
vs20*/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/

Expand Down Expand Up @@ -64,6 +78,9 @@ project.lock.json
project.fragment.lock.json
artifacts/

# ASP.NET Scaffolding
ScaffoldingReadMe.txt

# StyleCop
StyleCopReport.xml

Expand All @@ -89,6 +106,7 @@ StyleCopReport.xml
*.tmp_proj
*_wpftmp.csproj
*.log
*.tlog
*.vspscc
*.vssscc
.builds
Expand Down Expand Up @@ -140,6 +158,11 @@ _TeamCity*
.axoCover/*
!.axoCover/settings.json

# Coverlet is a free, cross platform Code Coverage Tool
coverage*.json
coverage*.xml
coverage*.info

# Visual Studio code coverage results
*.coverage
*.coveragexml
Expand Down Expand Up @@ -287,6 +310,17 @@ node_modules/
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
*.vbw

# Visual Studio 6 auto-generated project file (contains which files were open etc.)
*.vbp

# Visual Studio 6 workspace and project file (working project files containing files to include in project)
*.dsw
*.dsp

# Visual Studio 6 technical files
*.ncb
*.aps

# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
Expand Down Expand Up @@ -343,6 +377,9 @@ ASALocalRun/
# Local History for Visual Studio
.localhistory/

# Visual Studio History (VSHistory) files
.vshistory/

# BeatPulse healthcheck temp database
healthchecksdb

Expand All @@ -351,3 +388,27 @@ MigrationBackup/

# Ionide (cross platform F# VS Code tools) working folder
.ionide/

# Fody - auto-generated XML schema
FodyWeavers.xsd

# VS Code files for those working on multiple tools
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
*.code-workspace

# Local History for Visual Studio Code
.history/

# Windows Installer files from build outputs
*.cab
*.msi
*.msix
*.msm
*.msp

# JetBrains Rider
*.sln.iml
5 changes: 4 additions & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[submodule "veil"]
path = veil
path = Veil
url = https://github.com/MiroKaku/Veil.git
[submodule "Mile.Project.Windows"]
path = Mile.Project.Windows
url = https://github.com/ProjectMile/Mile.Project.Windows.git
16 changes: 16 additions & 0 deletions BuildAllTargets.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
@setlocal
@echo off

rem Change to the current folder.
cd "%~dp0"

rem Remove the output folder for a fresh compile.
rd /s /q Output

rem Initialize Visual Studio environment
call "%~dp0Mile.Project.Windows\InitializeVisualStudioEnvironment.cmd"

rem Build all targets
MSBuild -binaryLogger:Output\BuildAllTargets.binlog -m BuildAllTargets.proj

@endlocal
71 changes: 71 additions & 0 deletions BuildAllTargets.proj
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
<?xml version="1.0" encoding="utf-8"?>
<Project
DefaultTargets="Restore;Build"
xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<SolutionPath>$(MSBuildThisFileDirectory)*.sln</SolutionPath>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="$(SolutionPath)">
<AdditionalProperties>Configuration=Debug;Platform=x86</AdditionalProperties>
</ProjectReference>
<ProjectReference Include="$(SolutionPath)">
<AdditionalProperties>Configuration=Release;Platform=x86</AdditionalProperties>
</ProjectReference>
<ProjectReference Include="$(SolutionPath)">
<AdditionalProperties>Configuration=Debug;Platform=x64</AdditionalProperties>
</ProjectReference>
<ProjectReference Include="$(SolutionPath)">
<AdditionalProperties>Configuration=Release;Platform=x64</AdditionalProperties>
</ProjectReference>
<ProjectReference Include="$(SolutionPath)">
<AdditionalProperties>Configuration=Debug;Platform=ARM64</AdditionalProperties>
</ProjectReference>
<ProjectReference Include="$(SolutionPath)">
<AdditionalProperties>Configuration=Release;Platform=ARM64</AdditionalProperties>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<!-- <PackagingProjectReference Include="$(MSBuildThisFileDirectory)Mile.Project.Windows\Mile.Project.NuGetPackaging.proj">
<AdditionalProperties>NuspecFile=$(MSBuildThisFileDirectory)SampleProject\SampleProject.nuspec</AdditionalProperties>
</PackagingProjectReference> -->
</ItemGroup>
<Target Name="Restore" >
<MSBuild
Projects="@(ProjectReference)"
Targets="Restore"
StopOnFirstFailure="True"
Properties="PreferredToolArchitecture=x64" />
<MSBuild
Projects="@(PackagingProjectReference)"
Targets="Restore"
StopOnFirstFailure="True"
Properties="PreferredToolArchitecture=x64" />
</Target>
<Target Name="Build" >
<MSBuild
Projects="@(ProjectReference)"
Targets="Build"
BuildInParallel="True"
StopOnFirstFailure="True"
Properties="PreferredToolArchitecture=x64" />
<MSBuild
Projects="@(PackagingProjectReference)"
Targets="Build"
StopOnFirstFailure="True"
Properties="PreferredToolArchitecture=x64" />
</Target>
<Target Name="Rebuild" >
<MSBuild
Projects="@(ProjectReference)"
Targets="Rebuild"
BuildInParallel="True"
StopOnFirstFailure="True"
Properties="PreferredToolArchitecture=x64" />
<MSBuild
Projects="@(PackagingProjectReference)"
Targets="Rebuild"
StopOnFirstFailure="True"
Properties="PreferredToolArchitecture=x64" />
</Target>
</Project>
7 changes: 7 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<Import Project="$(MSBuildThisFileDirectory)Mile.Project.Windows\Mile.Project.Build.props" />
<PropertyGroup>
<ForceImportBeforeCppProps>$(MSBuildThisFileDirectory)libwsk.Project.props</ForceImportBeforeCppProps>
</PropertyGroup>
</Project>
1 change: 1 addition & 0 deletions Mile.Project.Windows
Submodule Mile.Project.Windows added at 910550
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions Veil
Submodule Veil added at f37068
8 changes: 8 additions & 0 deletions libwsk.Project.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemDefinitionGroup>
<ClCompile>
<AdditionalIncludeDirectories>$(MSBuildThisFileDirectory);$(MSBuildProjectDirectory);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
</ItemDefinitionGroup>
</Project>
70 changes: 70 additions & 0 deletions libwsk.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.8.34511.84
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ReadMe", "ReadMe", "{5093B2BD-739E-440B-A515-3286021E5390}"
ProjectSection(SolutionItems) = preProject
LICENSE = LICENSE
README.md = README.md
README.zh-CN.md = README.zh-CN.md
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libwsk", "libwsk\libwsk.vcxproj", "{66495811-336E-4693-B2EA-3EECBC17545E}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libwsk.test", "libwsk.test\libwsk.test.vcxproj", "{3E5181D1-702F-40D0-A8EB-E373C0A380E6}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|ARM64 = Debug|ARM64
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|ARM64 = Release|ARM64
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{66495811-336E-4693-B2EA-3EECBC17545E}.Debug|ARM64.ActiveCfg = Debug|ARM64
{66495811-336E-4693-B2EA-3EECBC17545E}.Debug|ARM64.Build.0 = Debug|ARM64
{66495811-336E-4693-B2EA-3EECBC17545E}.Debug|ARM64.Deploy.0 = Debug|ARM64
{66495811-336E-4693-B2EA-3EECBC17545E}.Debug|x64.ActiveCfg = Debug|x64
{66495811-336E-4693-B2EA-3EECBC17545E}.Debug|x64.Build.0 = Debug|x64
{66495811-336E-4693-B2EA-3EECBC17545E}.Debug|x64.Deploy.0 = Debug|x64
{66495811-336E-4693-B2EA-3EECBC17545E}.Debug|x86.ActiveCfg = Debug|Win32
{66495811-336E-4693-B2EA-3EECBC17545E}.Debug|x86.Build.0 = Debug|Win32
{66495811-336E-4693-B2EA-3EECBC17545E}.Debug|x86.Deploy.0 = Debug|Win32
{66495811-336E-4693-B2EA-3EECBC17545E}.Release|ARM64.ActiveCfg = Release|ARM64
{66495811-336E-4693-B2EA-3EECBC17545E}.Release|ARM64.Build.0 = Release|ARM64
{66495811-336E-4693-B2EA-3EECBC17545E}.Release|ARM64.Deploy.0 = Release|ARM64
{66495811-336E-4693-B2EA-3EECBC17545E}.Release|x64.ActiveCfg = Release|x64
{66495811-336E-4693-B2EA-3EECBC17545E}.Release|x64.Build.0 = Release|x64
{66495811-336E-4693-B2EA-3EECBC17545E}.Release|x64.Deploy.0 = Release|x64
{66495811-336E-4693-B2EA-3EECBC17545E}.Release|x86.ActiveCfg = Release|Win32
{66495811-336E-4693-B2EA-3EECBC17545E}.Release|x86.Build.0 = Release|Win32
{66495811-336E-4693-B2EA-3EECBC17545E}.Release|x86.Deploy.0 = Release|Win32
{3E5181D1-702F-40D0-A8EB-E373C0A380E6}.Debug|ARM64.ActiveCfg = Debug|ARM64
{3E5181D1-702F-40D0-A8EB-E373C0A380E6}.Debug|ARM64.Build.0 = Debug|ARM64
{3E5181D1-702F-40D0-A8EB-E373C0A380E6}.Debug|ARM64.Deploy.0 = Debug|ARM64
{3E5181D1-702F-40D0-A8EB-E373C0A380E6}.Debug|x64.ActiveCfg = Debug|x64
{3E5181D1-702F-40D0-A8EB-E373C0A380E6}.Debug|x64.Build.0 = Debug|x64
{3E5181D1-702F-40D0-A8EB-E373C0A380E6}.Debug|x64.Deploy.0 = Debug|x64
{3E5181D1-702F-40D0-A8EB-E373C0A380E6}.Debug|x86.ActiveCfg = Debug|Win32
{3E5181D1-702F-40D0-A8EB-E373C0A380E6}.Debug|x86.Build.0 = Debug|Win32
{3E5181D1-702F-40D0-A8EB-E373C0A380E6}.Debug|x86.Deploy.0 = Debug|Win32
{3E5181D1-702F-40D0-A8EB-E373C0A380E6}.Release|ARM64.ActiveCfg = Release|ARM64
{3E5181D1-702F-40D0-A8EB-E373C0A380E6}.Release|ARM64.Build.0 = Release|ARM64
{3E5181D1-702F-40D0-A8EB-E373C0A380E6}.Release|ARM64.Deploy.0 = Release|ARM64
{3E5181D1-702F-40D0-A8EB-E373C0A380E6}.Release|x64.ActiveCfg = Release|x64
{3E5181D1-702F-40D0-A8EB-E373C0A380E6}.Release|x64.Build.0 = Release|x64
{3E5181D1-702F-40D0-A8EB-E373C0A380E6}.Release|x64.Deploy.0 = Release|x64
{3E5181D1-702F-40D0-A8EB-E373C0A380E6}.Release|x86.ActiveCfg = Release|Win32
{3E5181D1-702F-40D0-A8EB-E373C0A380E6}.Release|x86.Build.0 = Release|Win32
{3E5181D1-702F-40D0-A8EB-E373C0A380E6}.Release|x86.Deploy.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {66455BED-BAB4-464D-B228-93A80B777B96}
EndGlobalSection
EndGlobal
Loading

0 comments on commit 17f5195

Please sign in to comment.