Skip to content

Commit

Permalink
Merge pull request #3983 from opensim-org/fix_matlab_configure_windows
Browse files Browse the repository at this point in the history
initialize api_distro to false on windows as layout doesn't change
  • Loading branch information
nickbianco authored Dec 18, 2024
2 parents 097410f + b0b8d84 commit 8b76ea3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Bindings/Java/Matlab/configureOpenSim.m.in
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ function configureOpenSim()
% permissions and limitations under the License. %
% ----------------------------------------------------------------------- %

function [openSimFolder] = uiGetOpenSimFolder()
function [openSimFolder, api_distro] = uiGetOpenSimFolder()
% Prompt user for OpenSim folder.
startPath = '';

Expand All @@ -86,6 +86,7 @@ function [openSimFolder] = uiGetOpenSimFolder()
if ~openSimFolder
showMessage('You did not select a folder.', 'Error', true);
end
api_distro = false
if ismac
[~, name, ext] = fileparts(openSimFolder);
% If openSimFolder is '/Applications/OpenSim 4.0.1' then we'll get:
Expand Down Expand Up @@ -114,6 +115,7 @@ try
% This function returns all but the leaf element of the provided path.
openSimFolder = fileparts(openSimFolder);
end
api_distro = false;
% For this to be an OpenSim installation, there must be a buildinfo file.
buildInfoFile = fullfile(openSimFolder, '@CMAKE_INSTALL_SYSCONFDIR@', ...
'OpenSim_buildinfo.txt');
Expand All @@ -122,7 +124,7 @@ try
% installation; ask the user to choose an install directory.
correctFolder = false;
while ~correctFolder
openSimFolder = uiGetOpenSimFolder();
[openSimFolder, api_distro] = uiGetOpenSimFolder();
% Check if the user selected a valid folder.
if api_distro
subfoldername = 'etc';
Expand Down

0 comments on commit 8b76ea3

Please sign in to comment.