From e4a1f135fbb309b18d85b418d1963b676eeb3800 Mon Sep 17 00:00:00 2001 From: Brandon Dyck Date: Mon, 22 Apr 2024 09:47:00 -0600 Subject: [PATCH] Add readme, license, and build script --- .gitignore | 1 + LICENSE.txt | 16 ++++++++++++++++ README.txt | 18 ++++++++++++++++++ build.ps1 | 29 +++++++++++++++++++++++++++++ 4 files changed, 64 insertions(+) create mode 100644 .gitignore create mode 100644 LICENSE.txt create mode 100644 README.txt create mode 100644 build.ps1 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..fcb6a2f --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +build diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 0000000..2294c81 --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1,16 @@ +MIT No Attribution + +Copyright © 2024 Brandon Dyck + +Permission is hereby granted, free of charge, to any person obtaining a copy of this +software and associated documentation files (the "Software"), to deal in the Software +without restriction, including without limitation the rights to use, copy, modify, +merge, publish, distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/README.txt b/README.txt new file mode 100644 index 0000000..862d825 --- /dev/null +++ b/README.txt @@ -0,0 +1,18 @@ +clocktoy +========== + +A toy analog clock for my kids to learn to set and read clocks. + +Developed on LÖVE v11.4 (https://love2d.org/), but may work on +earlier versions. + +LICENSE +--------- + +Copyright © 2024 Brandon Dyck +This work is free. You can redistribute it and/or modify it under +the terms of the MIT No Attribution License. See LICENSE.txt for +more details. + +The clock face font, Josefin Sans Regular, is used by permission +of The Josefin Sans Project Authors. See font/OFL.txt for details. diff --git a/build.ps1 b/build.ps1 new file mode 100644 index 0000000..d16448f --- /dev/null +++ b/build.ps1 @@ -0,0 +1,29 @@ +$date = Get-Date -Format 'yyyy-MM-dd' +$name = 'clocktoy-'+$date +$lovefile = "build\$($name).love" +$namewin = $name+'-win32' +$zipdir = 'build\'+$namewin +$zipfile = $zipdir+'.zip' +$exefile = "$($zipdir)\$($namewin).exe" +$loveversion = "11.4" +$lovename = "love-$($loveversion)-win32" +$loveurl = "https://github.com/love2d/love/releases/download/$($loveversion)/$($lovename).zip" +$lovezip = "build\$($lovename).zip" + +if (Test-Path "build") { + Remove-Item "build" -Recurse +} + +New-Item -Path "." -Name "build" -ItemType "directory" +Compress-Archive -Path "*.lua", "*.txt", "font" -DestinationPath $lovefile + +Invoke-WebRequest $loveurl -OutFile $lovezip +(New-Object System.Net.WebClient).DownloadFile($loveurl, $lovezip) + + +Expand-Archive -Path $lovezip -DestinationPath "build" +New-Item -Path "build" -Name $namewin -ItemType "directory" +Get-Content "build\$($lovename)\love.exe", $lovefile -AsByteStream | Set-Content $exefile -AsByteStream + +Copy-Item -Path "build\$($lovename)\*.dll", "build\$($lovename)\license.txt" -Destination $zipdir +Compress-Archive -Path $zipdir -Destination $zipfile