How do I use a .exe compiled with an app in app designer?

7 vues (au cours des 30 derniers jours)
Neuroesc
Neuroesc le 28 Nov 2024
Commenté : Neuroesc le 13 Déc 2024
I have designed an app in app designer, this runs with no problems.
One of the functions of the app is to run a small .exe that processes some data (let's call it analysis.exe). When designing the app I call analysis.exe via the system command using its filepath.
I have finished my app now, when I compile it I would like to add analysis.exe as a required file, so it is compiled with the rest of the program, but then how do I call it within the app? Is this the correct way to go about it?
Should I instead leave analysis.exe as a standalone, but then how can I know what its filepath will be when I give the program to a new user?
Thanks for any help.

Réponse acceptée

Matt J
Matt J le 28 Nov 2024
Modifié(e) : Matt J le 28 Nov 2024
If you are using the deploytool app to compile, you can include analysis.exe via the section "Files required for your application to run". This will cause analysis.exe to be bundled into the deployed package, and for it to be unpacked into the CTF archive when your deployed standalone is run. Within your MATLAB code, you can build the filepath needed to reference it using ctfroot, e.g.,
if isdeployed
exePath=fullfile(ctfroot,'analysis.exe')
else
exePath=____
end
  7 commentaires
Matt J
Matt J le 12 Déc 2024
If you told deploytool to include Users\data\stuff\GitHub\analysis.exe, then yes, it is normal.
Neuroesc
Neuroesc le 13 Déc 2024
@Matt J answered this issue here

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Standalone Applications dans Help Center et File Exchange

Produits


Version

R2024a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by