Jump to content

What's happend with launcher at the beginning of April?


iBars

Recommended Posts

I use modified launcher of Notch with autorization via site (AuthMe, xAuth, cAuth, bye!) for my server and I also make zip extractor.

 

1. Player launch my launcher and type his login and password from my site

2. Launcher downloading client and ZIP archive client.zip

3. Launcher extract my files from client.zip into .minecraft .MyServerName folder

4. Starting game

5. Player can join to my server (with my custom mods which extracted from client.zip)

 

But since April 2013 suddenly there was something wrong (maybe, Forge has been updated?): my launcher no longer extract client.zip... I do not touch and update my client.zip and launcher, it abruptly broke down.

 

Launcher downloading client.zip fine, but don't extract its contents. What's happend? Not only I have this problem.

 

32 bit: {removed}

64 bit: {removed}

Login: Testificate

Password: tester

Client folder: %appdata%\.onlymc\ServerName\

Download client.zip: {removed}

Code from GameUpdater.java:

protected void UnZip() {
    String szZipFilePath;
    String szExtractPath;
    String path = Util.getWorkingDirectory() + File.separator;
    int i;
    
    szZipFilePath = path + "bin" + File.separator + "client.zip";
      
    File f = new File(szZipFilePath);
    if(!f.exists())
    {
      System.out.println(
"\nNot found: " + szZipFilePath);
    }
      
    if(f.isDirectory())
    {
      System.out.println(
"\nNot file: " + szZipFilePath);
    }
    
    System.out.println(
      "Enter path to extract files: ");
    szExtractPath = path;
    
    File f1 = new File(szExtractPath);
    if(!f1.exists())
    {
      System.out.println(
"\nNot found: " + szExtractPath);
    }
      
    if(!f1.isDirectory())
    {
      System.out.println(
"\nNot directory: " + szExtractPath);
    }
    
    ZipFile zf; 
    Vector zipEntries = new Vector();
       
    try
    {  
      zf = new ZipFile(szZipFilePath);    
      Enumeration en = zf.entries();
      
      while(en.hasMoreElements())
      {
        zipEntries.addElement(
  (ZipEntry)en.nextElement());
      }
      
      for (i = 0; i < zipEntries.size(); i++)
      {
        ZipEntry ze = 
  (ZipEntry)zipEntries.elementAt(i);
  
        extractFromZip(szZipFilePath, szExtractPath,
  ze.getName(), zf, ze);
      }
      
      zf.close();
      System.out.println("Done!");
    }
    catch(Exception ex)
    {
      System.out.println(ex.toString());
    }
    f.delete();
  }

  static void extractFromZip(
    String szZipFilePath, String szExtractPath,
    String szName,
    ZipFile zf, ZipEntry ze)
  {
    if(ze.isDirectory())
      return;
      
    String szDstName = slash2sep(szName);
    
    String szEntryDir;
    
    if(szDstName.lastIndexOf(File.separator) != -1)
    {
      szEntryDir =
        szDstName.substring(
  0, szDstName.lastIndexOf(File.separator));
    }
    else	  
      szEntryDir = "";
    
    System.out.print(szDstName);
    long nSize = ze.getSize();
    long nCompressedSize = 
      ze.getCompressedSize();
    
    System.out.println(" " + nSize + " (" +
      nCompressedSize + ")");  
  
    try
    {
       File newDir = new File(szExtractPath +
 File.separator + szEntryDir);

       newDir.mkdirs();	 
       
       FileOutputStream fos = 
 new FileOutputStream(szExtractPath +
 File.separator + szDstName);

       InputStream is = zf.getInputStream(ze);
       byte[] buf = new byte[1024];

       int nLength;
       
       while(true)
       {
         try
         {
   nLength = is.read(buf);
         }	 
         catch (EOFException ex)
         {
   break;
 }  

         if(nLength < 0) 
   break;
         fos.write(buf, 0, nLength);
       }
       
       is.close();
       fos.close();
    }   
    catch(Exception ex)
    {
      System.out.println(ex.toString());
      //System.exit(0);
    }
  }

  static String slash2sep(String src)
  {
    int i;
    char[] chDst = new char[src.length()];
    String dst;
    
    for(i = 0; i < src.length(); i++)
    {
      if(src.charAt(i) == '/')
        chDst[i] = File.separatorChar;
      else
        chDst[i] = src.charAt(i);
    }
    dst = new String(chDst);
    return dst;
  }

Link to comment
Share on other sites

I have removed your download links.

Please do not distribute unknown binaries here, especially in the support sections.

Anyways this has nothing to do with Forge and is a issue with your launcher. Either move it to the Programming areas, or try and figure it out yourself.

 

If you do re-port this please do not provide executable downloads instead provide your source code so that the person who decide to help you can review it and make up his own mind either to trust it or not.

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.