Author Topic: Internet Browser in FSO WIP (+Test builds)  (Read 15949 times)

0 Members and 1 Guest are viewing this topic.

Offline Sandwich

  • Got Screen?
  • 213
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • Brainzipper
Re: Internet Browser in FSO WIP (+Test builds)
Oooh.... :) Now I'm wanting to recreate the mainhall in CSS... :p
SERIOUSLY...! | {The Sandvich Bar} - Rhino-FS2 Tutorial | CapShip Turret Upgrade | The Complete FS2 Ship List | System Background Package

"...The quintessential quality of our age is that of dreams coming true. Just think of it. For centuries we have dreamt of flying; recently we made that come true: we have always hankered for speed; now we have speeds greater than we can stand: we wanted to speak to far parts of the Earth; we can: we wanted to explore the sea bottom; we have: and so  on, and so on: and, too, we wanted the power to smash our enemies utterly; we have it. If we had truly wanted peace, we should have had that as well. But true peace has never been one of the genuine dreams - we have got little further than preaching against war in order to appease our consciences. The truly wishful dreams, the many-minded dreams are now irresistible - they become facts." - 'The Outward Urge' by John Wyndham

"The very essence of tolerance rests on the fact that we have to be intolerant of intolerance. Stretching right back to Kant, through the Frankfurt School and up to today, liberalism means that we can do anything we like as long as we don't hurt others. This means that if we are tolerant of others' intolerance - especially when that intolerance is a call for genocide - then all we are doing is allowing that intolerance to flourish, and allowing the violence that will spring from that intolerance to continue unabated." - Bren Carlill

 

Offline m!m

  • 211
Re: Internet Browser in FSO WIP (+Test builds)
I would appreciate if you would :p
The main reason I stated this was to replace the existing interface with a solution that can be changed by the modder. When this system is complete the modder will have complete control over how the interface looks like and it also opens more mission design possibilities considering what was already done with the very limited custom HUD gauges.

 

Offline Sandwich

  • Got Screen?
  • 213
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • Brainzipper
Re: Internet Browser in FSO WIP (+Test builds)
Hmm... How are the animations done in the existing mainhall - frame-by-frame animations overlaid on top of the BG?
SERIOUSLY...! | {The Sandvich Bar} - Rhino-FS2 Tutorial | CapShip Turret Upgrade | The Complete FS2 Ship List | System Background Package

"...The quintessential quality of our age is that of dreams coming true. Just think of it. For centuries we have dreamt of flying; recently we made that come true: we have always hankered for speed; now we have speeds greater than we can stand: we wanted to speak to far parts of the Earth; we can: we wanted to explore the sea bottom; we have: and so  on, and so on: and, too, we wanted the power to smash our enemies utterly; we have it. If we had truly wanted peace, we should have had that as well. But true peace has never been one of the genuine dreams - we have got little further than preaching against war in order to appease our consciences. The truly wishful dreams, the many-minded dreams are now irresistible - they become facts." - 'The Outward Urge' by John Wyndham

"The very essence of tolerance rests on the fact that we have to be intolerant of intolerance. Stretching right back to Kant, through the Frankfurt School and up to today, liberalism means that we can do anything we like as long as we don't hurt others. This means that if we are tolerant of others' intolerance - especially when that intolerance is a call for genocide - then all we are doing is allowing that intolerance to flourish, and allowing the violence that will spring from that intolerance to continue unabated." - Bren Carlill

 

Offline m!m

  • 211
Re: Internet Browser in FSO WIP (+Test builds)
Yes, I think so but recently there were some changes which added some new features to the mainhall so it might have changed a bit.
The great this about HTML5 is that you can just use the <video> element to play an animation. No need for those ancient GIFs anymore ;7

 

Offline Sandwich

  • Got Screen?
  • 213
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • Brainzipper
Re: Internet Browser in FSO WIP (+Test builds)
Indeed - and IIRC with the .webm video format, you can actually have alpha transparency in videos. However, I don't know if you can have enough control over the playback to make it go in reverse on mouseout.
SERIOUSLY...! | {The Sandvich Bar} - Rhino-FS2 Tutorial | CapShip Turret Upgrade | The Complete FS2 Ship List | System Background Package

"...The quintessential quality of our age is that of dreams coming true. Just think of it. For centuries we have dreamt of flying; recently we made that come true: we have always hankered for speed; now we have speeds greater than we can stand: we wanted to speak to far parts of the Earth; we can: we wanted to explore the sea bottom; we have: and so  on, and so on: and, too, we wanted the power to smash our enemies utterly; we have it. If we had truly wanted peace, we should have had that as well. But true peace has never been one of the genuine dreams - we have got little further than preaching against war in order to appease our consciences. The truly wishful dreams, the many-minded dreams are now irresistible - they become facts." - 'The Outward Urge' by John Wyndham

"The very essence of tolerance rests on the fact that we have to be intolerant of intolerance. Stretching right back to Kant, through the Frankfurt School and up to today, liberalism means that we can do anything we like as long as we don't hurt others. This means that if we are tolerant of others' intolerance - especially when that intolerance is a call for genocide - then all we are doing is allowing that intolerance to flourish, and allowing the violence that will spring from that intolerance to continue unabated." - Bren Carlill

 

Offline m!m

  • 211
Re: Internet Browser in FSO WIP (+Test builds)
Apparently playing a video in reverse is valid (http://stackoverflow.com/questions/5277293/is-it-possible-to-play-html5-video-in-reverse) but I don't know if Chrome implements that correctly.
EDIT: Damnit, just tested and it seems like Chrome does not support playing in reverse

 

Offline Sandwich

  • Got Screen?
  • 213
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • Brainzipper
Re: Internet Browser in FSO WIP (+Test builds)
Hmm... any chance APNG animations can be controlled during playback?
SERIOUSLY...! | {The Sandvich Bar} - Rhino-FS2 Tutorial | CapShip Turret Upgrade | The Complete FS2 Ship List | System Background Package

"...The quintessential quality of our age is that of dreams coming true. Just think of it. For centuries we have dreamt of flying; recently we made that come true: we have always hankered for speed; now we have speeds greater than we can stand: we wanted to speak to far parts of the Earth; we can: we wanted to explore the sea bottom; we have: and so  on, and so on: and, too, we wanted the power to smash our enemies utterly; we have it. If we had truly wanted peace, we should have had that as well. But true peace has never been one of the genuine dreams - we have got little further than preaching against war in order to appease our consciences. The truly wishful dreams, the many-minded dreams are now irresistible - they become facts." - 'The Outward Urge' by John Wyndham

"The very essence of tolerance rests on the fact that we have to be intolerant of intolerance. Stretching right back to Kant, through the Frankfurt School and up to today, liberalism means that we can do anything we like as long as we don't hurt others. This means that if we are tolerant of others' intolerance - especially when that intolerance is a call for genocide - then all we are doing is allowing that intolerance to flourish, and allowing the violence that will spring from that intolerance to continue unabated." - Bren Carlill

 

Offline m!m

  • 211
Re: Internet Browser in FSO WIP (+Test builds)
APNG is not natively supported currently but there is a Chrome extension that adds APNG playback so there is a way to load and display APNG files correctly.
After that is working correctly, playing an APNG file in reverse should be simple.

Another thing to consider is that you can render 3D models using WebGL which means that a 3D mainhall is not that unlikely anymore.

EDIT: After a quick google search I dound this project: https://github.com/davidmz/apng-canvas
« Last Edit: July 04, 2014, 06:13:15 am by m!m »

 

Offline mjn.mixael

  • Cutscene Master
  • 212
  • Chopped liver
    • Steam
    • Twitter
Re: Internet Browser in FSO WIP (+Test builds)
There is no way a real time 3d model can be as detailed.

EDIT: what I mean is that it sounds like chromium for mainhalls like what I've been doing will be a step in the wrong direction. But for BP style mainhalls, this will be awesome. :)

Yes, the mainhalls are animations played on top of the background.

Of course this will have applications far beyond just the main hall menu.
« Last Edit: July 04, 2014, 07:45:28 am by mjn.mixael »
Cutscene Upgrade Project - Mainhall Remakes - Between the Ashes
Youtube Channel - P3D Model Box
Between the Ashes is looking for committed testers, PM me for details.
Freespace Upgrade Project See what's happening.

 

Offline ngld

  • Administrator
  • 29
  • Knossos dev
Re: Internet Browser in FSO WIP (+Test builds)
So... I tried to compile this on Linux and CMake fails in cmake/util.cmake:22 several times.

Seems like the parameters for ADD_IMPORTED_LIB() are wrong.

I've attached the CMakeOuput.log and CMakeError.log.
The console output is:
Code: [Select]
-- The C compiler identification is GNU 4.9.0
-- The CXX compiler identification is GNU 4.9.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detected compatibility for the AVX feature set. Optimizations are done accordingly.
-- NO FS2PATH environment variable found, you can define this to point to your freespace install but it it not required.
CMake Warning at CMakeLists.txt:60 (message):
  CMAKE_BUILD_TYPE was not specified, defaulting to Release configuration.


-- cotire 1.5.2 loaded.
-- Doing configuration specific to gcc...
-- Performing Test COMPILER_SUPPORTS_CXX1Y
-- Performing Test COMPILER_SUPPORTS_CXX1Y - Success
-- Performing Test COMPILER_SUPPORTS_CXX11
-- Performing Test COMPILER_SUPPORTS_CXX11 - Success
-- Performing Test COMPILER_SUPPORTS_CXX0X
-- Performing Test COMPILER_SUPPORTS_CXX0X - Success
-- Configuring UNIX specific things and stuff...
-- Looking for XOpenDisplay in /usr/lib64/libX11.so;/usr/lib64/libXext.so
-- Looking for XOpenDisplay in /usr/lib64/libX11.so;/usr/lib64/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Found X11: /usr/lib64/libX11.so
-- Found OpenGL: /usr/lib64/libGL.so 
-- Performing Test HAS_CXX11_IS_TRIVIAL
-- Performing Test HAS_CXX11_IS_TRIVIAL - Success
-- Performing Test HAS_CXX11_IS_TRIVIALLY_COPYABLE
-- Performing Test HAS_CXX11_IS_TRIVIALLY_COPYABLE - Failed
-- Performing Test HAS_CXX11_STATIC_ASSERT
-- Performing Test HAS_CXX11_STATIC_ASSERT - Success
-- Performing Test HAS_CXX11_AUTO
-- Performing Test HAS_CXX11_AUTO - Success
-- Performing Test HAS_CXX11_OVERRIDE
-- Performing Test HAS_CXX11_OVERRIDE - Success
-- Performing Test HAS_CXX11_NOEXCEPT
-- Performing Test HAS_CXX11_NOEXCEPT - Success
CMake Error at cmake/util.cmake:22 (LIST):
  list index: 1 out of range (-1, 0)
Call Stack (most recent call first):
  lib/libjpeg/CMakeLists.txt:77 (ADD_IMPORTED_LIB)


CMake Error at cmake/util.cmake:22 (LIST):
  list index: 1 out of range (-1, 0)
Call Stack (most recent call first):
  lib/zlib/CMakeLists.txt:71 (ADD_IMPORTED_LIB)


-- Found PkgConfig: /usr/bin/pkg-config (found version "0.28")
-- checking for module 'ogg'
--   found ogg, version 1.3.1
-- checking for module 'theora'
--   found theora, version 1.1.1
-- checking for module 'vorbis'
--   found vorbis, version 1.3.4
-- checking for module 'vorbisfile'
--   found vorbisfile, version 1.3.4
CMake Error at cmake/util.cmake:22 (LIST):
  list index: 1 out of range (-1, 0)
Call Stack (most recent call first):
  lib/oggvorbis/CMakeLists.txt:15 (ADD_IMPORTED_LIB)


CMake Error at cmake/util.cmake:22 (LIST):
  list index: 1 out of range (-1, 0)
Call Stack (most recent call first):
  lib/oggvorbis/CMakeLists.txt:21 (ADD_IMPORTED_LIB)


CMake Error at cmake/util.cmake:22 (LIST):
  list index: 1 out of range (-1, 0)
Call Stack (most recent call first):
  lib/oggvorbis/CMakeLists.txt:24 (ADD_IMPORTED_LIB)


-- Found OpenAL: /usr/lib64/libopenal.so 
CMake Error at cmake/util.cmake:22 (LIST):
  list index: 1 out of range (-1, 0)
Call Stack (most recent call first):
  lib/openal/CMakeLists.txt:93 (ADD_IMPORTED_LIB)


-- checking for one of the modules 'sdl2'
-- checking for module 'jansson>=2.2'
--   found jansson, version 2.6
CMake Error at cmake/util.cmake:22 (LIST):
  list index: 1 out of range (-1, 0)
Call Stack (most recent call first):
  lib/jansson/CMakeLists.txt:10 (ADD_IMPORTED_LIB)


-- Looking for include file pthread.h
-- Looking for include file pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Looking for dlsym
-- Looking for dlsym - not found
-- Looking for dlsym in dl
-- Looking for dlsym in dl - found
-- Doing configuration specific to gcc...
-- Boost version: 1.55.0
-- Found the following Boost libraries:
--   filesystem
--   system
--   iostreams
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY - Success
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY - Success
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR - Success
-- Doing configuration specific to gcc...
-- Found Lua51: /usr/lib64/liblua5.1.so;/usr/lib64/libm.so
-- Boost version: 1.55.0
-- Boost version: 1.55.0
-- Found the following Boost libraries:
--   filesystem
--   system
--   iostreams
--   regex
-- CXX target code cotired without unity build excluding 24 files.
-- Boost version: 1.55.0
-- Found Doxygen: /usr/bin/doxygen (found version "1.8.7")
-- Configuring incomplete, errors occurred!
See also "/home/tobias/dev/fs2/fs2-blink/build/CMakeFiles/CMakeOutput.log".
See also "/home/tobias/dev/fs2/fs2-blink/build/CMakeFiles/CMakeError.log".

[attachment kidnapped by pirates]

 

Offline m!m

  • 211
Re: Internet Browser in FSO WIP (+Test builds)
The issues with ADD_IMPORTED_LIB have (hopefully  :nervous:) been fixed in the main CMake branch but I didn't bother porting it to the chromium branch as the current version will not build under linux, sorry...

 

Offline ngld

  • Administrator
  • 29
  • Knossos dev
Re: Internet Browser in FSO WIP (+Test builds)
You're right, the issues with ADD_IMPORTED_LIB are fixed in the cmake branch, however I've found some more issues:
I can only compile with "-DFSO_USE_LUAJIT=ON" otherwise the compiler will complain about missing lua_... functions. It seems that the lua headers aren't included.
The compiler still aborts (at least in the release configuration) because freespace.cpp is compiled without -DNDEBUG and won't link with libcode.a. Adding "ADD_DEFINITIONS(-DNDEBUG)" to one of the CMake files fixes this but it'll break the debug build.

Launching the compiled fs2_open_3_7_1_AVX file opens a window telling me "Unrecognized command line parameter --nograb." (even though I didn't pass any parameter) and crashes.

Valgrind output:
Code: [Select]
==31989== Invalid read of size 8
==31989==    at 0x6514A0: io::mouse::Cursor::enable() (in /home/ngld/dev/fs2/fs2-blink/build/bin/fs2_open_3_7_1_AVX)
==31989==    by 0x651A4C: io::mouse::CursorManager::init() (in /home/ngld/dev/fs2/fs2-blink/build/bin/fs2_open_3_7_1_AVX)
==31989==    by 0x5A8944: gr_init(int, int, int, int) (in /home/ngld/dev/fs2/fs2-blink/build/bin/fs2_open_3_7_1_AVX)
==31989==    by 0x516C19: game_init() (in /home/ngld/dev/fs2/fs2-blink/build/bin/fs2_open_3_7_1_AVX)
==31989==    by 0x517151: game_main(int, char**) (in /home/ngld/dev/fs2/fs2-blink/build/bin/fs2_open_3_7_1_AVX)
==31989==    by 0x517477: actual_main(int, char**) (in /home/ngld/dev/fs2/fs2-blink/build/bin/fs2_open_3_7_1_AVX)
==31989==    by 0x7746FFF: (below main) (in /usr/lib/libc-2.19.so)
==31989==  Address 0x0 is not stack'd, malloc'd or (recently) free'd

Is there a dedicated thread / mantis issue for the cmake branch? Anything that I missed (cmake options or whatever) ?

EDIT: The crash was because I wasn't in my FSO directory. Shouldn't it output the "Web cursor bitmap not found. [...]" message instead of crashing?
« Last Edit: July 04, 2014, 11:57:41 am by ngld »

 

Offline m!m

  • 211
Re: Internet Browser in FSO WIP (+Test builds)
The first issue may be related to your system libraries as by default CMake will use the system libraries. Try passing -DFSO_BUILD_INCLUDED_LIBS=On to cmake and it will compile the libraries distributed with the FSO code.
I know about NDEBUG error but I didn't fix it in that branch yet.
The last error looks like a general Antipodes issue, can you compile and run the antipodes SVN branch and report the results on the Antipodes thread in the Test forum?

There is no public CMake branch post but you could try using the github issue tracker in my repository if you find more issues.

 

Offline Sandwich

  • Got Screen?
  • 213
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • Brainzipper
Re: Internet Browser in FSO WIP (+Test builds)
Just to give an idea of some cool button effects that can be achieved with CSS: http://tympanus.net/Development/CreativeButtons/ (check out their other demos - they've got some great stuff there).

EDIT: This too: http://tympanus.net/Development/CreativeLinkEffects/
SERIOUSLY...! | {The Sandvich Bar} - Rhino-FS2 Tutorial | CapShip Turret Upgrade | The Complete FS2 Ship List | System Background Package

"...The quintessential quality of our age is that of dreams coming true. Just think of it. For centuries we have dreamt of flying; recently we made that come true: we have always hankered for speed; now we have speeds greater than we can stand: we wanted to speak to far parts of the Earth; we can: we wanted to explore the sea bottom; we have: and so  on, and so on: and, too, we wanted the power to smash our enemies utterly; we have it. If we had truly wanted peace, we should have had that as well. But true peace has never been one of the genuine dreams - we have got little further than preaching against war in order to appease our consciences. The truly wishful dreams, the many-minded dreams are now irresistible - they become facts." - 'The Outward Urge' by John Wyndham

"The very essence of tolerance rests on the fact that we have to be intolerant of intolerance. Stretching right back to Kant, through the Frankfurt School and up to today, liberalism means that we can do anything we like as long as we don't hurt others. This means that if we are tolerant of others' intolerance - especially when that intolerance is a call for genocide - then all we are doing is allowing that intolerance to flourish, and allowing the violence that will spring from that intolerance to continue unabated." - Bren Carlill

 

Offline ngld

  • Administrator
  • 29
  • Knossos dev
Re: Internet Browser in FSO WIP (+Test builds)
So passing either -DLUA_INCLUDE_DIR=/usr/include/lua5.1 or -DFSO_BUILD_INCLUDED_LIBS=On works. I've installed lua 5.2 and lua 5.1 and somehow CMake finds the correct library but not the include directory.
gcc complains about "enum GameState;" in freespace2/freespace.h because the enum wasn't declared before. Replacing that line with
Code: [Select]
#include "gamesequence/gamesequence.h" fixes the problem.

Right now I'm compiling CEF because the binary build on their website links against libudev.so.0 but I have libudev.so.1. The build is already taking > 30 minutes and it's still downloading more stuff (with 4 MB/s).
I'm wondering if we'll have to provide several Linux builds depending on your OS flavour once this is part of FSO...  >.<

m!m, your GitHub repository is https://github.com/asarium/fs2open.github.com/tree/feature/chromiumInput, right? Since the issue tracker isn't enabled...

EDIT: After compiling chromium itself the CEF build failed because my gcc apparently isn't compatible with the gold linker CEF uses.... ugh.
« Last Edit: July 04, 2014, 05:37:27 pm by ngld »

 

Offline m!m

  • 211
Re: Internet Browser in FSO WIP (+Test builds)
Thanks for solving that enum issue, I think you can post pull requests to my repository with github so could you do that with your changes, that would make my life easier.

The libudev issue is apparently a known issue, here is a github issue that apparently solved the issue: https://github.com/adobe/brackets/issues/4720

I just enabled the issue tracker in my repository, thanks for pointing that out.

 

Offline m!m

  • 211
Re: Internet Browser in FSO WIP (+Test builds)
Thanks to the effort of ngld you can now test on linux. The building process on Windows also got improved which means you can now build the project without much effort.
The first post has been updated to describe what you have to do.

 

Offline ngld

  • Administrator
  • 29
  • Knossos dev
Re: Internet Browser in FSO WIP (+Test builds)
Quote from: m!m
Only use the 32-bit versions, FSO doesn't support 64-bit yet

It doesn't? I've been using 64-bit builds for at least 2 years and never had any problems (on Linux).
Compiling 32-bit builds on a 64-bit Linux distro can be a pain so I'd suggest trying to compile a 64-bit version first.

 

Offline m!m

  • 211
Re: Internet Browser in FSO WIP (+Test builds)
That only applies to windows, I changed the instructions accordingly, thank you.