← Back to team overview

dhis2-devs team mailing list archive

Re: "Site Specific Browser" included with DHIS2 Live?

 

Something like this perhaps modified a bit to launch which every
browser would be included as part of the install

private void LaunchBrowser (String msBrowser,String msURL) throws IOException
{
if(msBrowser.equalsIgnoreCase("iexplore")){
Runtime.getRuntime().exec("C:/Program Files/Internet
Explorer/IEXPLORE.EXE " +msURL);
}else{
//Runtime.getRuntime().exec(new String[]{"cmd.exe", "/c", "start", msURL});
Runtime.getRuntime().exec("C:/Program Files/Mozilla
Firefox/firefox.exe " +msURL);
}

But of course, the "C:/Program Files/Mozilla Firefox/" part could
reference the enviornment variable that would be set during the
install. Otherwise, a configuration file, which could also be written
as part of the installer, might not be bad idea if we did not want to
set any environment variable.




On Fri, Apr 23, 2010 at 10:04 AM, Bob Jolliffe <bobjolliffe@xxxxxxxxx> wrote:
> On 23 April 2010 08:54, Jason Pickering <jason.p.pickering@xxxxxxxxx> wrote:
>> I somewhat agree with Bob, but I also see good reasons why packaging a
>> browser is a good idea. There seems to be pretty wide variation
>> between different browsers, and while it is a good idea to support
>> many different ones, it is also a lot of work. If we could focus on
>> being sure that all the browser-related bugs are not present, for
>> instance in Chrome or Firefox,  for a particular release, this would
>> ensure that the app is going to work properly in a production
>> environment.  I have seen a lot of problems in the field with people
>> installing toolbars, browser hijacking, etc that really is going to
>> complicate deployments unnecessarily.
>>
>> After looking at the code, it seems that setting an environment
>> variable might be the best solution, perhaps.
>> This could be set as part of the installation process. If the
>> environment variable exists (DHIS2_BROWSER) for example, then it would
>> attempt to open up DHIS2 with this. Otherwise, it would default to the
>> current Desktop.getDesktop().browse( URI.create (getUrl() ) ) ); which
>> will simply launch the default browser.
>
> I guess this could work with an exec.  I'll take a look.
>
>>
>>  Of course, this could be made as an option of the installer, whether
>> to install one of these site-specific browsers or not, but I think the
>> advantages outweigh the disadvantages. It is certainly worth testing I
>> think.
>>
>> Regards,
>> Jason
>>
>>
>>
>> On Fri, Apr 23, 2010 at 9:46 AM, Ola Hodne Titlestad <olatitle@xxxxxxxxx> wrote:
>>> On 22 April 2010 23:28, Bob Jolliffe <bobjolliffe@xxxxxxxxx> wrote:
>>>>
>>>> On 22 April 2010 19:35, Jason Pickering <jason.p.pickering@xxxxxxxxx>
>>>> wrote:
>>>> > I think it should probably be a blueprint and  I think it is a good
>>>> > idea.
>>>> >
>>>> > It is certainly  a problem on many machines I have encounterd in the
>>>> > field. We need to install FireFox, Chrome, Opera or something, and
>>>> > ideally make it the default browser. This seems to be a good idea to
>>>> > me, but can seem a bit drastic to some users.  Ideally, the installer
>>>> > would come prepackaged with this browser. When DHI2 Live is launched,
>>>> > instead of making a call to the default browser (which in most cases
>>>> > in IE), assuming that this was installed as part of a special live
>>>> > package, then this browser would get opened instead, thereby launching
>>>> > DHIS2. I am not so sure about the DHIS2 live part, as it simply
>>>> > launches the default browser. Bob?
>>>> >
>>>> I don't think its very easy to coax dhis2-live to open anything
>>>> besides the default browser.  Not that its impossible, but probably
>>>> very messy.  I'm also not sure we want to get into the browser
>>>> packaging business.
>>>>
>>>
>>> Could the portable firefox package be of any help here? We could put it in a
>>> standard location DHIS2Live/firefox/ and start it from there? I have used it
>>> for the PHIT and DHIS seems to run fine there. It is set up with all
>>> relative paths which should make it easier to distribute as no installation
>>> is needed.
>>>
>>> Ola
>>> --------
>>>
>>>>
>>>> >
>>>> >
>>>> >
>>>> > On Thu, Apr 22, 2010 at 6:32 PM, Knut Staring <knutst@xxxxxxxxx> wrote:
>>>> >> Given that DHIS2 runs best in Chrome (especially the Mapping module),
>>>> >> and also ok in Firefox, it might be a good idea to make sure people
>>>> >> have access to one of these browsers.
>>>> >>
>>>> >> One way to do that is to package things with Prism (Firefox) or Chrome
>>>> >> (or Fluid for Mac http://fluidapp.com/)
>>>> >>
>>>> >>
>>>> >> http://stackoverflow.com/questions/1842277/chrome-application-shortcuts-mozilla-prism-installer
>>>> >>
>>>> >> What do you guys think?
>>>> >>
>>>> >> Knut
>>>> >>
>>>> >> _______________________________________________
>>>> >> Mailing list: https://launchpad.net/~dhis2-devs
>>>> >> Post to     : dhis2-devs@xxxxxxxxxxxxxxxxxxx
>>>> >> Unsubscribe : https://launchpad.net/~dhis2-devs
>>>> >> More help   : https://help.launchpad.net/ListHelp
>>>> >>
>>>> >
>>>> >
>>>> >
>>>> > --
>>>> > --
>>>> > Jason P. Pickering
>>>> > email: jason.p.pickering@xxxxxxxxx
>>>> > tel:+260968395190
>>>> >
>>>> > _______________________________________________
>>>> > Mailing list: https://launchpad.net/~dhis2-devs
>>>> > Post to     : dhis2-devs@xxxxxxxxxxxxxxxxxxx
>>>> > Unsubscribe : https://launchpad.net/~dhis2-devs
>>>> > More help   : https://help.launchpad.net/ListHelp
>>>> >
>>>>
>>>> _______________________________________________
>>>> Mailing list: https://launchpad.net/~dhis2-devs
>>>> Post to     : dhis2-devs@xxxxxxxxxxxxxxxxxxx
>>>> Unsubscribe : https://launchpad.net/~dhis2-devs
>>>> More help   : https://help.launchpad.net/ListHelp
>>>
>>>
>>
>>
>>
>> --
>> --
>> Jason P. Pickering
>> email: jason.p.pickering@xxxxxxxxx
>> tel:+260968395190
>>
>



-- 
--
Jason P. Pickering
email: jason.p.pickering@xxxxxxxxx
tel:+260968395190



References