Here is my part of the project, written in the perfect noob language called GameMakerLanguage (GML)
inoaf=file_exists("openarena.exe");
moveto="";
if(!inoaf){
show_message("Please select the directory of openarena.exe in the following screen...");
moveto=get_directory(""); //this shows a screen where you can select the directory
if(moveto==""){
show_message("No directory selected. If you want to install it, don't press cancel lol.");
game_end();
exit;
}
moveto+="\"; //the final backslash isn't included when selecting the directory so I add it manually
}
if(!file_exists(moveto+"openarena.exe")){
if( show_question("Wrong directory (openarena.exe is missing), try again?") ){
game_restart();
exit;
}else{
game_end();
exit;
}
}
if(!inoaf){
file_copy( "install.exe", moveto+"install.exe ");
file_copy( "add.reg", moveto+"add.reg ");
file_copy( "handler.exe", moveto+"handler.exe ");
}
execute_program(moveto+"install.exe","",1);
show_message("Succesfully installed!");
file_delete(moveto+"install.exe");
file_delete(moveto+"add.reg");
if(!inoaf){
file_delete("install.exe");
file_delete("add.reg");
file_delete("handler.exe");
}
game_end();
exit;
This is all I typed. Via the GUI from Gamemaker I have included the three files from diho, which it unpacks before executing the program (overwriting files if they exist for if you have an old version).
Of course for this source the same as for diho:You may help with making it work better, but we trust you guys that you don't use it to make your own version of it.