It is not possible to remove file from Compiler Project in 2016b
20 views (last 30 days)
Soma Ardhanareeswaran on 20 Oct 2016
I agree with Adam, the Dependency Analysis step would pick up the dependent files that are found in the current directory or from the MATLAB path and get included into the compiler project.
Mike Smith on 25 Jul 2019
I know it'a been a while since this question was posted but I thought I'd comment on my experience with this to keep it all in the same thread. I am using Matlab 2018a with deploytool to make a standalone application. I have a few lines in the app startup function that look for a file "locationOfConfig.m" that represents a Matlab variable (string) that is the absolute path to the actual configuration file. It uses this path to check for the file and if its not there the app launches a little configuration window where the user can make/edit the config file. Once the configuration window is filled out, the configuration file location ("locationOfConfig.m") file and the actual configuration file ("config.txt") are written.
Anyway, during compiling, it was annoying because my "locationOfConfig.m" file kept being automatically incorporated into the "Files required for your application to run" section. But I need the user to be able to generate their own unique file upon installation...not use my absolute path! To work around this, I simply save my local "locationOfConfig.m" in a location that is not set in the official Matlab path (Set Path) and then Matlab doesn't see it upon searching for dependencies. This allows me to compile without the Matlab-declared "dependent" file.
Hope that helps somebody out there.