diff --git a/.gitignore b/.gitignore index 4b0c9fd..0f81479 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,6 @@ work toolbox/html -toolbox/dependencies/firmware +toolbox/dependencies # Autosave files *.asv diff --git a/buildUtilities/releaseTask.m b/buildUtilities/releaseTask.m index 5d3e138..e0330fc 100644 --- a/buildUtilities/releaseTask.m +++ b/buildUtilities/releaseTask.m @@ -17,6 +17,9 @@ warning('Share folder not found. Firmware dependencies will not be packaged in toolbox.'); end +% Update Speedgoat dependencies +updateSGdeps; + % Remove v from toolboxVersion options.toolboxVersion = erase(toolboxVersion,"v"); diff --git a/buildUtilities/updateSGdeps.m b/buildUtilities/updateSGdeps.m index 8ec552d..27a25f0 100644 --- a/buildUtilities/updateSGdeps.m +++ b/buildUtilities/updateSGdeps.m @@ -2,18 +2,24 @@ projObj = currentProject; sgToolsPath = fileparts(which('updateSGtools.p','-all')); -sgToolsPath = sgToolsPath{end}; % Speedgoat I/O blockset path is always below the local project +if isstring(sgToolsPath) + sgToolsPath = sgToolsPath{end}; % Speedgoat I/O blockset path is always below the local project +end fprintf('Updating Speedgoat dependencies in local project from %s...\n',sgToolsPath); sgTools = dir(sgToolsPath); sgTools = sgTools(~[sgTools.isdir]); +destFolder = fullfile(projObj.RootFolder,'toolbox/dependencies/sg',matlabRelease.Release); +if ~isfolder(destFolder) + mkdir(destFolder); +end + for i = 1:numel(sgTools) - copyfile(fullfile(sgTools(i).folder,sgTools(i).name),... - fullfile(projObj.RootFolder,'toolbox/dependencies/sg/')); + copyfile(fullfile(sgTools(i).folder,sgTools(i).name),destFolder); end -fprintf('Dependencies updated. Please commit and push changes to Git.\n'); +fprintf('Speedgoat dependencies updated in toolbox.\n'); end \ No newline at end of file diff --git a/resources/project/-yj-zgdEElpZjlogbAXxP8XBgk4/MskSURkXF5WinZ-fWKasIhdvxp4d.xml b/resources/project/-yj-zgdEElpZjlogbAXxP8XBgk4/3aKsr_CsdwkFmajWCsUtBCIVdG0d.xml similarity index 100% rename from resources/project/-yj-zgdEElpZjlogbAXxP8XBgk4/MskSURkXF5WinZ-fWKasIhdvxp4d.xml rename to resources/project/-yj-zgdEElpZjlogbAXxP8XBgk4/3aKsr_CsdwkFmajWCsUtBCIVdG0d.xml diff --git a/resources/project/-yj-zgdEElpZjlogbAXxP8XBgk4/NdmgVI2224JjgwhiWss8erhgOUEd.xml b/resources/project/-yj-zgdEElpZjlogbAXxP8XBgk4/3aKsr_CsdwkFmajWCsUtBCIVdG0p.xml similarity index 50% rename from resources/project/-yj-zgdEElpZjlogbAXxP8XBgk4/NdmgVI2224JjgwhiWss8erhgOUEd.xml rename to resources/project/-yj-zgdEElpZjlogbAXxP8XBgk4/3aKsr_CsdwkFmajWCsUtBCIVdG0p.xml index a75f7a8..e0545ea 100644 --- a/resources/project/-yj-zgdEElpZjlogbAXxP8XBgk4/NdmgVI2224JjgwhiWss8erhgOUEd.xml +++ b/resources/project/-yj-zgdEElpZjlogbAXxP8XBgk4/3aKsr_CsdwkFmajWCsUtBCIVdG0p.xml @@ -1,2 +1,2 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/resources/project/-yj-zgdEElpZjlogbAXxP8XBgk4/MskSURkXF5WinZ-fWKasIhdvxp4p.xml b/resources/project/-yj-zgdEElpZjlogbAXxP8XBgk4/MskSURkXF5WinZ-fWKasIhdvxp4p.xml deleted file mode 100644 index 05a9d2a..0000000 --- a/resources/project/-yj-zgdEElpZjlogbAXxP8XBgk4/MskSURkXF5WinZ-fWKasIhdvxp4p.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/resources/project/-yj-zgdEElpZjlogbAXxP8XBgk4/NdmgVI2224JjgwhiWss8erhgOUEp.xml b/resources/project/-yj-zgdEElpZjlogbAXxP8XBgk4/NdmgVI2224JjgwhiWss8erhgOUEp.xml deleted file mode 100644 index f6bfbb7..0000000 --- a/resources/project/-yj-zgdEElpZjlogbAXxP8XBgk4/NdmgVI2224JjgwhiWss8erhgOUEp.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/resources/project/-yj-zgdEElpZjlogbAXxP8XBgk4/c3iALygUc9jUZcnFpmELBkqcD-Ad.xml b/resources/project/-yj-zgdEElpZjlogbAXxP8XBgk4/c3iALygUc9jUZcnFpmELBkqcD-Ad.xml deleted file mode 100644 index a75f7a8..0000000 --- a/resources/project/-yj-zgdEElpZjlogbAXxP8XBgk4/c3iALygUc9jUZcnFpmELBkqcD-Ad.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/resources/project/-yj-zgdEElpZjlogbAXxP8XBgk4/c3iALygUc9jUZcnFpmELBkqcD-Ap.xml b/resources/project/-yj-zgdEElpZjlogbAXxP8XBgk4/c3iALygUc9jUZcnFpmELBkqcD-Ap.xml deleted file mode 100644 index 8b17116..0000000 --- a/resources/project/-yj-zgdEElpZjlogbAXxP8XBgk4/c3iALygUc9jUZcnFpmELBkqcD-Ap.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/resources/project/-yj-zgdEElpZjlogbAXxP8XBgk4/o8Dwu5f1Xtp1n1mWGkwWcFVsE_Qd.xml b/resources/project/-yj-zgdEElpZjlogbAXxP8XBgk4/o8Dwu5f1Xtp1n1mWGkwWcFVsE_Qd.xml deleted file mode 100644 index a75f7a8..0000000 --- a/resources/project/-yj-zgdEElpZjlogbAXxP8XBgk4/o8Dwu5f1Xtp1n1mWGkwWcFVsE_Qd.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/resources/project/-yj-zgdEElpZjlogbAXxP8XBgk4/o8Dwu5f1Xtp1n1mWGkwWcFVsE_Qp.xml b/resources/project/-yj-zgdEElpZjlogbAXxP8XBgk4/o8Dwu5f1Xtp1n1mWGkwWcFVsE_Qp.xml deleted file mode 100644 index 55f269d..0000000 --- a/resources/project/-yj-zgdEElpZjlogbAXxP8XBgk4/o8Dwu5f1Xtp1n1mWGkwWcFVsE_Qp.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/resources/project/EEtUlUb-dLAdf0KpMVivaUlztwA/PhuCIbwAozrXZ4fZyIBL8TMGEzkd.xml b/resources/project/EEtUlUb-dLAdf0KpMVivaUlztwA/GyUn0X0AF-2zCuh99CWbAYiuc4od.xml similarity index 100% rename from resources/project/EEtUlUb-dLAdf0KpMVivaUlztwA/PhuCIbwAozrXZ4fZyIBL8TMGEzkd.xml rename to resources/project/EEtUlUb-dLAdf0KpMVivaUlztwA/GyUn0X0AF-2zCuh99CWbAYiuc4od.xml diff --git a/resources/project/EEtUlUb-dLAdf0KpMVivaUlztwA/GyUn0X0AF-2zCuh99CWbAYiuc4op.xml b/resources/project/EEtUlUb-dLAdf0KpMVivaUlztwA/GyUn0X0AF-2zCuh99CWbAYiuc4op.xml new file mode 100644 index 0000000..be92e72 --- /dev/null +++ b/resources/project/EEtUlUb-dLAdf0KpMVivaUlztwA/GyUn0X0AF-2zCuh99CWbAYiuc4op.xml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/resources/project/EEtUlUb-dLAdf0KpMVivaUlztwA/PhuCIbwAozrXZ4fZyIBL8TMGEzkp.xml b/resources/project/EEtUlUb-dLAdf0KpMVivaUlztwA/PhuCIbwAozrXZ4fZyIBL8TMGEzkp.xml deleted file mode 100644 index 5910b77..0000000 --- a/resources/project/EEtUlUb-dLAdf0KpMVivaUlztwA/PhuCIbwAozrXZ4fZyIBL8TMGEzkp.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/toolbox/bossdevice.m b/toolbox/bossdevice.m index 11eda75..48540f5 100644 --- a/toolbox/bossdevice.m +++ b/toolbox/bossdevice.m @@ -56,6 +56,8 @@ function clearPersonalSettings() ipAddress {mustBeTextScalar} = ''; end + toolboxPath = fileparts(which(mfilename)); + % Initialize toolbox settings s = settings; @@ -81,6 +83,16 @@ function clearPersonalSettings() ipAddress = s.bossdeviceAPI.TargetSettings.TargetIPAddress.FactoryValue; end + % Check and enable built-in Speedgoat dependencies + if ~exist('updateSGtools.p','file') + addpath(fullfile(toolboxPath,'dependencies','sg',matlabRelease.Release)); + elseif exist('speedgoat','file') + % Using own full installation of Speedgoat I/O Blockset + % fprintf('Using own full installation of Speedgoat I/O Blockset v%s.\n',speedgoat.version); + else + error('Speedgoat dependencies not found. Please search out to technical support.'); + end + % Use default target if not passing any input argument tgs = slrealtime.Targets; if ~contains(tgs.getTargetNames,targetName,'IgnoreCase',true) @@ -98,7 +110,6 @@ function clearPersonalSettings() end % Search firmware binary and prompt user if not found in MATLAB path - toolboxPath = fileparts(which(mfilename)); firmwareSharePath = fullfile(toolboxPath,'dependencies','firmware',matlabRelease.Release,[obj.appName,'.mldatx']); if exist([obj.appName,'.mldatx'],"file") diff --git a/toolbox/dependencies/sg/.gitkeep b/toolbox/dependencies/sg/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/toolbox/dependencies/sg/SGtarlist.p b/toolbox/dependencies/sg/SGtarlist.p deleted file mode 100644 index bb0e67a..0000000 Binary files a/toolbox/dependencies/sg/SGtarlist.p and /dev/null differ diff --git a/toolbox/dependencies/sg/sgtools_qnx710.cksum b/toolbox/dependencies/sg/sgtools_qnx710.cksum deleted file mode 100644 index b5d9ed5..0000000 --- a/toolbox/dependencies/sg/sgtools_qnx710.cksum +++ /dev/null @@ -1 +0,0 @@ -1945173065 30955520 sgtools_qnx710.tar diff --git a/toolbox/dependencies/sg/sgtools_qnx710.tar b/toolbox/dependencies/sg/sgtools_qnx710.tar deleted file mode 100644 index 5dcd425..0000000 Binary files a/toolbox/dependencies/sg/sgtools_qnx710.tar and /dev/null differ diff --git a/toolbox/dependencies/sg/updateSGtools.p b/toolbox/dependencies/sg/updateSGtools.p deleted file mode 100644 index ccec606..0000000 Binary files a/toolbox/dependencies/sg/updateSGtools.p and /dev/null differ