I use the application compiler to package the gui into exe, the exe software could start. However, it doesn't work as the gui. can't load the document and model.(the code in .m includes Local file path)?
MATLAB’s App Designer allows you to create a special function that executes when the app starts up, but before the user interacts with the UI like:StartupFcncallback. You can leverage this property for specifying the file name that you want to run when your app starts. I am attaching some links for you to refer those in case you need more help: