Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: fernewelten on Sun 22/12/2019 00:28:10

Title: [SOLVED] Open a specific website from within an AGS game?
Post by: fernewelten on Sun 22/12/2019 00:28:10
Hi folks,

Is there a way to realize the following scenario within an AGS game?
Some GUI is shown.

This would probably only work on Windows systems, since Linux doesn't have the concept of a “standard” web browser AFAIK.
Title: Re: Open a specific website from within an AGS game?
Post by: Vincent on Sun 22/12/2019 09:17:47
Yes you can do that with the ShellExecute plugin, this is what you should do:

1. Save and close your game
2. Copy the plugin dll into the main AGS folder
3. Open the editor and open your game
4. Activate the plugin in the project tree

You can now use this command:

int ShellExecute(const string operation, const string file, const string parameters, ShowCommand showCommand = SW_SHOW);

To open a website, use

Code (ags) Select

// inside button interact
ShellExecute("", "http://website.com", "");

Title: Re: Open a specific website from within an AGS game?
Post by: morganw on Sun 22/12/2019 13:59:42
Quote from: fernewelten on Sun 22/12/2019 00:28:10
This would probably only work on Windows systems, since Linux doesn't have the concept of a “standard” web browser AFAIK.
You would normally use 'xdg-open'.
https://www.freedesktop.org/wiki/Software/xdg-utils/
Title: Re: Open a specific website from within an AGS game?
Post by: eri0o on Sun 22/12/2019 14:05:56
here for Windows and Linux -> https://www.adventuregamestudio.co.uk/forums/index.php?topic=30948.msg636585168#msg636585168
Title: Re: [SOLVED] Open a specific website from within an AGS game?
Post by: fernewelten on Thu 30/01/2020 18:24:39
Quote from: eri0o on Sun 22/12/2019 14:05:56
here for Windows and Linux -> https://www.adventuregamestudio.co.uk/forums/index.php?topic=30948.msg636585168#msg636585168

Sorry, I don't own a Linux system so I can only blindly obey instructions.

So where exactly does the file libagsshell.so go?
To ((program directory))/Linux/lib32, to ((program directory))/Linux/lib64 or to both of them?

Title: Re: [SOLVED] Open a specific website from within an AGS game?
Post by: eri0o on Thu 30/01/2020 20:38:43
I know the plug-in is really simple but I believe I only built for Linux 64 bits.

The reason is I simply didn't had a 32 bit Linux installation to test.

So place it on lib64. AGS will complain you don't have the 32 bit version though.