Instant Own
April 18, 2024, 22:33:02
Welcome, Guest. Please login or register.

Login with username, password and session length
News: ioclan.tk domain remains.
 
  Home   Forum   Help Search Gallery Staff List Members Login Register  

The source!

Pages: [1]
  Print  
Author Topic: The source!  (Read 308 times)
0 Members and 1 Guest are viewing this topic.
RMF
Clan leaders
Should i stop?
*****

Awards: 36
Offline Offline

Posts: 2246


Rest in pieces!


View Profile WWW
« on: February 20, 2010, 18:59:49 »

Here is my part of the project, written in the perfect noob language called GameMakerLanguage (GML) Wink
Code:
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:
Quote
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. Smiley
« Last Edit: February 20, 2010, 19:09:07 by RMF » Report Spam   Logged

^IO^RMF


Pages: [1]
  Print  
 
Jump to:  


+--ignore-
Powered by EzPortal
Bookmark this site! | Upgrade This Forum
SMF For Free - Create your own Forum

Powered by SMF | SMF © 2016, Simple Machines
Privacy Policy
Page created in 0.04 seconds with 16 queries.