  Millisecond magnetars produced in the center of dying massive stars are one
prominent model to power gamma-ray bursts (GRBs). However, their detailed
nature remains a mystery. To explore the effects of the initial mass, rotation
rate, wind mass loss, and metallicity on the GRB progenitors and the newborn
magnetar properties, we evolve 227 of $10-30~M_\odot$ single star models from
the pre-main-sequence to core collapse by using the stellar evolution code
MESA. The pre-supernova properties, the compactness parameter, and magnetar
characteristics of models with different initial parameters are presented. The
compactness parameter remains a non-monotonic function of the initial mass and
initial rotation rate when the effects of vary metallicity and ``Dutch'' wind
scale factor are taken into account. We find that the initial rotation rate and
mass play the dominant roles in whether a star can evolve into a GRB
progenitor. The minimum rotation rate necessary to generate a magnetar
gradually reduces as the initial mass increases. The greater the initial
metallicity and ``Dutch'' wind scale factor, the larger the minimum rotation
rate required to produce a magnetar. In other words, massive stars with low
metallicity are more likely to harbor magnetars. Furthermore, we present the
estimated period, magnetic field strength, and masses of magnetars in all
cases. The typical rotational energy of these millisecond magnetars is
sufficient to power long-duration GRBs.

High Energy Astrophysical Phenomena