Unverified Commit f43d8e43 authored by jayd1860's avatar jayd1860 Committed by GitHub
Browse files

DataTree submodule reference update and Mac support fixes (#89)

-- Update DataTree submodule reference to latest change containing fix for errors when there are no data files (because all have errors that prevent loading)

-- Fix more issues with install executable on MAC
parent aed87aaa
Loading
Loading
Loading
Loading
Compare 4d8cb662 to 30a17517
Original line number Diff line number Diff line
Subproject commit 4d8cb6623f76d4e1953e398890ecf807ba9d0887
Subproject commit 30a17517fd24ac2867945aae6a86732759c66635
+34 −20
Original line number Diff line number Diff line
@@ -6,6 +6,8 @@ global dirnameDst

try

    setNamespace('Homer3');
    
    currdir = filesepStandard(pwd);
        
    h = waitbar(0,'Installation Progress ...');
@@ -55,7 +57,7 @@ nSteps = 100;
iStep = 1;

fprintf('dirnameSrc = %s\n', dirnameSrc)
fprintf('dirnameDst = %s\n\n', dirnameDst)
fprintf('dirnameDst = %s\n', dirnameDst)

logger = Logger([dirnameSrc, 'Setup']);

@@ -63,7 +65,7 @@ logger = Logger([dirnameSrc, 'Setup']);

v = getVernum();
logger.Write('==========================================\n');
logger.Write('Setup script for %s v%s.%s,%s:\n', exename, v{1}, v{2}, v{3});
logger.Write('Setup script for %s v%s.%s.%s:\n', exename, v{1}, v{2}, v{3});
logger.Write('==========================================\n\n');

logger.Write('Platform params:\n');
@@ -118,9 +120,12 @@ pause(2);
function err = cleanup()
global dirnameSrc
global dirnameDst
global logger 

err = 0;

logger = [];

% Uninstall old installation
try
    if exist(dirnameDst,'dir')
@@ -137,18 +142,21 @@ catch ME
end

% Change source dir if not on PC
if ~ispc() && ~isdeployed()
    dirnameSrc0 = dirnameSrc;
    
if ~ispc()
    dirnameSrc = sprintf('~/Downloads/%s_install/', lower(getAppname));
    fprintf('SETUP:    current folder is %s\n', pwd);   
    
    if ~isdeployed()
        rmdir_safe(sprintf('~/Desktop/%s_install/', lower(getAppname())));
        if ~pathscompare(dirnameSrc, dirnameSrc0)
            rmdir_safe(dirnameSrc);            
    rmdir_safe('~/Desktop/Test/');
    
            if ispathvalid(dirnameSrc)
                err = -1;
            end
            copyFile(dirnameSrc0, dirnameSrc);
        end
        rmdir_safe('~/Desktop/Test/');
        
        if ispathvalid('~/Desktop/%s_install/')
            err = -1;
        end
@@ -156,9 +164,9 @@ if ~ispc() && ~isdeployed()
            err = -1;
        end
        
    copyFile(dirnameSrc0, dirnameSrc);
        cd(dirnameSrc);
    end
end



@@ -197,7 +205,13 @@ try
    end
    
    % Copy file from source to destination folder
    logger.Write('Copying %s to %s\n', src, dst);
    
    logmsg = sprintf('Copying %s to %s\n', src, dst);
    if isempty(logger)
        fprintf(logmsg);
    else
        logger.Write(logmsg);
    end
    copyfile(src, dst);

    if ~isempty(iStep)