Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
105 changes: 105 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
name: OnMain

on:
push:
branches: [master]



permissions:
contents: read

concurrency:
group: "${{ github.ref }}-${{ github.workflow }}"
cancel-in-progress: true

jobs:

build-linux:
name: Linux Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
with:
submodules: true
- name: Build
run: |
mkdir -p bin/linux
make clean
make
- name: Archive
uses: actions/upload-artifact@v1
with:
name: Linux-binaries.zip
path: bin/linux
build-windows:
name: Windows Build
runs-on: windows-latest
steps:
- uses: actions/checkout@v1
with:
submodules: true
- name: Build
run: |
./build.ps1
- name: Archive x86
uses: actions/upload-artifact@v1
with:
name: Windows-x86-binaries.zip
path: bin/windows/x86/Release
- name: Archive x64
uses: actions/upload-artifact@v1
with:
name: Windows-x64-binaries.zip
path: bin/windows/x64/Release
version:
runs-on: ubuntu-latest
needs:
- build-linux
- build-windows
permissions:
contents: write
outputs:
newtag: ${{ steps.calculate-version.outputs.version-string }}
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
- name: calculate version
id: calculate-version
uses: bitshifted/git-auto-semver@v1
with:
main_branch: master
create_tag: true
tag_prefix: 'v'
- name: Use version
run: 'echo "Calculated version: ${{ steps.calculate-version.outputs.version-string }}"'

release:
runs-on: ubuntu-latest
permissions:
contents: write
needs: version
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-tags: true
- name: Download artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
pattern: *binaries.zip
merge-multiple: true
- name: Create a Release
uses: softprops/action-gh-release@v2
with:
name: ${{ needs.version.outputs.newtag }}
tag_name: ${{ needs.version.outputs.newtag }}
token: ${{ secrets.GITHUB_TOKEN }}
make_latest: true
files:
artifacts/*binaries.zip

3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -219,4 +219,5 @@ pip-log.txt
##############
.ntvs_analysis.dat

.vs
.vs
*.o
38 changes: 38 additions & 0 deletions build.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
[CmdletBinding()]
param(
[ValidateSet("x64", "x86")][String[]]$Platforms = @("x64", "x86"),
[ValidateSet("Debug", "Release")][String[]]$Flavors = @("Release"),
[Switch]$KeepPDB
)

$msbuildPath = & "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -latest -requires Microsoft.Component.MSBuild -find MSBuild\Current\Bin\amd64\MSBuild.exe | Select-Object -First 1
Set-Alias -name msbuild -Value $msbuildPath


$Platforms | ForEach-Object {
$platform = $_
$Flavors | ForEach-Object {
$config = $_
$outDir = ".\bin\windows\$platform\$config"
if (-not (Test-Path -PathType Container $outDir)) {
New-Item -Path $outDir -ItemType Directory -Force | Out-Null
}
$outDir = Resolve-Path $outDir
Write-Progress -Activity "Building" -Status ($platform + "," + $config)
msbuild -noLogo -m -verbosity:detailed -restore -target:Rebuild -property:Configuration=$config -property:Platform=$platform -property:OutDir=$outDir -clp:"ErrorsOnly;NoSummary" oless.sln
Write-Progress -Activity "Building" -Status ($platform + "," + $config) -Completed
if ($LASTEXITCODE) {
exit $LASTEXITCODE
} else {
Write-Host "Build Successful: $platform, $config"
}

}
}

if ($KeepPDB) {
Get-ChildItem -Path .\Bin -Recurse -Exclude @("*.exe", "*.pdb") -File | Remove-Item
} else {
#Clean up other artifacts
Get-ChildItem -Path .\Bin -Recurse -Exclude @("*.exe") -File | Remove-Item
}
2 changes: 1 addition & 1 deletion makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ SOURCE = \
oless/vbahelper.cpp \
oless/program.cpp

OBJECT = $(SOURCE:.c=.o)
OBJECT = $(SOURCE:.cpp=.o)

# Rules
all: $(EXECUTABLE)
Expand Down
12 changes: 6 additions & 6 deletions oless.sln
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,20 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Debug|x64 = Debug|x64
Release|Win32 = Release|Win32
Debug|x86 = Debug|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{FD435309-E24E-4A45-A30D-F5FADD0E73C7}.Debug|Win32.ActiveCfg = Debug|Win32
{FD435309-E24E-4A45-A30D-F5FADD0E73C7}.Debug|Win32.Build.0 = Debug|Win32
{FD435309-E24E-4A45-A30D-F5FADD0E73C7}.Debug|x64.ActiveCfg = Debug|x64
{FD435309-E24E-4A45-A30D-F5FADD0E73C7}.Debug|x64.Build.0 = Debug|x64
{FD435309-E24E-4A45-A30D-F5FADD0E73C7}.Release|Win32.ActiveCfg = Release|Win32
{FD435309-E24E-4A45-A30D-F5FADD0E73C7}.Release|Win32.Build.0 = Release|Win32
{FD435309-E24E-4A45-A30D-F5FADD0E73C7}.Debug|x86.ActiveCfg = Debug|Win32
{FD435309-E24E-4A45-A30D-F5FADD0E73C7}.Debug|x86.Build.0 = Debug|Win32
{FD435309-E24E-4A45-A30D-F5FADD0E73C7}.Release|x64.ActiveCfg = Release|x64
{FD435309-E24E-4A45-A30D-F5FADD0E73C7}.Release|x64.Build.0 = Release|x64
{FD435309-E24E-4A45-A30D-F5FADD0E73C7}.Release|x86.ActiveCfg = Release|Win32
{FD435309-E24E-4A45-A30D-F5FADD0E73C7}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
54 changes: 31 additions & 23 deletions oless/oless.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,28 +20,30 @@
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{FD435309-E24E-4A45-A30D-F5FADD0E73C7}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
<OutDir>$(SolutionDir)bin\windows\$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(SolutionDir)obj\windows\$(Platform)_$(Configuration)\</IntDir>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<UseOfAtl>Static</UseOfAtl>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<UseOfAtl>Static</UseOfAtl>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<UseOfAtl>Static</UseOfAtl>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
Expand All @@ -50,82 +52,88 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<Optimization>Disabled</Optimization>
<LanguageStandard>stdcpp20</LanguageStandard>
</ClCompile>
<Link>
<TargetMachine>MachineX86</TargetMachine>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<Optimization>Disabled</Optimization>
<LanguageStandard>stdcpp20</LanguageStandard>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<LanguageStandard>stdcpp20</LanguageStandard>
<EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
<WholeProgramOptimization>true</WholeProgramOptimization>
</ClCompile>
<Link>
<TargetMachine>MachineX86</TargetMachine>
<GenerateDebugInformation>true</GenerateDebugInformation>
<GenerateDebugInformation>false</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<LanguageStandard>stdcpp20</LanguageStandard>
<EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
<WholeProgramOptimization>true</WholeProgramOptimization>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<GenerateDebugInformation>false</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
Expand Down