Ferromagnetic shape-memory (FSM) compounds are actively studied materials due to their large shape changes in an external magnetic field. This makes it possible to realize novel actuators and sensors. For the fabrication of micromechanical components and even microscopic machines, the material should be in thin-film form, and pulsed laser deposition (PLD) is an effective technique to reach this goal. In this thesis, FSM Ni-Mn-Ga films with a thickness of a few hundred nanometers were deposited on different substrates and methods were developed to release the film from its substrate. For efficient ablation, the intensity distribution of the laser beam on the target should be smooth with steep edges. In this work, such a distribution was realized with the help of diffractive optics. Diffractive optics was also applied to directly produce almost propagation-invariant laser beams, so-called Bessel-Gauss beams in laser resonators. Furthermore, Bessel-like laser beams were created as a result of self-focusing in a certain liquid crystal. Such diffraction-free laser beams can be used in precise laser ablation and accurate patterning of small structures in thin films.