• Search
  • Register
  • Log in
  • Ace of Spades Game Forums » Help
  • Note: This forum is merely an archive. It is no longer possible to login or register. - StackOverflow
    New Ace of Spades Forums: http://buildandshoot.com/
  • config.ini and vxl folders are read-only in w7/vista
  •  

    please please please move these folders to %appdata%


    ExpandEnvironmentVariables("%appdata%\\aos\\config.ini")

    ALSO: if you confirm that you have read this Ben, I will buy you lunch (donate $10) :D

    #7167
    maxoverdrive
    Member
    Posted 13 years ago
     

    Then you have to buy him a lunch because he already read my suggestion (which is exactly the same, I just didn't notice your earlier posts about it) at this thread. :P
    And now pls continue discussing this topic over there.

    #7181
    Green_Beret
    Member
    Posted 13 years ago
     

    I just changed the security settings on them to allow me to edit them. I have mine under program files and I have changed my name.

    #7185
    Akimbow
    Member
    Posted 13 years ago
     

    akimbow: this thread is not to support users in working around the broken way this program handles the files, this thread is for the developer to fix the problem so we don't have to work around it.

    think of it as the 'one less deuce' thread

    #7187
    maxoverdrive
    Member
    Posted 13 years ago
     

    Green: he has to read MY thread :p (or fix the problem ;)

    #7190
    maxoverdrive
    Member
    Posted 13 years ago
     

    I want to avoid solutions that are heavily dependant on the Windows environment, just to make porting to other OS's easier in the future.

    I think I will just make the future default installation path something like C:/Ace of Spades to avoid the Program Files UAC issues.

    #7195
    bcoolface
    Key Master
    Posted 13 years ago
     

    ungh, that's horrible, at least use the ProgramData folder (also known as CommonAppDataFolder) as suggested here by green_beret

    (getting out my paypal wallet now ;)

    #7197
    maxoverdrive
    Member
    Posted 13 years ago
     

    also, you are always going to have to have some platform dependancy

    function get_ini_dir() {
    #ifdef windows
    return ExpandEnvironmentVariables("%appdata%\\aos\\config.ini");
    #else
    return ".\config.ini"
    #endif
    }

    #7200
    maxoverdrive
    Member
    Posted 13 years ago
     

    sorry, i didn't realize i was linking to the .net version of ExpandEnvironmentVariables...

    ExpandEnvironmentStrings()

    pchar ini_filename = NULL;//kind of a hack, dunno how you deal with your string returns but this one is static so....
    function get_ini_filename(){
       #ifdef windows
           if (ini_file_path != null) {
              char path[] = "%appdata%\\Ace Of Spades\\config.ini";
              DWORD size = 0;
              DWORD length = ExpandEnvironmentStrings(path,NULL,size);
              size = length+1;
              ini_filename = malloc(sizeof(char)*size);
              length = ExpandEnvironmentStrings(path,ini_filename,size);
           }
           return ini_filename;
       #else
           return ".\\config.ini";
       #endif
    }
    #7202
    maxoverdrive
    Member
    Posted 13 years ago
     

    This is on the agenda for the next release... as well as lastsav timestamps.

    #7204
    bcoolface
    Key Master
    Posted 13 years ago
     

    ungh, premature post syndrome, fixed the code to make sense

    #7209
    maxoverdrive
    Member
    Posted 13 years ago
     

    Nice! Hm...you keep continuing your fast dev-work.
    I think I need to donate too. :S

    #7216
    Green_Beret
    Member
    Posted 13 years ago
    RSS feed for this topic  

    Reply

    You must log in to post.

  • Tags
  •   No tags yet.
     
    Ace of Spades Game Forums is proudly powered by bbPress.   //   Theme by Mike Lothar  
    [ Time : 0.028s | 13 Queries ]