Author Topic: RELEASE: FreeSpace Open Installer, v2.3.1  (Read 178518 times)

0 Members and 1 Guest are viewing this topic.

Offline AdmiralRalwood

  • 211
  • The Cthulhu programmer himself!
    • Skype
    • Steam
    • Twitter
Re: RELEASE: FreeSpace Open Installer, v2.1.9
I think something more along these lines would be preferable:
You also might be able to set the permissions with setPosixFilePermissions(Path path, Set perms) but my Java is pretty rusty
Unfortunately, my Java is also very rusty.
Ph'nglui mglw'nafh Codethulhu GitHub wgah'nagl fhtagn.

schrödinbug (noun) - a bug that manifests itself in running software after a programmer notices that the code should never have worked in the first place.

When you gaze long into BMPMAN, BMPMAN also gazes into you.

"I am one of the best FREDders on Earth" -General Battuta

<Aesaar> literary criticism is vladimir putin

<MageKing17> "There's probably a reason the code is the way it is" is a very dangerous line of thought. :P
<MageKing17> Because the "reason" often turns out to be "nobody noticed it was wrong".
(the very next day)
<MageKing17> this ****ing code did it to me again
<MageKing17> "That doesn't really make sense to me, but I'll assume it was being done for a reason."
<MageKing17> **** ME
<MageKing17> THE REASON IS PEOPLE ARE STUPID
<MageKing17> ESPECIALLY ME

<MageKing17> God damn, I do not understand how this is breaking.
<MageKing17> Everything points to "this should work fine", and yet it's clearly not working.
<MjnMixael> 2 hours later... "God damn, how did this ever work at all?!"
(...)
<MageKing17> so
<MageKing17> more than two hours
<MageKing17> but once again we have reached the inevitable conclusion
<MageKing17> How did this code ever work in the first place!?

<@The_E> Welcome to OpenGL, where standards compliance is optional, and error reporting inconsistent

<MageKing17> It was all working perfectly until I actually tried it on an actual mission.

<IronWorks> I am useful for FSO stuff again. This is a red-letter day!
* z64555 erases "Thursday" and rewrites it in red ink

<MageKing17> TIL the entire homing code is held up by shoestrings and duct tape, basically.

 

Offline Goober5000

  • HLP Loremaster
  • Administrator
  • 214
    • Goober5000 Productions
Re: RELEASE: FreeSpace Open Installer, v2.1.9
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.

Good thinking.  I created a new build with your wildcard statement.  Try the new build, same link.


I think something more along these lines would be preferable:
You also might be able to set the permissions with setPosixFilePermissions(Path path, Set perms) but my Java is pretty rusty
Unfortunately, my Java is also very rusty.

That requires Java 1.7.  The FSOInstaller needs to be compatible with Java 1.5.

 

Offline jr2

  • The Mail Man
  • 212
  • It's prounounced jayartoo 0x6A7232
    • Steam
Re: RELEASE: FreeSpace Open Installer, v2.1.9
Por que?

 
Re: RELEASE: FreeSpace Open Installer, v2.1.9
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.

Good thinking.  I created a new build with your wildcard statement.  Try the new build, same link.


Strangely I'm still getting
Code: [Select]
java.io.IOException: Cannot run program "chmod a+x innoextract" (in directory "/home/andrew/Games/FreeSpace2/132efef5f7894fa4927f9f86d612e3d2/innoextract-1.4-linux"): error=2, No such file or directory

Maybe it needs the full path to the innoextract binaries? It really seems like it should be working since the working directory is correct.

I crated a watch on the FreeSpace2 directory while running the jar to verify that the folder names are all correct and they look good.

Code: [Select]
total  access  modify  attrib  close_write  close_nowrite  open  create  delete  delete_self  filename
1138   1088    37      1       2            2              4     1       1       1            ./132efef5f7894fa4927f9f86d612e3d2/innoextract-1.4-linux/bin/armv6j-hardfloat/
1065   1019    33      1       2            2              4     1       1       1            ./132efef5f7894fa4927f9f86d612e3d2/innoextract-1.4-linux/bin/amd64/
980    936     31      1       2            2              4     1       1       1            ./132efef5f7894fa4927f9f86d612e3d2/innoextract-1.4-linux/bin/i686/
68     0       15      7       14           1              15    7       7       1            ./132efef5f7894fa4927f9f86d612e3d2/innoextract-1.4-linux/license/
58     1       8       4       8            7              15    6       7       1            ./132efef5f7894fa4927f9f86d612e3d2/innoextract-1.4-linux/
19     0       0       0       0            6              6     2       3       1            ./132efef5f7894fa4927f9f86d612e3d2/innoextract-1.4-linux/bin/
18     0       0       0       1            6              7     2       2       0            ./
13     0       2       1       2            1              3     1       1       1            ./132efef5f7894fa4927f9f86d612e3d2/innoextract-1.4-linux/doc/
10     0       0       0       0            3              3     1       1       1            ./132efef5f7894fa4927f9f86d612e3d2/

 

Offline Goober5000

  • HLP Loremaster
  • Administrator
  • 214
    • Goober5000 Productions
Re: RELEASE: FreeSpace Open Installer, v2.1.9
Are there any ExternalProcess*.log files created?  They should contain the stdout and stderr of the chmod command.

 
Re: RELEASE: FreeSpace Open Installer, v2.1.9
Are there any ExternalProcess*.log files created?  They should contain the stdout and stderr of the chmod command.

I don't see any in the logs directory (or in /tmp)

I have these logs:
Code: [Select]
-rw-rw-r-- 1 andrew andrew   235 Sep  2 04:02 2014_FSU_MediaVPs.log
-rw-rw-r-- 1 andrew andrew   235 Sep  2 04:02 2014_FSU_MediaVPs.MV_Assets.log
-rw-rw-r-- 1 andrew andrew   235 Sep  2 04:02 2014_FSU_MediaVPs.MV_Effects.log
-rw-rw-r-- 1 andrew andrew   235 Sep  2 04:02 FreeSpace_Open_3.7.0_Linux.log
-rw-rw-r-- 1 andrew andrew   235 Sep  2 04:02 FreeSpace_Open_3.7.2_RC4_Linux.log
-rw-rw-r-- 1 andrew andrew 78465 Sep  2 04:02 fsoinstaller.log
-rw-rw-r-- 1 andrew andrew   281 Sep  2 04:02 Install_FreeSpace_2_from_GOG_package.Copy_GOG_cutscenes_to_the_data_directory_used_by_FreeSpace_Open.log
-rw-rw-r-- 1 andrew andrew  2763 Sep  2 04:02 Install_FreeSpace_2_from_GOG_package.log
-rw-rw-r-- 1 andrew andrew   235 Sep  2 04:02 Multiplayer_Missions.log

 

Offline Goober5000

  • HLP Loremaster
  • Administrator
  • 214
    • Goober5000 Productions
Re: RELEASE: FreeSpace Open Installer, v2.1.9
I figured out what happened.  ProcessBuilder is interpreting the entire string "chmod a+x innoextract" as the name of a program.  It needs to be broken up into a string array before it can work.

This is another difference between Windows and Linux.  Now I'm beginning to understand the Java critics who label it as "write everywhere, run everywhere". :)

 

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
To be fair, you're trying to call platform-specific binary code _from_ Java.  That it's not trivial to do is more of a feature I bet, if you ask most Java devs :p
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 niffiwan

  • 211
  • Eluder Class
Re: RELEASE: FreeSpace Open Installer, v2.1.9
Now I'm beginning to understand the Java critics who label it as "write everywhere, run everywhere". :)

Bah! Those critics are mild, I usually hear "write once, crash everywhere" :p
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
Here's another build:
http://staff.hard-light.net/goober5000/temp/FreeSpaceOpenInstaller.jar

See if it works on Linux.  It still works on Windows, so at least nothing regressed...

 

Offline jr2

  • The Mail Man
  • 212
  • It's prounounced jayartoo 0x6A7232
    • Steam
Re: RELEASE: FreeSpace Open Installer, v2.1.9
Just curious,  Goober, but why u no dual-boot Ubuntu? Or Mint, you would probably like Mint better.

 
Re: RELEASE: FreeSpace Open Installer, v2.1.9
I'm not getting any errors anymore  ;7

Unfortunately the installer also seems to be hanging at the extraction step.
Copy GOG cutscenes to the data directory used by FreeSpace Open has been stuck at "Waiting to begin..." for ~1 hour.

End of log:
Code: [Select]
2014-09-02 23:44:53,869 [pool-1-thread-3] INFO  com.fsoinstaller.wizard.InstallItem - File 'innoextract-1.4-linux.zip' was successful
2014-09-02 23:44:53,869 [pool-1-thread-3] INFO  com.fsoinstaller.wizard.InstallItem - This marks 1 file out of 1
2014-09-02 23:44:53,869 [pool-1-thread-1] INFO  com.fsoinstaller.wizard.InstallItem - All files have completed!
2014-09-02 23:44:53,869 [pool-1-thread-1] INFO  com.fsoinstaller.wizard.InstallItem - This marks 1 successful out of 1
2014-09-02 23:44:53,869 [pool-1-thread-1] INFO  com.fsoinstaller.wizard.InstallItem - Processing HASH items
2014-09-02 23:44:53,870 [pool-1-thread-1] INFO  com.fsoinstaller.wizard.InstallItem - Computing a SHA-1 hash for 'innoextract-1.4-linux/innoextract'
2014-09-02 23:44:53,870 [pool-1-thread-1] INFO  com.fsoinstaller.wizard.InstallItem - Computing a SHA-1 hash for 'innoextract-1.4-linux/bin/amd64/innoextract'
2014-09-02 23:44:53,915 [pool-1-thread-1] INFO  com.fsoinstaller.wizard.InstallItem - Computing a SHA-1 hash for 'innoextract-1.4-linux/bin/armv6j-hardfloat/innoextract'
2014-09-02 23:44:53,925 [pool-1-thread-1] INFO  com.fsoinstaller.wizard.InstallItem - Computing a SHA-1 hash for 'innoextract-1.4-linux/bin/i686/innoextract'
2014-09-02 23:44:53,934 [pool-1-thread-1] INFO  com.fsoinstaller.wizard.InstallItem - There were no invalid hashes.
2014-09-02 23:44:54,268 [AWT-EventQueue-0] INFO  com.fsoinstaller.wizard.InstallItem - Processing is complete; alerting listeners...
2014-09-02 23:44:54,269 [AWT-EventQueue-0] INFO  com.fsoinstaller.wizard.InstallItem - Processing is complete; alerting listeners...
2014-09-02 23:44:54,270 [AWT-EventQueue-0] INFO  com.fsoinstaller.wizard.InstallItem - Processing is complete; alerting listeners...
2014-09-02 23:44:54,270 [AWT-EventQueue-0] INFO  com.fsoinstaller.wizard.InstallItem - Starting task!
2014-09-02 23:44:54,271 [AWT-EventQueue-0] INFO  com.fsoinstaller.wizard.InstallItem - Starting task!
2014-09-02 23:44:54,959 [AWT-EventQueue-0] INFO  com.fsoinstaller.wizard.InstallItem - Processing is complete; alerting listeners...
2014-09-02 23:44:54,959 [AWT-EventQueue-0] INFO  com.fsoinstaller.wizard.InstallItem - Processing is complete; alerting listeners...
2014-09-02 23:44:54,962 [AWT-EventQueue-0] INFO  com.fsoinstaller.wizard.InstallItem - Processing is complete; alerting listeners...


 

Offline Goober5000

  • HLP Loremaster
  • Administrator
  • 214
    • Goober5000 Productions
Re: RELEASE: FreeSpace Open Installer, v2.1.9
Just curious,  Goober, but why u no dual-boot Ubuntu? Or Mint, you would probably like Mint better.

Because I used to have a spare laptop that ran Linux, and it died.  Getting another laptop with Linux is on my to-do list.


I'm not getting any errors anymore  ;7

Unfortunately the installer also seems to be hanging at the extraction step.
Copy GOG cutscenes to the data directory used by FreeSpace Open has been stuck at "Waiting to begin..." for ~1 hour.

Can you zip up and attach your entire logs folder?

 
Re: RELEASE: FreeSpace Open Installer, v2.1.9

I'm not getting any errors anymore  ;7

Unfortunately the installer also seems to be hanging at the extraction step.
Copy GOG cutscenes to the data directory used by FreeSpace Open has been stuck at "Waiting to begin..." for ~1 hour.

Can you zip up and attach your entire logs folder?

Sure! I cancelled the installation after letting it run for a bit with no progress.

[attachment kidnapped by pirates]

 

Offline Goober5000

  • HLP Loremaster
  • Administrator
  • 214
    • Goober5000 Productions
Re: RELEASE: FreeSpace Open Installer, v2.1.9
Well this is perplexing.  I've added some more logging statements; please delete your logs folder and try again.  If it hangs, attach the log folder again:
http://staff.hard-light.net/goober5000/temp/FreeSpaceOpenInstaller.jar

 
Re: RELEASE: FreeSpace Open Installer, v2.1.9
Well this is perplexing.  I've added some more logging statements; please delete your logs folder and try again.  If it hangs, attach the log folder again:
http://staff.hard-light.net/goober5000/temp/FreeSpaceOpenInstaller.jar

Attached. It looks like the recursive chmod might be failing. Java might not be expanding wildcards. You could do chmod -R +x bin to just make everything in the bin directory executable.

[attachment kidnapped by pirates]

 

Offline Goober5000

  • HLP Loremaster
  • Administrator
  • 214
    • Goober5000 Productions
Re: RELEASE: FreeSpace Open Installer, v2.1.9
I used a manual recursive traversal instead of calling chmod with wildcards.

And my hunch was proven correct. :sigh:  When you list a directory's contents on Linux, the list includes the same directory as one of its children.  So it just keeps checking the same directory over and over and never exits.  If you had waited for another few hours, you probably would have gotten a stack overflow.

I'll have to go through the code and fix all the other instances of recursive file traversing.

EDIT: Ignore what I said.  I just made a typo in the function which I didn't catch when I proofread it.  I blame lack of sleep. :)
« Last Edit: September 04, 2014, 10:49:25 am by Goober5000 »

 

Offline Goober5000

  • HLP Loremaster
  • Administrator
  • 214
    • Goober5000 Productions
Re: RELEASE: FreeSpace Open Installer, v2.1.9
New jar, same link.  InnoExtract task should complete this time.  Please also check that the directory with the UUID name is properly deleted when it finishes.

 
Re: RELEASE: FreeSpace Open Installer, v2.1.9


It worked! Thanks a lot!

As far as the directory, it was not deleted but it is empty. Close enough!

 

Offline Goober5000

  • HLP Loremaster
  • Administrator
  • 214
    • Goober5000 Productions
Re: RELEASE: FreeSpace Open Installer, v2.1.9
It worked! Thanks a lot!

Great!  You're welcome. :)


Quote
As far as the directory, it was not deleted but it is empty. Close enough!

Not quite close enough for me. :D

But maybe not a problem either.  Make sure it is the same directory that was created during the most recent attempt.  It's possible that, during the failed attempts in the last few days, some UUID directories were created and then failed to be deleted.

EDIT: Bah, I know what happened.  That'll be fixed in the next commit.