Пример #1
0
    public UnpackUPK(string _infoFilePath, string _upkFilePath, string _outPath, IUPKUnpack _unpack)
    {
        infoFilePath   = _infoFilePath;
        upkFilePath    = _upkFilePath;
        outPath        = _outPath;
        i_unpack       = _unpack;
        tempUpkPath    = Path.Combine(outPath, "unpack_temp.upk");
        tempOutUpkPath = Path.Combine(outPath, "unpack_temp_out.upk");

        if (File.Exists(tempUpkPath))
        {
            File.Delete(tempUpkPath);
        }

        if (File.Exists(tempOutUpkPath))
        {
            File.Delete(tempOutUpkPath);
        }

        if (!Directory.Exists(outPath))
        {
            Directory.CreateDirectory(outPath);
        }
    }
Пример #2
0
    public static void UnpackFirst(string infoFilePath, string upkFilePath, string outPath, IUPKUnpack progress)
    {
        UnpackUPK unpack = new UnpackUPK(infoFilePath, upkFilePath, outPath, progress);

        unpack.UnpackFirst();
    }