Skip to content

Commit

Permalink
I worked on INI config, rage quit on zip handling for now.
Browse files Browse the repository at this point in the history
  • Loading branch information
LeGoldFish committed Jan 19, 2015
1 parent bb07a7c commit d980ee9
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 104 deletions.
36 changes: 34 additions & 2 deletions src/gold/programming/ga/INIHandler.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,39 @@
package gold.programming.ga;

import java.io.BufferedWriter;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.Writer;

import org.ini4j.InvalidFileFormatException;
import org.ini4j.Wini;

public class INIHandler {
public static void getConfig(String filename) {


public static void makeConfig() throws InvalidFileFormatException,
IOException {

File config = new File("C:\\Users\\" + System.getProperty("user.name")
+ "\\Desktop\\DTR2Install\\config.ini");
FileOutputStream is = new FileOutputStream(config);
OutputStreamWriter osw = new OutputStreamWriter(is);
Writer w = new BufferedWriter(osw);
}

public static void writeConfig()
throws InvalidFileFormatException, IOException {
Wini ini = new Wini(new File("C:\\Users\\"
+ System.getProperty("user.name")
+ "\\Desktop\\DTR2Install\\config.ini"));
ini.put("directories", "installDir", "C:\\Games\\Infogrames\\Dirt Track Racing 2\\data\\");
}

public static void main(String[] args) throws InvalidFileFormatException,
IOException {
makeConfig();
writeConfig();
}
}
102 changes: 0 additions & 102 deletions src/gold/programming/ga/MainUnzipVersion.java

This file was deleted.

0 comments on commit d980ee9

Please sign in to comment.