Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: Rick James on August 13, 2008, 12:24:07 am

Title: FSO Installer Not Working
Post by: Rick James on August 13, 2008, 12:24:07 am
After recently cocking up an installation of FSO due a gross mismanagement of modified texture files, I said "Oh, forget it, I'll just uninstall and re-download FSO from scratch."

The Problem?

The FreeSpace Open Installer won't do anything. I select the folder that previously contained my FSO installation, hit next, checkmarked "Say yes to all", and when I hit next...nothing. I don't see any download starting.

What the pfargtl?
Title: Re: FSO Installer Not Working
Post by: Herra Tohtori on August 13, 2008, 12:32:46 am
Paranoid firewall comes to mind as prime suspect, but it could be something else too... IDK.

Try and give the program appropriate permissions in your firewall software and then try again.
Title: Re: FSO Installer Not Working
Post by: Jeff Vader on August 13, 2008, 02:39:45 am
Something like this (http://www.hard-light.net/forums/index.php/topic,55726.0.html)? Could this be some server-related issue?
Title: Re: FSO Installer Not Working
Post by: Rick James on August 13, 2008, 09:17:29 am
...huh. Didn't know there was an FSO Support forum. My bad.

But yeah, it sounds like the same issue. Yon servers might be borked.
Title: Re: FSO Installer Not Working
Post by: Chris_Ls on August 13, 2008, 09:18:19 am
Hi!
I can only confirm this "bug". However, I figured out the reason and also found a workaround (it's not really a bug, but I'll explain further).

How to reproduce: This is quite easy. Just download the Installer, then proceed with two times clicking next (it actually doesn't matter wether choosing "Say Yes To All" or not) and click next again. Then the Installer will just do nothing and display an empty window. The button "next" cannot be chosen, however the "Prev" button works. It is not possible to finish installation.

The reason: The page that should be displayed, but can't, should list all installable packages. This list is obviously built from the contents of several files the installer gets on-demand from the internet. The pages are listed in the file "filenames.txt" which is located somewhere on a server, too, and also downloaded on-demand. It contains the following line:
http://users.otenet.gr/~mecos/Development/Objc/filez/FS2_Open_Launcher/launcher_info.txt
The specified file cannot be found, because the page has been relocated. This causes the installer to stop working.

Workaround: The workaround requires some knowledge of Java. I just downloaded the sources and while debugging modified the following lines (l. 40 and 41) in the file SelectPage.java
from:
Code: [Select]
FreeSpaceOpenInstaller.download(txtfileurl, instdir + "Installer" + File.separator + filename);
sections.addAll(new InstallerSection(instdir, filename).getSections(auto, installedOnly));
to:
Code: [Select]
try
{
FreeSpaceOpenInstaller.download(txtfileurl, instdir + "Installer" + File.separator + filename);
sections.addAll(new InstallerSection(instdir, filename).getSections(auto, installedOnly));
} catch(Exception e) {}


Just compile and execute and it will work.


Proposal for final solution: First I don't know how important the contents of the moved file were, but it should either be removed from the list or the path should be corrected.

Second a proposal for the excellently written installer (this must be mentioned too!): it currently writes exceptions only to a file called "installer_error.log.txt". Errors could also be displayed to the users so that they at least know something went wrong. It took me som time to figure out what actually happened. And an additional proposal: the above mentioned lines could handle an exception like the one that occured now by adding code to display an error message in the catch-block. It might happened again that an index-file is not available and then the installer would be prepared in some way.


Last but not least thanks for managing this big project. It is a great pleasure to see opensource development working so well. I bought the Freespace 2 Collector's Edition some years ago and thought it's a great game! However, the CDs got lost. Luckily I found your site and now I hopefully will have a much improved version again!

Greetz,
Chris
Title: Re: FSO Installer Not Working
Post by: Jeff Vader on August 13, 2008, 09:27:03 am
Hmm. Much obliged. I'll forward this to Turey and hope that he'll eventually log in. If the "problem" persists, I might include up-to-date instructions for manual installation on the Support board, if nowhere else.
Title: Re: FSO Installer Not Working
Post by: Ajguy on August 13, 2008, 11:48:33 am
I don't have a java compiler (at least I don't think I do). Any chance you can just post the recompiled java applet?
Title: Re: FSO Installer Not Working
Post by: Chris_Ls on August 13, 2008, 01:51:54 pm
You have a Java compiler installed, if you installed the Java Development Kit (JDK). But never mind. I put together another .jar file with a dialog popup about missing resources. Just select "Yes" when it comes up. I can't tell yet wether the missing file contained any critical contents or not, because my download hasn't finished by now. But (as the popup says) as I understood the installer, it only loads missing files, so once the broken link is fixed you should be able to just download additional (missing?) files.

I made the following changes in the sourcecode (SelectPage.java, line 40 and 41):
from:
Code: [Select]
FreeSpaceOpenInstaller.download(txtfileurl, instdir + "Installer" + File.separator + filename);
sections.addAll(new InstallerSection(instdir, filename).getSections(auto, installedOnly));
to:
Code: [Select]
// An error might occur getting the file
try
{
FreeSpaceOpenInstaller.download(txtfileurl, instdir + "Installer" + File.separator + filename);
sections.addAll(new InstallerSection(instdir, filename).getSections(auto, installedOnly));
} catch(Exception e)
{ // if this happens, let the user decide wether he
// wants to continue without the resource
int selected = JOptionPane.showConfirmDialog(sectionspanel, "A resource file could not be found.\n" +
"(" + txtfileurl + ")\n\n" +
"Do you want to continue without the missing resources?\n" +
"The installation might not work, but missing " +
"files can be downloaded when the resource has been fixed.",
"An error occured",
JOptionPane.YES_NO_OPTION,
JOptionPane.QUESTION_MESSAGE);
if(selected == JOptionPane.YES_OPTION)
continue;
else
System.exit(0);
}

The .jar file is unchanged except of these few lines. Hope that helps.


Greetz,
Chris

[attachment deleted by admin]
Title: Re: FSO Installer Not Working
Post by: Chris_Ls on August 13, 2008, 03:55:40 pm
I just finished downloading and playing a first round...  :cool: So it works with the fixed installer. Just select "yes" (continue with installation) when it complains about missing resources and it will work.

Have fun!
Chris
Title: Re: FSO Installer Not Working
Post by: karajorma on August 15, 2008, 03:16:10 am
From the look of it, it's pointing at the webspace Turey had as a student. When he left Uni they probably deleted it. That URL should point somewhere on the FS2_Open installer site.