The traditional output waveform of a pulsed laser is a Gassian beam both in temporal domain and in radial distribution. However, in application, many users need more uniform laser pulse in energy distribution. We propose the capability of square wave output of solid-state laser in temporal domain using the smooth cavity dumping, the reduction of output loss compensating the photon decrease in cavity. In experiment, we used two sets of avalanche transistor chains to control the functional voltage applied on the Pockels cell for getting the fundamental wave pulse-width variable range from 15ns to 140ns, obtained the laser energy output 1000mJ/pulse, and used the square wave pulse-width to pump the nonlinear optical crystal LBO that is obtained the energy output 300mJ/p of second harmonic generation (SHG) and 160mJ/p of third harmonic generation (THG) for 1064nm and 532nm difference frequency in BBO. Comparing with the traditional Gaussian pule, the pulsewidth variable square wave laser has some advantages in waveform, polarization, energy uniformity, so it can be used in high power, high conversion efficiency lasers without damaging the rods, mirrors and crystals.