Skip to content

Commit

Permalink
Solution refactor, added publish script!
Browse files Browse the repository at this point in the history
  • Loading branch information
peterekepeter committed Feb 8, 2019
1 parent 60ec18d commit 824dbf3
Show file tree
Hide file tree
Showing 13 changed files with 66 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

# archeoptical
# vulkan

This project was mainly started for learning vulkan.
I went with a RAII method of handling resources.
Expand Down
51 changes: 51 additions & 0 deletions publish.ps1
Original file line number Diff line number Diff line change
@@ -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
}
11 changes: 10 additions & 1 deletion archeoptical.sln → vulkan.sln
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,23 @@ 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
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "submodule", "submodule", "{A2CC86D3-670F-41B7-9B2C-4846B98EB696}"
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
Expand Down
Binary file renamed archeoptical/archeoptical.cpp → vulkan/Main.cpp
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@
<ClInclude Include="Window.hpp" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="archeoptical.cpp" />
<ClCompile Include="Main.cpp" />
<ClCompile Include="stdafx.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@
<ClCompile Include="stdafx.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="archeoptical.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Vulkan.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Window.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Main.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
</Project>

0 comments on commit 824dbf3

Please sign in to comment.