 {app} = require 'electron'
 {join} = require 'path-extra'
 fs = require 'fs-extra'
-{warn, error} = require './utils'
+{error} = require './utils'
 
-platform = process.platform
-filename = switch platform
+PLATFORM = process.platform
+FILENAME = switch PLATFORM
   when 'darwin' then 'PepperFlashPlayer.plugin'
   when 'linux'  then 'libpepflashplayer.so'
   when 'win32'  then 'pepflashplayer.dll'
-innerPath = join 'PepperFlash', platform, filename
+INNER_PATH = join 'PepperFlash', PLATFORM, FILENAME
 
 validatePath = (path) ->
-  return false if typeof path isnt 'string' or not path.endsWith filename
+  return false if typeof path isnt 'string' or not path.endsWith FILENAME
   try
     fs.accessSync path
   catch

  true

getBuiltInFlashPath = ->
  builtInPath = join EXECROOT, innerPath if EXECROOT?
  builtInPath = join ROOT, innerPath if not validatePath builtInPath
  if validatePath builtInPath then builtInPath else null

reVerNum = /(\d+)\.(\d+)\.(\d+)\.(\d+)/

      errMsg = 'Could not load system Pepper Flash Player plug-in'
    when 'cli'
      flashPath = CLIFlashPath if validatePath CLIFlashPath
      errMsg = "Invalid path to '#{FILENAME}': \n#{CLIFlashPath}"
    else
      errMsg = "Invalid Pepper Flash Player location: '@#{loc}'."
  if not flashPath?
