Skip to content

Commit 8b76ea3

Browse files
authored
Merge pull request #3983 from opensim-org/fix_matlab_configure_windows
initialize api_distro to false on windows as layout doesn't change
2 parents 097410f + b0b8d84 commit 8b76ea3

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Bindings/Java/Matlab/configureOpenSim.m.in

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ function configureOpenSim()
6666
% permissions and limitations under the License. %
6767
% ----------------------------------------------------------------------- %
6868

69-
function [openSimFolder] = uiGetOpenSimFolder()
69+
function [openSimFolder, api_distro] = uiGetOpenSimFolder()
7070
% Prompt user for OpenSim folder.
7171
startPath = '';
7272

@@ -86,6 +86,7 @@ function [openSimFolder] = uiGetOpenSimFolder()
8686
if ~openSimFolder
8787
showMessage('You did not select a folder.', 'Error', true);
8888
end
89+
api_distro = false
8990
if ismac
9091
[~, name, ext] = fileparts(openSimFolder);
9192
% If openSimFolder is '/Applications/OpenSim 4.0.1' then we'll get:
@@ -114,6 +115,7 @@ try
114115
% This function returns all but the leaf element of the provided path.
115116
openSimFolder = fileparts(openSimFolder);
116117
end
118+
api_distro = false;
117119
% For this to be an OpenSim installation, there must be a buildinfo file.
118120
buildInfoFile = fullfile(openSimFolder, '@CMAKE_INSTALL_SYSCONFDIR@', ...
119121
'OpenSim_buildinfo.txt');
@@ -122,7 +124,7 @@ try
122124
% installation; ask the user to choose an install directory.
123125
correctFolder = false;
124126
while ~correctFolder
125-
openSimFolder = uiGetOpenSimFolder();
127+
[openSimFolder, api_distro] = uiGetOpenSimFolder();
126128
% Check if the user selected a valid folder.
127129
if api_distro
128130
subfoldername = 'etc';

0 commit comments

Comments
 (0)