diff options
Diffstat (limited to 'lib/WinRpMalloc')
-rw-r--r-- | lib/WinRpMalloc/Taskfile.yaml | 73 | ||||
-rw-r--r-- | lib/WinRpMalloc/src/package.json | 14 |
2 files changed, 80 insertions, 7 deletions
diff --git a/lib/WinRpMalloc/Taskfile.yaml b/lib/WinRpMalloc/Taskfile.yaml new file mode 100644 index 0000000..90a0898 --- /dev/null +++ b/lib/WinRpMalloc/Taskfile.yaml @@ -0,0 +1,73 @@ +# https://taskfile.dev + +#Called by the vnbuild system to produce builds for my website +#https://www.vaughnnugent.com/resources/software + +#This taskfile is called in this directory and is specific to the WinRpMalloc project +#that handles the MSBuild outside of the solution file + +version: '3' + +vars: + RPMALLOC_LICENSE: 'https://raw.githubusercontent.com/mjansson/rpmalloc/develop/LICENSE' + INT_DIR: '{{.SCRATCH_DIR}}/obj/{{.MODULE_NAME}}/' + MS_ARGS: '/p:Platform=x64 /p:RunAnalyzersDuringBuild=false /p:IntermediateOutputPath="{{.INT_DIR}}" /p:UseCommonOutputDirectory=true /p:BuildInParallel=true /p:MultiProcessorCompilation=true' + +tasks: + + build: + #build from the src directory + dir: '{{.USER_WORKING_DIR}}/src' + cmds: + #build in debug mode + - msbuild /p:Configuration=debug {{.BUILD_FLAGS}} {{.MS_ARGS}} + #build in release + - msbuild /p:Configuration=release {{.BUILD_FLAGS}} {{.MS_ARGS}} + + postbuild_success: + vars: + TARGET: '{{.USER_WORKING_DIR}}/bin' + + cmds: + #create the target directory + - powershell -Command "New-Item -Type Directory -Force -Path '{{.TARGET}}'" + + #remove uncessary files from outputs + - powershell -Command "Get-ChildItem -Recurse './src/x64/*' -Include *.log,*.recipe,*.CopyComplete,*.json,*.FileListAbsolute.txt | Remove-Item" + - powershell -Command "Get-ChildItem '*.tlog' -Recurse * | Remove-Item" + + #run debug and release post + - task: postbuild + vars: { BUILD_MODE: debug } + + - task: postbuild + vars: { BUILD_MODE: release } + + #tar input and output + - cd ./src/x64/debug && tar -czf "{{.TARGET}}/debug.tgz" . + + #capture only dll, license, + readme files on release + - cd ./src/x64/release && tar --include='*.dll' --include='license.txt' --include='readme.md' --include='rpmalloc_license.txt' -czf "{{.TARGET}}/release.tgz" * + + + postbuild: + vars: + TARGET: './src/x64/{{.BUILD_MODE}}' + + cmds: + #add rpmalloc license to binary output + - powershell -Command "Invoke-WebRequest '{{.RPMALLOC_LICENSE}}' -Outfile '{{.TARGET}}/rpmalloc_license.txt'" + + #add my license file + - powershell -Command "Copy-Item -Path ./LICENSE.txt -Destination '{{.TARGET}}/license.txt'" + + #add readme file + - powershell -Command "Copy-Item -Path ./build.readme.md -Destination '{{.TARGET}}/readme.md'" + + + clean: + cmds: + - cmd: powershell -Command "Remove-Item -Recurse './src/x64' -ErrorAction SilentlyContinue" + ignore_error: true + - cmd: powershell -Command "Remove-Item -Recurse './src/bin' -ErrorAction SilentlyContinue" + ignore_error: true
\ No newline at end of file diff --git a/lib/WinRpMalloc/src/package.json b/lib/WinRpMalloc/src/package.json index 7ee361e..6470e01 100644 --- a/lib/WinRpMalloc/src/package.json +++ b/lib/WinRpMalloc/src/package.json @@ -1,9 +1,9 @@ { - "Description": "A project to maintain an x64 Windows dll for RpMalloc by Mattias Jansson with some basic defaults for .NET loading. The debug output contains the debug MVCR libs and debug symbols.", - "Authors": "Vaughn Nugent", - "Copyright": "Copyright © 2023 Vaughn Nugent", - "Version": "0.1.2", - "Company": "Vaughn Nugent", - "Product": "WinRpMalloc", - "RepositoryUrl": "https://github.com/VnUgE/VNLib.Core/tree/main/lib/WinRpMalloc" + "name": "WinRpMalloc", + "version": "0.1.2", + "author": "Vaughn Nugent", + "description": "A project to maintain an x64 Windows dll for RpMalloc by Mattias Jansson with some basic defaults for .NET loading. The debug output contains the debug MVCR libs and debug symbols.", + "copyright": "Copyright \u00A9 2023 Vaughn Nugent", + "company": "Vaughn Nugent", + "repository": "https://github.com/VnUgE/VNLib.Core/tree/main/lib/WinRpMalloc" }
\ No newline at end of file |