Skip to content

Commit

Permalink
update to portable build config
Browse files Browse the repository at this point in the history
  • Loading branch information
rer145 committed Sep 29, 2020
1 parent c1df386 commit 380fd40
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
19 changes: 18 additions & 1 deletion forge.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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() ###";
Expand Down Expand Up @@ -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'
Expand All @@ -68,7 +83,7 @@ module.exports = {
/\/build\/R-Portable(\/?)/,
/\/build\/setup(\/?)/,
/\/build\/(.*)\.zip/,
// /\/dist(\/?)/
/\/dist(\/?)/
]
},
makers: [
Expand Down Expand Up @@ -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"));
}
}
};
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down

0 comments on commit 380fd40

Please sign in to comment.