Author Topic: [Cross-platform] FS2 GOG/Mod installer  (Read 40228 times)

0 Members and 1 Guest are viewing this topic.

Offline ngld

  • Administrator
  • 29
  • Knossos dev
Re: [Cross-platform] FS2 GOG/Mod installer
The Nebula also supports http://fsmods.net/download.php... and http://mediafire.com/... links, now. MediaFire might ask you to solve a captcha, though, depending on whether they feel like the nebula server downloads too much.
The Nebula's mirror works but it doesn't delete old files, that's still on the TODO list.

I've implemented a solution to the -mod flag problem but it only works as long as all dependencies are in the Nebula. Once one dependency disappears from the Nebula, it might not be loaded correctly.
The mod tree in Knossos now looks like this:


If anyone has a better idea how I should display the other versions, I'd be glad to implement it. Hellzed already suggested dropping the "Other versions" node and displaying the versions on the same level as the features. He also suggested an option to hide the other versions.

 

Offline mjn.mixael

  • Cutscene Master
  • 212
  • Anims: 420, Cutscenes: 10, Mainhalls: 7, Logos: 52
    • Steam
    • Twitter
    • Mix-Hai Productions
Re: [Cross-platform] FS2 GOG/Mod installer
No, definitely keep the Other Versions node. It makes it clear that it's not part of the main mod download.
Cutscene Upgrade Project - Mainhall Remakes - MixaelANITools - Between the Ashes - MjnMixael's Render Boutique - Mix-Hai Productions
Youtube Channel - P3D Model Box - Photobucket Albums - Model Releases - Downloads
Between the Ashes is looking for committed testers, PM me for details.
Report MediaVP issues, now on the MediaVP Mantis! Read all about it Here!

 

Offline Hellzed

  • 28
Re: [Cross-platform] FS2 GOG/Mod installer
I'll see what I can do regarding dependencies dynamic re-ordering, but I may go with an optional "priority" field at the moment (this field would be a matter of minutes to add to the dep object, while reordering implies changing the JS and make sure it doesn't interact in a bad way with the current field index management, which is already a bit trickier than in looks).

Last night, I was stuck with an annoying form binding issue (all down to a typo that didn't cause a crash right away, so it went unnoticed and just filled one of the fields with a null when it shouldn't have...), so the build transfer commit was delayed. It's now fixed, I still have to push it.

@ngld : You might check the JSON converter version number handling, it breaks if i add it some metadata :
Code: [Select]
INFO: Parsing repo...
ERROR: Failed to parse version for Mod "MediaVPs 2014 (Nebula test)"! (Invalid version string: '3.7.1+nebula_test2')
ERROR: No mods found!

EDIT : Well, that's what i get when I try to convert MediaVPs 2014 (check my branch to for the data), even without the metadata.
Code: [Select]
INFO: Parsing repo...
ERROR: Failed to perform conversion!

Found it ! If i pass a null in an action "dest", it fails instead of assuming we are using the mod folder root. I can fix that on my side by changing it to whatever doesn't cause Knossos server not to fail (empty string ?)
« Last Edit: October 15, 2014, 04:24:15 pm by Hellzed »

 

Offline ngld

  • Administrator
  • 29
  • Knossos dev
Re: [Cross-platform] FS2 GOG/Mod installer
The dependency re-ordering isn't the most important thing right now because we still have to figure out how we're going to replace the primarylist part of the mod.ini.

@ngld : You might check the JSON converter version number handling, it breaks if i add it some metadata :

The version number handling is correct according to semver.org:
Quote
Build metadata MAY be denoted by appending a plus sign and a series of dot separated identifiers immediately following the patch or pre-release version. Identifiers MUST comprise only ASCII alphanumerics and hyphen [0-9A-Za-z-]. Identifiers MUST NOT be empty. Build metadata SHOULD be ignored when determining version precedence. Thus two versions that differ only in the build metadata, have the same precedence. Examples: 1.0.0-alpha+001, 1.0.0+20130313144700, 1.0.0-beta+exp.sha.5114f85.
Only [0-9A-Za-z-] are allowed, no underscores. If you remove the underscore and replace it with a hyphen, it works.

EDIT : Well, that's what i get when I try to convert MediaVPs 2014 (check my branch to for the data), even without the metadata.
Code: [Select]
INFO: Parsing repo...
ERROR: Failed to perform conversion!

Found it ! If i pass a null in an action "dest", it fails instead of assuming we are using the mod folder root. I can fix that on my side by changing it to whatever doesn't cause Knossos server not to fail (empty string ?)
Yes, you should pass either an empty string or no value at all.

 

Offline Hellzed

  • 28
Re: [Cross-platform] FS2 GOG/Mod installer
About semver, sorry, my bad ! I'll change my regexp.
EDIT : the regex was compliant with semver, but the line was commented. XD
EDIT 2 : Commented and in the wrong place. I must have been tired. It will be fixed with next push.

Can you take a look at this build ? http://nebula.tproxy.de/nebula/hellzed/mediavps_2014/master/3.7.7/show_data
It failed, and I don't understand why.

NEBULA UPDATE : Build transfer (it's actually a copy across branches of the same mod, and we don't remove the source build) ! And some small fixes.
« Last Edit: October 15, 2014, 08:26:02 pm by Hellzed »

 

Offline ngld

  • Administrator
  • 29
  • Knossos dev
Re: [Cross-platform] FS2 GOG/Mod installer
I've fixed a few bugs in Knossos-server which might've been related to your problem. Can you try again, please?
I've also updated the server to the newest nebula verison. I've got one smal nit-pick: When someone transfers a build, could you please exclude the source branch from the destination list?

 

Offline Hellzed

  • 28
Re: [Cross-platform] FS2 GOG/Mod installer
Latest git commit excludes current branch from the build transfer form. :)

I' will try to run the conversion again later tonight.

 

Offline Hellzed

  • 28
Re: [Cross-platform] FS2 GOG/Mod installer
I'm running into a bug while trying to launch mediavps_2014 with the latest version of Knossos : an empty
Code: [Select]
-mod '' argument is added each time I use "Launch" or "Settings", so the game fails to launch and complains about the empty argument.

If I add some random string as a value for this flags, the game launches with mediavps_2014.

EDIT : I think Knossos should add the -keyboard_layout "qwertz" flag when a German locale is detected, and -keyboard_layout "azerty" when a French locale is detected.
« Last Edit: October 16, 2014, 04:45:59 pm by Hellzed »

 

Offline niffiwan

  • 211
  • Eluder Class
Re: [Cross-platform] FS2 GOG/Mod installer
EDIT : I think Knossos should add the -keyboard_layout "qwertz" flag when a German locale is detected, and -keyboard_layout "azerty" when a French locale is detected.

I'm don't know if auto-enabling this without warning is a great idea. Maybe have it "appear" as a suggestion/recommendation when the appropriate locale is detected? Or at least provide an obvious way to disable it just in care someone has that locale set but has a different keyboard?
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 Hellzed

  • 28
Re: [Cross-platform] FS2 GOG/Mod installer
@niffiwan : Yes, changing this has to be easy enough.
I'm not sure about this on Windows, but without this flag on Linux, "qwertz" and "azerty" layouts are broken in fs2_open. Keys "1" to "0" and some others can't be used (no comms !).
People from GSA and Belgium/France actually use these layouts, and it's unlikely to find people using a "qwerty" layout in these areas.

(interestingly, French speaking parts of CH mostly use "qwertz" layouts, while "qwerty" is used QC.)

 

Offline niffiwan

  • 211
  • Eluder Class
Re: [Cross-platform] FS2 GOG/Mod installer
Yes it would be good to have the -keyboard_layout flag be more widely known in order to fix those keyboard issues, and it seems that you'd already thought about my concern so its all good :) (the flexibility is something important to me since I use the non-standard Colemak layout on a qwerty keyboard, so I like to be able to tweak those sort of settings)
 
By the way, what would the French speaking parts of Canada normally have as a keyboard layout?

edit: typo
« Last Edit: October 17, 2014, 02:48:26 am by niffiwan »
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 m!m

  • 211
Re: [Cross-platform] FS2 GOG/Mod installer
As far as I know -keyboard_layout isn't used on windows as that switch is only used to initialize the SDL to FS2 key map on linux. When SDL2 is eventually used on all platforms then it will probably be supported but when that happens it shouldn't be a problem to implement automatic detection of the keyboard layout.
I guess enabling it for Linux/MacOS is probably a good idea.

 

Offline ngld

  • Administrator
  • 29
  • Knossos dev
Re: [Cross-platform] FS2 GOG/Mod installer
I'll add a combo box to the "FSO Settings" tab where you can select either "qwerty", "qwertz" or "azerty". The combo box will be hidden if the user isn't on Linux.
I wonder if I should use the "-keyboard_layout" or just run "setxkbmap -layout us" to change the layout. (If I use setxkbmap, I'd change the layout back after FSO exits.)
The setxkbmap method actually changes the system's keyboard layout to qwerty. All keyboard layouts should be supported that way. If I'd use "-keyboard_layout", at least the qwertz layout is broken. (The mapping and labling of the Z and Y keys are confusing.)

The bug with "-mod ''" has been fixed.

 

Offline Hellzed

  • 28
Re: [Cross-platform] FS2 GOG/Mod installer
I've just implemented some basic teamwork features, and I can confirm : no database issues so far, team owned mods behave exactly like modder owned mods.
I still have to make a few more changes to some templates, ensure everything is ok with security and team deletion, and I'll push the changes, probably on Tuesday.

 

Offline m!m

  • 211
Re: [Cross-platform] FS2 GOG/Mod installer
@ngld: Do you have a list of commands that should be supported by the fso:// handler?
I looked through your code and I have found the following:
  • focus: Activates the main window
  • mode: Apparently switched the UI mode, this looks like a command specific to fs2mod-py
  • run: Presumably takes the ID of a mod and tries to install and run it
  • install: Takes the ID of a mod and tries to install it
  • settings: Opens the settings window either for the global options or for a specific mod
Did I miss something?

 

Offline ngld

  • Administrator
  • 29
  • Knossos dev
Re: [Cross-platform] FS2 GOG/Mod installer
@m!m: I didn't have a list, so I wrote this documentation just for you! :P
No, you didn't miss anything. Did you read the mod.json schema?

I've implemented both the "-keyboard_layout" flag and the "setxkbmap" method for Linux.
I'll probably implement a proper "Update available!" notice and Windows integration tonight. The integration will display the progress bar in the task bar.

 

Offline m!m

  • 211
Re: [Cross-platform] FS2 GOG/Mod installer
@m!m: I didn't have a list, so I wrote this documentation just for you! :P
No, you didn't miss anything. Did you read the mod.json schema?
Thanks for the documentation!
The mod.json schema looks good, one small point I would like to add is the ability to also specify an URL instead of a local path for the logo specification. I have implemented a caching mechanism that simplifies a lot of things for me but that requires to have the URL to the image.

 

Offline Hellzed

  • 28
Re: [Cross-platform] FS2 GOG/Mod installer
I still have a few issues in the "Teams" code, but I'll update the repository really soon !

 

Offline Hellzed

  • 28
Re: [Cross-platform] FS2 GOG/Mod installer
@ngld : I don't know if you still need the information, but for the Unity integration to work, you need a .desktop file in ~/.local/share/applications

The current (broken) one looks like :
Code: [Select]
[Desktop Entry]
Name=fs2mod-py
Exec=/usr/bin/python3 /home/loris/knossos-develop/lib/api.py %U
Icon=/home/loris/knossos-develop/lib/hlp.png
Type=Application
Terminal=false
MimeType=x-scheme-handler/fso;

Also, most of our settings windows don't fit on my 768px height screen ! I have spent some time reading Gnome/Qt/Windows official guidelines, and found some interesting things to help reorganize the UI.

 

Offline Hellzed

  • 28
Re: [Cross-platform] FS2 GOG/Mod installer
I found how to make Knossos look native on Ubuntu (with Unity), or any GTK3 window manager ! Not exactly easy, though, because Qt uses GTK2 themes, while some of the widget styles we need are found in GTK3...

1) The window has to be borderless (we have to get rid of the 9px margins around "centralwidget"). It will probably look better on OS X, and Windows adds its own window borders anyway !
2) The Horizontal Layout which contains "settingsButton", "listControls", "pageControls" and a horizontal spacer has to be converted to a QFrame. By default, that will not change anything on other platforms.
3) Now, If we detect a GTK3 WM (Unity or Gnome-shell) with a known theme (having Gnome-shell default theme, Radiance and Ambiance would be good enough), we load a Qt CSS stylesheet and apply it to the QFrame to mimic GTK3 "Primary Toolbar" widget.

I'm still searching for the most simple and reliable way to detect the theme in 3). I'm also searching for the exact CSS values I need, and GTK3 themes are not exactly the easiest kind of CSS to read.

EDIT : Nailed it ! I have a Qt style sheet that gives Knossos a native look on Ubuntu's default Ambiance theme. (see 2nd screenshot)

EDIT 2 : Updated to Symfony 2.5.6 and latest FoSUB... I had to fix user management because they made some changes to their namespaces, and moved classes around...

[attachment kidnapped by pirates]
« Last Edit: October 26, 2014, 10:57:47 am by Hellzed »