#2528 FAN_HOME and fanlaunch.bat

SlimerDude Sun 10 Apr 2016

Hi,

I just noticed that the new fanlaunch.bat script doesn't honour any existing FAN_HOME environment variable, but instead replaces it with its containing directory.

This example tries to set FAN_HOME to Respect Me!:

C:\>set FAN_HOME=Respect Me!

C:\>set FAN

FAN_HOME=Respect Me!

C:\>fan -version
Fantom Launcher
Copyright (c) 2006-2013, Brian Frank and Andy Frank
Licensed under the Academic Free License version 3.0

Java Runtime:
  java.version:    1.6.0_45
  java.vm.name:    Java HotSpot(TM) 64-Bit Server VM
  java.vm.vendor:  Sun Microsystems Inc.
  java.vm.version: 20.45-b01
  java.home:       C:\Apps\Java\jdk1.6.0_45\jre
  fan.platform:    win32-x86_64
  fan.version:     1.0.68
  fan.env:         sys::BootEnv
  fan.home:        C:\Apps\fantom-1.0.68

It is very useful being able to use FAN_HOME to switch Fantom environments, it shouldn't matter which script is being executed.

matthew Mon 11 Apr 2016

Hi SlimerDude,

If you open fanlaunch.bat and change line 13 to

IF "%FAN_HOME%" == "" SET FAN_HOME=%~dp0%..

does that work for you?

SlimerDude Mon 11 Apr 2016

Yep, that works for me!

:)

matthew Mon 11 Apr 2016

Ticket promoted to #2528 and assigned to matthew

matthew Mon 11 Apr 2016

Ticket resolved in 1.0.69

Fixed fanlaunch.bat to not set FAN_HOME if it was already set by the environment.

Login or Signup to reply.