From 824dbf362bd2bba48da398ef4c0ec05e386d5e6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eke=20P=C3=A9ter?= Date: Sat, 9 Feb 2019 01:04:29 +0200 Subject: [PATCH] Solution refactor, added publish script! --- README.md | 2 +- publish.ps1 | 51 ++++++++++++++++++ archeoptical.sln => vulkan.sln | 11 +++- .../archeoptical.cpp => vulkan/Main.cpp | Bin 65302 -> 65304 bytes {archeoptical => vulkan}/Vulkan.cpp | 0 {archeoptical => vulkan}/Vulkan.hpp | 0 {archeoptical => vulkan}/Window.cpp | 0 {archeoptical => vulkan}/Window.hpp | 0 {archeoptical => vulkan}/stdafx.cpp | Bin {archeoptical => vulkan}/stdafx.h | Bin {archeoptical => vulkan}/targetver.h | Bin .../vulkan.vcxproj | 2 +- .../vulkan.vcxproj.filters | 6 +-- 13 files changed, 66 insertions(+), 6 deletions(-) create mode 100644 publish.ps1 rename archeoptical.sln => vulkan.sln (86%) rename archeoptical/archeoptical.cpp => vulkan/Main.cpp (99%) rename {archeoptical => vulkan}/Vulkan.cpp (100%) rename {archeoptical => vulkan}/Vulkan.hpp (100%) rename {archeoptical => vulkan}/Window.cpp (100%) rename {archeoptical => vulkan}/Window.hpp (100%) rename {archeoptical => vulkan}/stdafx.cpp (100%) rename {archeoptical => vulkan}/stdafx.h (100%) rename {archeoptical => vulkan}/targetver.h (100%) rename archeoptical/archeoptical.vcxproj => vulkan/vulkan.vcxproj (99%) rename archeoptical/archeoptical.vcxproj.filters => vulkan/vulkan.vcxproj.filters (97%) diff --git a/README.md b/README.md index c4623b2..86eb410 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ -# archeoptical +# vulkan This project was mainly started for learning vulkan. I went with a RAII method of handling resources. diff --git a/publish.ps1 b/publish.ps1 new file mode 100644 index 0000000..622fde0 --- /dev/null +++ b/publish.ps1 @@ -0,0 +1,51 @@ + +if (-Not(Test-Path -Path ".\Release\*.exe")) +{ + Write-Error "You should first build the project with release configuration" + exit 1 +} + +$OutDir = ".\publish\" +$OutBin = ".\publish\.bin" +if (Test-Path -Path $OutDir) +{ + Remove-Item $OutDir -Recurse -Force +} + +New-Item -Path $OutDir -ItemType Directory + +# gather data folders +Copy-Item -Path ".\data\*" -Destination $OutDir -Recurse +$DataFolders = Get-ChildItem -Path $OutDir + + +# gather binaries +New-Item -Path $OutBin -ItemType Directory +Copy-Item -Path ".\Release\*.exe" -Destination $OutBin +Copy-Item -Path ".\submodule\simple-audio\bass24\*.dll" -Destination $OutBin + +# build and publish each data folder +for ($i=0; $i -lt $DataFolders.Count; $i++) { + $OriginalDir = $PWD + $DataFolderItem = $DataFolders[$i]; + $ExeName = $DataFolderItem.Name + ".exe"; + Write-Output "$ExeName" + $DataFolder = $DataFolderItem.FullName + Set-Location $DataFolder + $BuildScript = ".\build.bat"; + if (Test-Path -Path $BuildScript) + { + cmd.exe /c $BuildScript + Remove-Item $BuildScript + Remove-Item "*.frag" + Remove-Item "*.vert" + } + Out-File -FilePath ".\fullscreen.bat" -InputObject "$ExeName fullscreen" -Encoding "ASCII" + Out-File -FilePath ".\fullscreen-1280x720.bat" -InputObject "$ExeName fullscreen 1280 720" -Encoding "ASCII" + Out-File -FilePath ".\fullscreen-1920x1080.bat" -InputObject "$ExeName fullscreen 1920 1080" -Encoding "ASCII" + Out-File -FilePath ".\fullscreen-borderless.bat" -InputObject "$ExeName borderless" -Encoding "ASCII" + Set-Location $OriginalDir; + Copy-Item -Path "$OutBin\*" -Destination "$DataFolder\" + Rename-Item "$DataFolder\vulkan.exe" $ExeName + Compress-Archive -Path "$DataFolder\" -DestinationPath "$DataFolder.zip" -CompressionLevel Optimal +} \ No newline at end of file diff --git a/archeoptical.sln b/vulkan.sln similarity index 86% rename from archeoptical.sln rename to vulkan.sln index 6f38fd5..14bda84 100644 --- a/archeoptical.sln +++ b/vulkan.sln @@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 VisualStudioVersion = 15.0.27703.2035 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "archeoptical", "archeoptical\archeoptical.vcxproj", "{07C00A4E-7F37-4A27-985E-24FA085A4868}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vulkan", "vulkan\vulkan.vcxproj", "{07C00A4E-7F37-4A27-985E-24FA085A4868}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AppServiceSandwich", "submodule\app-service-sandwich\AppServiceSandwich\AppServiceSandwich.vcxproj", "{00E14769-860E-4F44-9B7D-2733FF5ADE62}" EndProject @@ -11,6 +11,15 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "submodule", "submodule", "{ EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "audio", "submodule\simple-audio\audio.vcxproj", "{EB5288BC-36D6-4877-B669-2DA14AD510E2}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "solution", "solution", "{F6E01F60-1496-4C60-B725-8DB4233FDE7F}" + ProjectSection(SolutionItems) = preProject + .gitattributes = .gitattributes + .gitignore = .gitignore + .gitmodules = .gitmodules + publish.ps1 = publish.ps1 + README.md = README.md + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|x64 = Debug|x64 diff --git a/archeoptical/archeoptical.cpp b/vulkan/Main.cpp similarity index 99% rename from archeoptical/archeoptical.cpp rename to vulkan/Main.cpp index 8d345f57db5c1c4c7bf84c0e518cd30a6d683fc5..7c28e19e4183d29ed9c394dd3003c3f045b22bfb 100644 GIT binary patch delta 21 dcmbRCk9o#F<_*uhCU-p%nyll^waHs-3jle23I6~9 delta 26 icmbR7k9pcZ<_*uhCPzFKnEWb^YjRDz)Mgp)Kbrx#Sq&!u diff --git a/archeoptical/Vulkan.cpp b/vulkan/Vulkan.cpp similarity index 100% rename from archeoptical/Vulkan.cpp rename to vulkan/Vulkan.cpp diff --git a/archeoptical/Vulkan.hpp b/vulkan/Vulkan.hpp similarity index 100% rename from archeoptical/Vulkan.hpp rename to vulkan/Vulkan.hpp diff --git a/archeoptical/Window.cpp b/vulkan/Window.cpp similarity index 100% rename from archeoptical/Window.cpp rename to vulkan/Window.cpp diff --git a/archeoptical/Window.hpp b/vulkan/Window.hpp similarity index 100% rename from archeoptical/Window.hpp rename to vulkan/Window.hpp diff --git a/archeoptical/stdafx.cpp b/vulkan/stdafx.cpp similarity index 100% rename from archeoptical/stdafx.cpp rename to vulkan/stdafx.cpp diff --git a/archeoptical/stdafx.h b/vulkan/stdafx.h similarity index 100% rename from archeoptical/stdafx.h rename to vulkan/stdafx.h diff --git a/archeoptical/targetver.h b/vulkan/targetver.h similarity index 100% rename from archeoptical/targetver.h rename to vulkan/targetver.h diff --git a/archeoptical/archeoptical.vcxproj b/vulkan/vulkan.vcxproj similarity index 99% rename from archeoptical/archeoptical.vcxproj rename to vulkan/vulkan.vcxproj index 57f9833..eb73227 100644 --- a/archeoptical/archeoptical.vcxproj +++ b/vulkan/vulkan.vcxproj @@ -169,7 +169,7 @@ - + Create Create diff --git a/archeoptical/archeoptical.vcxproj.filters b/vulkan/vulkan.vcxproj.filters similarity index 97% rename from archeoptical/archeoptical.vcxproj.filters rename to vulkan/vulkan.vcxproj.filters index 92270d5..9183fca 100644 --- a/archeoptical/archeoptical.vcxproj.filters +++ b/vulkan/vulkan.vcxproj.filters @@ -32,14 +32,14 @@ Source Files - - Source Files - Source Files Source Files + + Source Files + \ No newline at end of file