Author Topic: RELEASE: FreeSpace Open Installer, v2.3.2  (Read 184606 times)

0 Members and 1 Guest are viewing this topic.

Offline ace13

  • 23
Re: RELEASE: FreeSpace Open Installer, v2.1.8
What you could try doing is have the installer check for SSE2/SSE CPU support, as well as OS checks. So that instead of the 6-7 checkboxes per version you only have one; "FreeSpace Open 3.7.0" / "FreeSpace Open 3.7.2 RC4".
And then you could let the user access the other builds through a button on the side, next to the More Info button.

 

Offline chief1983

  • Still lacks a custom title
  • Moderator
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
Re: RELEASE: FreeSpace Open Installer, v2.1.8
Frm what I've seen, Java is intentionally isolated from hardware information.
Fate of the Galaxy - Now Hiring!  Apply within | Diaspora | SCP Home | Collada Importer for PCS2
Karajorma's 'How to report bugs' | Mantis
#freespace | #scp-swc | #diaspora | #SCP | #hard-light on EsperNet

"You may not sell or otherwise commercially exploit the source or things you created based on the source." -- Excerpt from FSO license, for reference

Nuclear1:  Jesus Christ zack you're a little too hamyurger for HLP right now...
iamzack:  i dont have hamynerge i just want ptatoc hips D:
redsniper:  Platonic hips?!
iamzack:  lays

 

Offline speedyR

  • 24
    • http://www.wz2100.de
Re: RELEASE: FreeSpace Open Installer, v2.1.8
Hello,
i'm coming back after a loooong time...
i tried elite dangerous but unfortunaly my old laptop can't handle it at the moment...
and... in the meantime until i get a better computer i wanted to play freespace open :-)
so i saw there's a new launcher and new mediavps around...

BUT the installer got problems to download alle the mediavps (2014 and 3.6.12) and some other mods/files to:
as an example:
Code: [Select]
java.io.IOException: Server returned HTTP response code: 403 for URL: http://mvp.fsmods.net/3612/MV_Root_3612.zip
strange is when i manually try to download it via firefox then no problem... ??
any idea/help?

 

Offline ngld

  • Administrator
  • 29
  • Knossos dev
Re: RELEASE: FreeSpace Open Installer, v2.1.8
There's not much you can do about this. You'll have to wait until Goober fixes it or you can try my fixed build.

@Goober: Here's a patch that changes the user agent. It should solve the 403 Forbidden errors.
Code: [Select]
Index: src/com/fsoinstaller/internet/Connector.java
===================================================================
--- src/com/fsoinstaller/internet/Connector.java (revision 11029)
+++ src/com/fsoinstaller/internet/Connector.java (working copy)
@@ -232,6 +232,9 @@
 
  // set the timeout (before we actually use it to connect)
  conn.setConnectTimeout(connectionTimeout);
+
+ // use Firefox's user agent to prevent 403 errors
+ conn.setRequestProperty("User-Agent", "Mozilla/5.0 (X11; Linux x86_64; rv:34.0) Gecko/20100101 Firefox/34.0");
 
  // ensure that we don't end up with an unexpected subclass
  if (!(conn instanceof HttpURLConnection))

 

Offline speedyR

  • 24
    • http://www.wz2100.de
Re: RELEASE: FreeSpace Open Installer, v2.1.8
works!
thanx!

 

Offline Cyborg17

  • 29
  • A-1 Supar
Re: RELEASE: FreeSpace Open Installer, v2.1.8
Incredible how that one line changes everything.

 
Re: RELEASE: FreeSpace Open Installer, v2.1.8
Ok guys i literally just signed up for this. My problem is when ever i try to download and install the files i get to the media VP's and it says "parent not installed :failed" can i please get some help i love this game and reallly want to improve the graphics of this game. ( ibought this game on steam is that a problem?)

 

Offline Goober5000

  • HLP Loremaster
  • Administrator
  • 214
    • Goober5000 Productions
Re: RELEASE: FreeSpace Open Installer, v2.1.8
I've uploaded version 2.1.9 with the following changes:

  • Spoofed the user agent when downloading files, per ngld's suggestion
  • Some changes for improving the launching of external programs such as InnoExtract
  • Additional HTTP verification, including checking that sites can return partial content, and checking the response codes when querying connection properties
  • Additional precondition checking

As with ngld's build, this should fix the problems with the mirrors.  There is no new InnoExtract build since the last installer version, but I should be able to implement a workaround for the paths-with-spaces issue.

 
Re: RELEASE: FreeSpace Open Installer, v2.1.8
I've uploaded version 2.1.9 with the following changes:

  • Spoofed the user agent when downloading files, per ngld's suggestion
  • Some changes for improving the launching of external programs such as InnoExtract
  • Additional HTTP verification, including checking that sites can return partial content, and checking the response codes when querying connection properties
  • Additional precondition checking

As with ngld's build, this should fix the problems with the mirrors.  There is no new InnoExtract build since the last installer version, but I should be able to implement a workaround for the paths-with-spaces issue.

All the mirrors appear to be working now! Thanks!

I'm still running into a few errors though.

Code: [Select]
2014-08-30 01:30:18,304 [pool-1-thread-1] INFO  com.fsoinstaller.utils.MiscUtils - Command to run: innoextract --quiet --list /home/andrew/Games/FreeSpace2/fs2.exe
2014-08-30 01:30:18,330 [pool-1-thread-1] ERROR com.fsoinstaller.wizard.InnoExtractTask - Could not obtain file listing using innoextract!
java.io.IOException: Cannot run program "innoextract --quiet --list /home/andrew/Games/FreeSpace2/fs2.exe" (in directory "/home/andrew/Games/FreeSpace2/56fb6500ba3b4ac3afa4446551b94dad/innoextract-1.4-linux"): error=2, No such file or directory

The command works when I run it manually using the version of InnoExtract in the Ubuntu repos.

I'm also getting the following download errors:
Code: [Select]
--
2014-08-30 01:30:23,068 [pool-1-thread-4] INFO  com.fsoinstaller.internet.Downloader - Downloading and extracting from file:/home/andrew/Games/FreeSpace2/fs2_open_3.7.2_RC4.tar to local directory /home/andrew/Games/FreeSpace2
2014-08-30 01:30:23,068 [pool-1-thread-4] ERROR com.fsoinstaller.wizard.InstallItem - Unexpected runtime exception while downloading!
java.lang.IllegalArgumentException: URL file:/home/andrew/Games/FreeSpace2/fs2_open_3.7.2_RC4.tar does not return an HttpURLConnection!
--
2014-08-30 01:30:27,551 [pool-1-thread-4] INFO  com.fsoinstaller.internet.Downloader - Downloading and extracting from file:/home/andrew/Games/FreeSpace2/fs2_open_3.7.2_RC4.tar to local directory /home/andrew/Games/FreeSpace2
2014-08-30 01:30:27,552 [pool-1-thread-4] ERROR com.fsoinstaller.wizard.InstallItem - Unexpected runtime exception while downloading!
java.lang.IllegalArgumentException: URL file:/home/andrew/Games/FreeSpace2/fs2_open_3.7.2_RC4.tar does not return an HttpURLConnection!
--
2014-08-30 01:30:32,136 [pool-1-thread-4] INFO  com.fsoinstaller.internet.Downloader - Downloading and extracting from file:/home/andrew/Games/FreeSpace2/fs2_open_3.7.2_RC4.tar to local directory /home/andrew/Games/FreeSpace2
2014-08-30 01:30:32,136 [pool-1-thread-4] ERROR com.fsoinstaller.wizard.InstallItem - Unexpected runtime exception while downloading!
java.lang.IllegalArgumentException: URL file:/home/andrew/Games/FreeSpace2/fs2_open_3.7.2_RC4.tar does not return an HttpURLConnection!

fs2_open_3.7.2_RC4.tar does seem to have been downloaded into the installation directory and I was able to extract it manually.

I attached the full log. Thanks a lot for your work on the Installer and let me know if I can help troubleshoot or test anything!

[attachment kidnapped by pirates]

  

Offline ngld

  • Administrator
  • 29
  • Knossos dev
Re: RELEASE: FreeSpace Open Installer, v2.1.9
@Goober: Didn't you fix the first issue? The command should be either "./innoextract --quiet --list /home/andrew/Games/FreeSpace2/fs2.exe" or "/home/andrew/Games/FreeSpace2/56fb6500ba3b4ac3afa4446551b94dad/innoextract-1.4-linux/innoextract --quiet --list /home/andrew/Games/FreeSpace2/fs2.exe".

The second error is caused by com.fsoinstaller.internet.Downloader. It tries to extract the local tar file with downloadFromArchive() which calls connector.getContentLength(). The connector (com.fsoinstaller.internet.Connector) however checks in openConnection() if the connection is an instance of HttpURLConnection which can never be the case for a file:/ URL...

EDIT: @andrwmorph: Can you try my fix? This should correct both bugs.
@Goober: Patch:
Code: [Select]
Index: src/com/fsoinstaller/internet/Connector.java
===================================================================
--- src/com/fsoinstaller/internet/Connector.java (revision 11036)
+++ src/com/fsoinstaller/internet/Connector.java (working copy)
@@ -245,6 +245,12 @@
 
  public int getContentLength(URL url) throws IOException
  {
+ // Quick bugfix
+ if(url.getProtocol().equals("file")) {
+ URLConnection conn = url.openConnection();
+ return conn.getContentLength();
+ }
+
  HttpURLConnection conn = openConnection(url);
  conn.setRequestMethod("HEAD");
  int length = conn.getContentLength();
Index: src/com/fsoinstaller/internet/Downloader.java
===================================================================
--- src/com/fsoinstaller/internet/Downloader.java (revision 11036)
+++ src/com/fsoinstaller/internet/Downloader.java (working copy)
@@ -600,6 +600,15 @@
  logger.warn("Could not close download stream!", ioe);
  }
  }
+
+ if (_sourceURL.getProtocol().equals("file")) {
+ // Just a local file...
+ logger.debug("Opening new local input stream...");
+
+ InputStream newInputStream = _sourceURL.openConnection().getInputStream();
+ newInputStream.skip(position);
+ return newInputStream;
+ }
 
  // open a new stream at the correct position
  // (the implementations of HttpURLConnection will cache and pool connections as needed)
Index: src/com/fsoinstaller/wizard/InnoExtractTask.java
===================================================================
--- src/com/fsoinstaller/wizard/InnoExtractTask.java (revision 11036)
+++ src/com/fsoinstaller/wizard/InnoExtractTask.java (working copy)
@@ -222,7 +222,7 @@
 
  // put together the args to list the files
  List<String> commands = new ArrayList<String>();
- commands.add(innoExtractExecutable.getName());
+ commands.add(innoExtractExecutable.getAbsolutePath());
  commands.add("--quiet");
  commands.add("--list");
  commands.add(MiscUtils.maybeQuotePath(gogInstallPackage.getAbsolutePath()));
@@ -249,7 +249,7 @@
 
  // put together the args to extract the files
  List<String> commands = new ArrayList<String>();
- commands.add(innoExtractExecutable.getName());
+ commands.add(innoExtractExecutable.getAbsolutePath());
  commands.add("--quiet");
  commands.add("--output-dir");
  commands.add(MiscUtils.maybeQuotePath(extractDir.getAbsolutePath()));

The fs2_open_3.* files have to be executable on Linux (run "chmod a+x fs2_open_3.*"), otherwise you won't be able to start them.
« Last Edit: August 30, 2014, 05:36:42 am by ngld »

 

Offline chief1983

  • Still lacks a custom title
  • Moderator
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
Re: RELEASE: FreeSpace Open Installer, v2.1.9
Awesome, i'd already reported the .tar bug to goober.  Was hoping to see that fixed before 3.7.2 final.  Now if only there was a freebsd binary of the 7zip jbindings...
Fate of the Galaxy - Now Hiring!  Apply within | Diaspora | SCP Home | Collada Importer for PCS2
Karajorma's 'How to report bugs' | Mantis
#freespace | #scp-swc | #diaspora | #SCP | #hard-light on EsperNet

"You may not sell or otherwise commercially exploit the source or things you created based on the source." -- Excerpt from FSO license, for reference

Nuclear1:  Jesus Christ zack you're a little too hamyurger for HLP right now...
iamzack:  i dont have hamynerge i just want ptatoc hips D:
redsniper:  Platonic hips?!
iamzack:  lays

 
Re: RELEASE: FreeSpace Open Installer, v2.1.9
@Goober: Didn't you fix the first issue? The command should be either "./innoextract --quiet --list /home/andrew/Games/FreeSpace2/fs2.exe" or "/home/andrew/Games/FreeSpace2/56fb6500ba3b4ac3afa4446551b94dad/innoextract-1.4-linux/innoextract --quiet --list /home/andrew/Games/FreeSpace2/fs2.exe".

The second error is caused by com.fsoinstaller.internet.Downloader. It tries to extract the local tar file with downloadFromArchive() which calls connector.getContentLength(). The connector (com.fsoinstaller.internet.Connector) however checks in openConnection() if the connection is an instance of HttpURLConnection which can never be the case for a file:/ URL...

EDIT: @andrwmorph: Can you try my fix? This should correct both bugs.
@Goober: Patch:
Code: [Select]
Index: src/com/fsoinstaller/internet/Connector.java
===================================================================
--- src/com/fsoinstaller/internet/Connector.java (revision 11036)
+++ src/com/fsoinstaller/internet/Connector.java (working copy)
@@ -245,6 +245,12 @@
 
  public int getContentLength(URL url) throws IOException
  {
+ // Quick bugfix
+ if(url.getProtocol().equals("file")) {
+ URLConnection conn = url.openConnection();
+ return conn.getContentLength();
+ }
+
  HttpURLConnection conn = openConnection(url);
  conn.setRequestMethod("HEAD");
  int length = conn.getContentLength();
Index: src/com/fsoinstaller/internet/Downloader.java
===================================================================
--- src/com/fsoinstaller/internet/Downloader.java (revision 11036)
+++ src/com/fsoinstaller/internet/Downloader.java (working copy)
@@ -600,6 +600,15 @@
  logger.warn("Could not close download stream!", ioe);
  }
  }
+
+ if (_sourceURL.getProtocol().equals("file")) {
+ // Just a local file...
+ logger.debug("Opening new local input stream...");
+
+ InputStream newInputStream = _sourceURL.openConnection().getInputStream();
+ newInputStream.skip(position);
+ return newInputStream;
+ }
 
  // open a new stream at the correct position
  // (the implementations of HttpURLConnection will cache and pool connections as needed)
Index: src/com/fsoinstaller/wizard/InnoExtractTask.java
===================================================================
--- src/com/fsoinstaller/wizard/InnoExtractTask.java (revision 11036)
+++ src/com/fsoinstaller/wizard/InnoExtractTask.java (working copy)
@@ -222,7 +222,7 @@
 
  // put together the args to list the files
  List<String> commands = new ArrayList<String>();
- commands.add(innoExtractExecutable.getName());
+ commands.add(innoExtractExecutable.getAbsolutePath());
  commands.add("--quiet");
  commands.add("--list");
  commands.add(MiscUtils.maybeQuotePath(gogInstallPackage.getAbsolutePath()));
@@ -249,7 +249,7 @@
 
  // put together the args to extract the files
  List<String> commands = new ArrayList<String>();
- commands.add(innoExtractExecutable.getName());
+ commands.add(innoExtractExecutable.getAbsolutePath());
  commands.add("--quiet");
  commands.add("--output-dir");
  commands.add(MiscUtils.maybeQuotePath(extractDir.getAbsolutePath()));

The fs2_open_3.* files have to be executable on Linux (run "chmod a+x fs2_open_3.*"), otherwise you won't be able to start them.

Your version does fix the issue with fs2_open_3.* but I'm still getting an error on the innoextract, even with the absolute path. I'm guessing that it might be an issue with the file permissions on the innoextract binary. I manually downloaded and extracted the zip from http://www.fsoinstaller.com/files/installer/java/innoextract-1.4-linux.zip and it does not have executable permissions by default.

Code: [Select]
-rw-rw-r-- 1 andrew andrew  499 Mar 11  2013 innoextract

Code: [Select]
2014-08-30 13:17:31,505 [pool-1-thread-1] INFO  com.fsoinstaller.utils.MiscUtils - Command to run: /home/andrew/Games/FreeSpace2/53f2da46204744d399f397995267b0c4/innoextract-1.4-linux/innoextract --quiet --list /home/andrew/Games/FreeSpace2/fs2.exe
2014-08-30 13:17:31,543 [pool-1-thread-1] ERROR com.fsoinstaller.wizard.InnoExtractTask - Could not obtain file listing using innoextract!
java.io.IOException: Cannot run program "/home/andrew/Games/FreeSpace2/53f2da46204744d399f397995267b0c4/innoextract-1.4-linux/innoextract --quiet --list /home/andrew/Games/FreeSpace2/fs2.exe" (in directory "/home/andrew/Games/FreeSpace2/53f2da46204744d399f397995267b0c4/innoextract-1.4-linux"): error=2, No such file or directory

 

Offline Goober5000

  • HLP Loremaster
  • Administrator
  • 214
    • Goober5000 Productions
Re: RELEASE: FreeSpace Open Installer, v2.1.9
@Goober: Didn't you fix the first issue? The command should be either "./innoextract --quiet --list /home/andrew/Games/FreeSpace2/fs2.exe" or "/home/andrew/Games/FreeSpace2/56fb6500ba3b4ac3afa4446551b94dad/innoextract-1.4-linux/innoextract --quiet --list /home/andrew/Games/FreeSpace2/fs2.exe".

I fixed it using PATH... but that apparently didn't work in all situations.  I've rewritten the code to specify the full path when it's running on Linux. 


Awesome, i'd already reported the .tar bug to goober.  Was hoping to see that fixed before 3.7.2 final.  Now if only there was a freebsd binary of the 7zip jbindings...

Yes, looks like this is the same issue that you reported in your PMs.  I was confused because I had fixed the .tar issue already, but fixing another issue caused it to reappear because Java doesn't use HttpURLConnection to access files on the file system.


Anyway, I have fixed all these issues in SVN -- thanks ngld for the patch suggestions -- and I've uploaded a new version here: http://staff.hard-light.net/goober5000/temp/FreeSpaceOpenInstaller.jar

This should also fix the one remaining unaddressed issue that andrwmorph encountered:

Your version does fix the issue with fs2_open_3.* but I'm still getting an error on the innoextract, even with the absolute path. I'm guessing that it might be an issue with the file permissions on the innoextract binary. I manually downloaded and extracted the zip from http://www.fsoinstaller.com/files/installer/java/innoextract-1.4-linux.zip and it does not have executable permissions by default.

I suspect you're right.  The linked build tries to run "chmod a+x" on the file before running it.  Download it and see if it makes any difference.

 
Re: RELEASE: FreeSpace Open Installer, v2.1.9
I suspect you're right.  The linked build tries to run "chmod a+x" on the file before running it.  Download it and see if it makes any difference.

Thanks for the update! I'm getting an error on the chmod. You might need to do /bin/chmod a+x ./innoextract
You also might be able to set the permissions with setPosixFilePermissions(Path path, Set perms) but my Java is pretty rusty

Code: [Select]
2014-09-01 23:22:15,475 [pool-1-thread-1] INFO  com.fsoinstaller.utils.MiscUtils - chmod a+x innoextract
2014-09-01 23:22:15,493 [pool-1-thread-1] ERROR com.fsoinstaller.wizard.InnoExtractTask - Could not obtain file listing using innoextract!
java.io.IOException: Cannot run program "chmod a+x innoextract" (in directory "/home/andrew/Games/FreeSpace2/3cb61dfbce8a4a0e86ebfd90660ee1fd/innoextract-1.4-linux"): error=2, No such file or directory

 

Offline Goober5000

  • HLP Loremaster
  • Administrator
  • 214
    • Goober5000 Productions
Re: RELEASE: FreeSpace Open Installer, v2.1.9
Okay, I changed it to /bin/chmod (and made a few other bugfixes).  Try the new jar:
http://staff.hard-light.net/goober5000/temp/FreeSpaceOpenInstaller.jar

 
Re: RELEASE: FreeSpace Open Installer, v2.1.9
Okay, I changed it to /bin/chmod (and made a few other bugfixes).  Try the new jar:
http://staff.hard-light.net/goober5000/temp/FreeSpaceOpenInstaller.jar

I got the same error:
Code: [Select]
java.io.IOException: Cannot run program "/bin/chmod a+x innoextract" (in directory "/home/andrew/Games/FreeSpace2/bcd8754aeb6748a09f3395e43dd728d4/innoextract-1.4-linux"): error=2, No such file or directory
I'm thinking that you might need the full path for innoextract when running the chmod. Adding a ./ in front might work too (./innoextract) to refer to the innoextract in the current directory

 

Offline Goober5000

  • HLP Loremaster
  • Administrator
  • 214
    • Goober5000 Productions
Re: RELEASE: FreeSpace Open Installer, v2.1.9
Again?  Ugh.  Okay, new jar updated, same link.

 

Offline niffiwan

  • 211
  • Eluder Class
Re: RELEASE: FreeSpace Open Installer, v2.1.9
Okay, I changed it to /bin/chmod (and made a few other bugfixes).

What if chmod isn't in /bin? Can java grab the current PATH variable and use that?
Creating a fs2_open.log | Red Alert Bug = Hex Edit | MediaVPs 2014: Bigger HUD gauges | 32bit libs for 64bit Ubuntu
----
Debian Packages (testing/unstable): Freespace2 | wxLauncher
----
m|m: I think I'm suffering from Stockholm syndrome. Bmpman is starting to make sense and it's actually written reasonably well...

 

Offline Goober5000

  • HLP Loremaster
  • Administrator
  • 214
    • Goober5000 Productions
Re: RELEASE: FreeSpace Open Installer, v2.1.9
The PATH solution didn't work when I tried adding innoextract to the path.  I'm not optimistic.

I changed it back to just chmod in the most recently linked build, in hopes that the "missing file" error referred to innoextract and not chmod.

 
Re: RELEASE: FreeSpace Open Installer, v2.1.9
Again?  Ugh.  Okay, new jar updated, same link.

Same issue. I looked at the zip file again since everything looked good with the command and it looks like setting the permissions on the innoextract file is not enough as that file is just a script that launches the appropriate innoextract binary for your system architecture.

Code: [Select]
[email protected] ~/Games/FreeSpace2/innoextract-1.4-linux $ chmod a+x innoextract
[email protected] ~/Games/FreeSpace2/innoextract-1.4-linux $ ./innoextract
./innoextract: 20: exec: /home/andrew/Games/FreeSpace2/innoextract-1.4-linux/bin/amd64/innoextract: Permission denied

chmod a+x bin/amd64/innoextract
[email protected] ~/Games/FreeSpace2/innoextract-1.4-linux $ ./innoextract
./innoextract: no input files specified
Try the --help (-h) option for usage information.

You could do a
Code: [Select]
chmod a+x innoextract bin/*/innoextract if you can use wildcards or a
Code: [Select]
chmod a+x innoextract bin/armv6j-hardfloat/innoextract bin/amd64/innoextract bin/i686/innoextract if you can't.