Skip to content
This repository has been archived by the owner on Oct 27, 2019. It is now read-only.

support new AE versions, refactor detection logic #8

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 16 additions & 4 deletions lib/aftereffects-eval.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,22 @@ evalInAfterEffects.getName = function(){
if (evalInAfterEffects.NAME == null) {
try {
;(function(error, Applications){
if (Applications.indexOf('Adobe After Effects CC 2014') != -1) evalInAfterEffects.NAME = "Adobe After Effects CC 2014";
else if (Applications.indexOf('Adobe After Effects CC') != -1) evalInAfterEffects.NAME = "Adobe After Effects CC";
else if (Applications.indexOf('Adobe After Effects CS6') != -1) evalInAfterEffects.NAME = "Adobe After Effects CS6";
else if (Applications.indexOf('Adobe After Effects CS5') != -1) evalInAfterEffects.NAME = "Adobe After Effects CS5";
var supportedApps = [
"Adobe After Effects CC 2017",
"Adobe After Effects CC 2016",
"Adobe After Effects CC 2015",
"Adobe After Effects CC 2014",
"Adobe After Effects CC",
"Adobe After Effects CS6",
"Adobe After Effects CS5"
];
var runningSupportedApps = supportedApps.filter(function (appName) {
return Applications.indexOf(appName) != -1;
});

if (runningSupportedApps.length) {
evalInAfterEffects.NAME = runningSupportedApps[0];
}
}(null, require('fs').readdirSync('/Applications')));
} catch(e){}
}
Expand Down