You have a few choices; Cut all edges as good as possible then brush the flaking crap off,precut the film on the glass leaving an 1/8 border or smaller all the way around , carefully install . If the light gap is pronounced as with darker films you can caulk the borders.
You can clean the edges as good as possible and then tape the frames
You could make it a 2 stage process by cleaning the frames , then taping the glass for overspray and coating the frame with a sealer applicable to the project
That frame scenario is always labor intensive , so price accordingly
And it all depends on how anal you or the customer is 😁