Der kleine Test mit dem Befehl funktioniert: die Dosbox wird geöffnet, die Software.exe wird ausgeführt und im Anschluss wird die Dosbox wieder geschlossen. Prima.
Jetzt will ich das in Matlab einbauen, dies mache ich wie folgt:
Hallo denny, hallo Harald,
vielen Dank für Eure Unterstützung! Vorab: Ich habe einen Linux und einen Mac Rechner auf dem jeweils Matlab 2013a installiert ist. Mein Code soll natürlich zum Schluss auf beiden System laufen. Hier die Fehler des Mac Rechners:
Ich nutze folgenden Code:
Code:
StartDOSBox = 'open -a DosBox.app ./Software.exe'
unix(StartDOSBox);
und es geschieht folgendes:
- Die Dosbox wird automatisch gestartet,
- Die Software wird automatisch gestartet und und richtig ausgeführt.
Bis hierhin läuft alles ohne Fehler.
Zweiter Ansatz mit folgendem Code:
Code:
StartDOSBox = 'open -a DosBox.app ./Software.exe -exit'
unix(StartDOSBox);
open: invalid option -- x
Usage: open[-e][-t][-f][-W][-R][-n][-g][-h][-b <bundle identifier>][-a <application>][filenames][--args arguments]
Help: Open opens files from a shell.
By default, opens each file using the default application for that file.
If the file is in the form of a URL, the file will be opened as a URL.
Options:
-a Opens with the specified application.
-b Opens with the specified application bundle identifier.
-e Opens with TextEdit.
-t Opens with default text editor.
-f Reads input from standard input and opens with TextEdit.
-F --fresh Launches the app fresh, that is, without restoring windows. Savedpersistent state is lost, excluding Untitled documents.
-R, --reveal Selects in the Finder instead of opening.
-W, --wait-apps Blocks until the used applications are closed (even if they were already running).
--args All remaining arguments are passed in argv to the application's main()function instead of opened.
-n, --new Open a new instance of the application even if one is already running.
-j, --hide Launches the app hidden.
-g, --background Does not bring the application to the foreground.
-h, --header Searches header file locations for headers matching the given filenames, and opens them.
Es geschieht folgendes:
- Die Dosbox öffnet automatisch (es passiert nichts weiter mit der Dropbox),
- Die Software wird nicht gestartet
- Die Dosbox schließt nicht.
Falls Ihr die Ergebnisse des Linux Rechners haben wollt, kann ich Sie morgen posten.
Vielen Dank im Voraus.
Der Grünschnabel grüßt aus Japan
Einstellungen und Berechtigungen
Du kannst Beiträge in dieses Forum schreiben. Du kannst auf Beiträge in diesem Forum antworten. Du kannst deine Beiträge in diesem Forum nicht bearbeiten. Du kannst deine Beiträge in diesem Forum nicht löschen. Du kannst an Umfragen in diesem Forum nicht mitmachen. Du kannst Dateien in diesem Forum posten Du kannst Dateien in diesem Forum herunterladen
MATLAB, Simulink, Stateflow, Handle Graphics, Real-Time Workshop, SimBiology, SimHydraulics, SimEvents, and xPC TargetBox are registered trademarks and The MathWorks, the L-shaped membrane logo, and Embedded MATLAB are trademarks of The MathWorks, Inc.