Skip to content
Permalink
master
Switch branches/tags
Go to file
 
 
Cannot retrieve contributors at this time
125 lines (93 sloc) 4.18 KB
#
# Firefox base turbo.me file
# https://github.com/turboapps/turbome/tree/master/firefox
#
# Licensed under the Apache License, Version 2.0
# http://www.apache.org/licenses/LICENSE-2.0
# Firefox image without extra plugins preconfigured for enterprise:
# * Maintenance service turned off
# * Do not submit crash reports
# * Disable default browser check
# * Disable auto updates
# See https://github.com/turboapps/turbome/tree/firefox/config/ for more details.
requires privilege:admin
###################################
# Meta tags
###################################
meta title="Firefox"
meta namespace="mozilla"
meta name="firefox-base"
###################################
# Pull dependency images
###################################
using powershell,wget
###################################
# Download and install
###################################
cmd mkdir c:\Workspace
workdir c:\Workspace
batch cmd
echo [Install] > install.ini
echo MaintenanceService=false >> install.ini
var url = "https://download.mozilla.org/?product=firefox-latest&os=win&lang=en-US"
cmd "wget -O firefox.exe --no-check-certificate --no-verbose ""%url%"" 2> NUL"
cmd "firefox.exe /INI=c:\Workspace\install.ini"
cmd "echo if (${env:ProgramFiles(x86)} -ne $null) {$dir=${env:ProgramFiles(x86)}} else {$dir=${env:ProgramFiles}} >> GetVersion.ps1"
cmd "echo $Firefox=$dir + '\Mozilla Firefox\firefox.exe' >> GetVersion.ps1"
cmd "echo (Get-Item $Firefox).VersionInfo.ProductVersion >> GetVersion.ps1"
cmd powershell -executionpolicy remotesigned -File GetVersion.ps1
var tag = last
meta tag=tag
batch
if "%programfiles(x86)%" == "" ( cd "%programfiles%" ) else ( cd "%programfiles(x86)%" )
cd "Mozilla Firefox"
wget --no-check-certificate --no-verbose -O mozilla.cfg https://raw.githubusercontent.com/turboapps/turbome/master/firefox/config/mozilla.cfg 2> NUL
pushd browser
wget --no-check-certificate --no-verbose -O override.ini https://raw.githubusercontent.com/turboapps/turbome/master/firefox/config/browser/override.ini 2> NUL
mkdir defaults\preferences & cd defaults\preferences
wget --no-check-certificate --no-verbose -O local-settings.js https://raw.githubusercontent.com/turboapps/turbome/master/firefox/config/browser/defaults/preferences/local-settings.js 2> NUL
popd
pushd uninstall
helper.exe /SetAsDefaultAppUser
helper.exe /SetAsDefaultAppGlobal
popd
# Create a default, fix named profile.
# We pin down the name, so that we can set isolation and sync settings on that directory
copy "profiles.ini" "C:\Workspace\profiles.ini"
copy "Profiles" "C:\Workspace\Profiles"
batch
mkdir %APPDATA%\Mozilla\Firefox\
copy C:\Workspace\profiles.ini %APPDATA%\Mozilla\Firefox\profiles.ini
xcopy /sy /e /I C:\Workspace\Profiles %APPDATA%\Mozilla\Firefox\Profiles
# disable the launcher process (APPQ-3093)
cmd "echo if (${env:ProgramFiles(x86)} -ne $null) {$dir=${env:ProgramFiles(x86)}} else {$dir=${env:ProgramFiles}} >> DisableLauncher.ps1"
cmd "echo $Firefox=$dir + '\Mozilla Firefox\firefox.exe' >> DisableLauncher.ps1"
cmd "echo $valueName=$Firefox + '^|Browser' >> DisableLauncher.ps1"
cmd "echo Set-ItemProperty -Path 'HKCU:\Software\Mozilla\Firefox\Launcher' -name $valueName -type qword -value 0 >> DisableLauncher.ps1"
cmd "echo $valueName=$Firefox + '^|Launcher' >> DisableLauncher.ps1"
cmd "echo Remove-ItemProperty -Path 'HKCU:\Software\Mozilla\Firefox\Launcher' -name $valueName >> DisableLauncher.ps1"
cmd powershell -executionpolicy remotesigned -File DisableLauncher.ps1
copy "firefox.cfg" "C:\Workspace\firefox.cfg"
copy "autoconfig.js" "C:\Workspace\autoconfig.js"
batch
if "%programfiles(x86)%" == "" ( cd "%programfiles%" ) else ( cd "%programfiles(x86)%" )
cd "Mozilla Firefox"
copy C:\Workspace\firefox.cfg
cd defaults\pref
copy C:\Workspace\autoconfig.js
###################################
# Environment Variables
###################################
env path=""
env pathext=""
###################################
# Clean up
###################################
workdir c:\
cmd rmdir c:\Workspace /s /q
cmd rmdir c:\wget /s /q
###################################
# Startup File
###################################
isolate window:firefoxMessageWindow full
startup file ("@PROGRAMFILESX86@\Mozilla Firefox\firefox.exe")