From 380fd403d95ee7908e29b208c9c8587dc3e7a685 Mon Sep 17 00:00:00 2001 From: Ron Richardson Date: Tue, 29 Sep 2020 14:09:24 -0400 Subject: [PATCH] update to portable build config --- forge.config.js | 19 ++++++++++++++++++- package.json | 2 +- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/forge.config.js b/forge.config.js index a463f2f..5486315 100644 --- a/forge.config.js +++ b/forge.config.js @@ -17,6 +17,19 @@ function make_directory(dir) { } }; +function empty_directory(dir) { + if (!fs.existsSync(dir)){ + try { + let files = fs.readdirSync(dir); + for (var file in files) { + fs.unlinkSync(path.join(dir, file)); + } + } catch (err) { + console.log("Unable to empty directory: " + err); + } + } +}; + function update_RProfile(rprofile_path, packages_path) { // update and copy Rprofile with .libPath() info let searchText = "### Setting TA3 .libPaths() ###"; @@ -57,6 +70,8 @@ module.exports = { icon: path.resolve(__dirname, 'assets', 'img', 'icons', 'icon'), appBundleId: 'edu.psu.TA3', appCategoryType: 'public.app-category.education', + electronVersion: '6.0.7', + overwrite: true, win32metadata: { CompanyName: 'Ron Richardson', OriginalFilename: 'ta3' @@ -68,7 +83,7 @@ module.exports = { /\/build\/R-Portable(\/?)/, /\/build\/setup(\/?)/, /\/build\/(.*)\.zip/, - // /\/dist(\/?)/ + /\/dist(\/?)/ ] }, makers: [ @@ -137,6 +152,8 @@ module.exports = { let z_packages = new AdmZip(path.join(__dirname, "build", "packages.zip")); z_packages.extractAllTo(path.join(dest_root, "packages")); + + empty_directory(path.join(dest_root, "analysis")); } } }; diff --git a/package.json b/package.json index 8d274e4..64eb62d 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "ta3", "productName": "Transition Analysis 3", - "version": "0.8.1", + "version": "0.8.2", "description": "Transition Analysis 3 (TA3) Age Estimation", "license": "", "repository": "rer145/ta3",