Skip to content

Commit

Permalink
Add azure-pipelines.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
nathan818fr committed Oct 8, 2020
1 parent c578fb0 commit dabdb8e
Show file tree
Hide file tree
Showing 3 changed files with 80 additions and 6 deletions.
5 changes: 0 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,6 @@ endif ()
## Plog
include_directories(lib/plog_v1.1.5/include/)

## WinSDK
if (TBM_WIN32)
find_library(WINDOWSSDK REQUIRED)
endif ()

## Nowide
if (TBM_WIN32)
include_directories(lib/nowide_standalone_v11.0.0/include/)
Expand Down
79 changes: 79 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
trigger:
branches:
include:
- master
- refs/tags/v*

jobs:
- job: build_windows
displayName: Build Windows
pool:
vmImage: 'vs2017-win2016'
strategy:
matrix:
x64 Release:
TBM_BuildType: Release
TBM_CMakeArgs: '-G"Visual Studio 15 2017 Win64"'
TBM_ExecutablePath: 'build\Release\Among_Us_Taskbar_Mask.exe'
TBM_ArtifactClassifier: 'win-x64'
x86 Release:
TBM_BuildType: Release
TBM_CMakeArgs: '-G"Visual Studio 15 2017"'
TBM_ExecutablePath: 'build\Release\Among_Us_Taskbar_Mask.exe'
TBM_ArtifactClassifier: 'win-x86'
steps:
- task: CMake@1
inputs:
cmakeArgs: '.. $(TBM_CMakeArgs) -DCMAKE_BUILD_TYPE=$(TBM_BuildType)'
- task: MSBuild@1
inputs:
solution: 'build/TBM.sln'
msbuildArguments: '/m /p:Configuration=$(TBM_BuildType)'
- task: CmdLine@2
inputs:
script: 'copy /B "$(TBM_ExecutablePath)" "$(Build.ArtifactStagingDirectory)\among-us-taskbar-mask-$(TBM_ArtifactClassifier).exe"'
- task: PublishPipelineArtifact@1
inputs:
targetPath: '$(Build.ArtifactStagingDirectory)'
artifact: 'Standalone Executable @ $(TBM_ArtifactClassifier)'
publishLocation: 'pipeline'
- job: release
displayName: Release
condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/v'))
dependsOn:
- build_windows
pool:
vmImage: 'ubuntu-18.04'
variables:
TBM_ReleaseDirectory: '$(Pipeline.Workspace)/releases'
steps:
- task: Bash@3
inputs:
targetType: 'inline'
script: "mkdir '$(TBM_ReleaseDirectory)'"
- task: DownloadPipelineArtifact@2
inputs:
buildType: 'current'
artifactName: 'Standalone Executable @ win-x64'
targetPath: '$(TBM_ReleaseDirectory)'
- task: DownloadPipelineArtifact@2
inputs:
buildType: 'current'
artifactName: 'Standalone Executable @ win-x86'
targetPath: '$(TBM_ReleaseDirectory)'
- task: Bash@3
inputs:
targetType: 'inline'
script: "cd '$(TBM_ReleaseDirectory)' && ls"
- task: GitHubRelease@1
inputs:
gitHubConnection: github.com_nathan818fr
repositoryName: '$(Build.Repository.Name)'
action: 'create'
target: '$(Build.SourceVersion)'
tagSource: 'gitTag'
isDraft: true
changeLogCompareToRelease: 'lastFullRelease'
changeLogType: 'commitBased'
assets: |
$(TBM_ReleaseDirectory)/*
2 changes: 1 addition & 1 deletion src/tbm/platform/win32/main_window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ MainWindow::MainWindow(const std::string &title, bool taskbar) : p_(std::make_un
p_->winClass_ = L"TbmMainWindowClass";
WNDCLASS wc;
wc.style = 0;
wc.lpfnWndProc = &MainWindowPrivate::globalWindowProc;
wc.lpfnWndProc = reinterpret_cast<WNDPROC>(&MainWindowPrivate::globalWindowProc);
wc.cbClsExtra = 0;
wc.cbWndExtra = 0;
wc.hInstance = GetModuleHandle(nullptr);
Expand Down

0 comments on commit dabdb8e

Please sign in to comment.