Add license information for TurboWarp and Scratch to nw.js credits.html

This commit is contained in:
Thomas Weber committed 2021-07-03 16:52:41 -05:00
1 parent 64a4d46dff
commit 83251c7fd4
1 file changed
+54
+54
View File
@@ -69,6 +69,56 @@ const COPYRIGHT_HEADER = `/*!
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/\n`;
const APPEND_TO_CREDITS_HTML = `
<div class="product">
<span class="title">The following entries were added by the TurboWarp Packager</span>
</div>
<div class="product">
<span class="title">Scratch</span>
<span class="homepage"><a href="https://scratch.mit.edu/">homepage</a></span>
<input type="checkbox" hidden id="p4-scratch">
<label class="show" for="p4-scratch" tabindex="0"></label>
<div class="licence">
<pre>Copyright (c) 2016, Massachusetts Institute of Technology
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</pre>
</div>
</div>
<div class="product">
<span class="title">TurboWarp</span>
<span class="homepage"><a href="https://github.com/TurboWarp/scratch-vm/">homepage</a></span>
<input type="checkbox" hidden id="p4-tw-scratch-vm">
<label class="show" for="p4-tw-scratch-vm" tabindex="0"></label>
<div class="licence">
<pre>Copyright (C) 2021 Thomas Weber
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License version 3
as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see &lt;https://www.gnu.org/licenses/&gt;.
</pre>
</div>
</div>`;
class Packager extends EventTarget {
constructor () {
super();
@@ -235,6 +285,10 @@ cd "$(dirname "$0")"
nw.App.on('open', start);
start();`);
const creditsHtmlPath = `${packageName}/credits.html`;
const creditsHtml = await zip.file(creditsHtmlPath).async('string');
zip.file(creditsHtmlPath, creditsHtml + APPEND_TO_CREDITS_HTML);
return zip;
}