We study the electronic structure and magnetic properties of equilibrated and distorted Co2MnSi1-xAlx using density-functional theory calculations. We find that equilibrated Co2MnSi shows true half-metallicity while Co2MnAl shows traditional ferromagnetism. The tensile stress deteriorates the half-metallicity of Co2MnSi, while it induces a transition from traditional ferromagnetism to true half-metallicity for Co2MnAl. The intermediate Co2MnSi1-xAlx alloys show compromise properties between pure Co2MnSi and Co2MnAl. Detailed studies show that the stretch stress enhances the splitting of the t2g orbital while it has little influence on the eg orbital for all Co2MnSi1-xAlx alloys. Finally, we deduced that graded heterostructural Co2MnSi1-xAlx alloys with Co2MnAl side epitaxial growth on silicon would keep high temperature half-metallicity throughout the heterostructure to the interface, and this may be a scheme to fulfil efficient spin injection into silicon.