为了使我的 Real Studio 应用程序可移植,我想让它在 Mac、Windows 和 Linux 上使用默认的控制台/终端应用程序打开一个可执行文件。我有一个字符串 s,它是可执行文件的文件名。到目前为止我有这个:
#If TargetMacOS
DIM sh As new Shell
sh.Execute "open " + GetFolderItem(s).ShellPath + " -a Terminal"
#EndIf
但是如何在 Windows 和 Linux 上做到这一点呢?对于 Linux,我可以用gnome-terminal
or打开文件konsole
吗?如果可以,我怎么知道用哪一个打开它?