From 43ef12c897949761b507a7c8c712ab0ce5901e96 Mon Sep 17 00:00:00 2001 From: Viktor Kovacs Date: Sat, 5 Jun 2021 12:52:53 +0200 Subject: [PATCH] Store licenses in the package. --- libs/{jquery.license.txt => jquery.license.md} | 0 libs/{rhino3dm.license.txt => rhino3dm.license.md} | 0 libs/{three.license.txt => three.license.md} | 0 tools/create_package.py | 6 ++++-- 4 files changed, 4 insertions(+), 2 deletions(-) rename libs/{jquery.license.txt => jquery.license.md} (100%) rename libs/{rhino3dm.license.txt => rhino3dm.license.md} (100%) rename libs/{three.license.txt => three.license.md} (100%) diff --git a/libs/jquery.license.txt b/libs/jquery.license.md similarity index 100% rename from libs/jquery.license.txt rename to libs/jquery.license.md diff --git a/libs/rhino3dm.license.txt b/libs/rhino3dm.license.md similarity index 100% rename from libs/rhino3dm.license.txt rename to libs/rhino3dm.license.md diff --git a/libs/three.license.txt b/libs/three.license.md similarity index 100% rename from libs/three.license.txt rename to libs/three.license.md diff --git a/tools/create_package.py b/tools/create_package.py index af9853a..32e4e2c 100644 --- a/tools/create_package.py +++ b/tools/create_package.py @@ -85,14 +85,16 @@ def CreateDestinationDir (config, rootDir, websiteDir, version, testBuild): replacer.ReplaceTokenContent ('', '', scriptContent) replacer.WriteToFile (htmlFilePath) -def CreatePackage (websiteDir, packageDir, version): +def CreatePackage (rootDir, websiteDir, packageDir, version): if not os.path.exists (packageDir): os.makedirs (packageDir) zipPath = os.path.join (packageDir, 'o3dv_' + version + '.zip') zip = zipfile.ZipFile (zipPath, mode = 'w', compression = zipfile.ZIP_DEFLATED) zip.write (os.path.join (websiteDir, 'libs', 'three.min-129.js'), 'three.min-129.js') + zip.write (os.path.join (websiteDir, 'libs', 'three.license.md'), 'three.license.md') zip.write (os.path.join (websiteDir, 'o3dv', 'o3dv.min.js'), 'o3dv.min-' + version + '.js') + zip.write (os.path.join (rootDir, 'LICENSE.md'), 'o3dv.license.md') zip.close () return True @@ -147,7 +149,7 @@ def Main (argv): return 1 PrintInfo ('Create package.') - packageResult = CreatePackage (websiteDir, packageDir, version) + packageResult = CreatePackage (rootDir, websiteDir, packageDir, version) if not packageResult: PrintError ('Create package failed.') return 1