-
Notifications
You must be signed in to change notification settings - Fork 70
/
turbo.me
136 lines (101 loc) · 4.4 KB
/
turbo.me
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
#
# Firefox stable 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.
###################################
# Requirements
###################################
requires privilege:admin
###################################
# Meta tags
###################################
meta title="Firefox"
meta namespace="mozilla"
meta name="firefox"
###################################
# Pull dependency images
###################################
using powershell,wget
###################################
# Download and install
###################################
# Create workspace folder
cmd "mkdir %SYSTEMDRIVE%\Workspace"
workdir @SYSDRIVE@\Workspace
# 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"
# Installer link
var url = "https://download.mozilla.org/?product=firefox-latest&os=win&lang=en-US"
# Download, install, and configure app
batch cmd
@ECHO Define install.ini
echo [Install] > install.ini
echo MaintenanceService=false >> install.ini
@ECHO Download installer
wget -O firefox.exe --no-check-certificate --no-verbose "%url%"
@ECHO Run installer
firefox.exe /INI=%SYSTEMDRIVE%\Workspace\install.ini
@ECHO Get config files and set preferences
if "%programfiles(x86)%" == "" ( pushd "%programfiles%\Mozilla Firefox" ) else ( pushd "%programfiles(x86)%\Mozilla Firefox" )
wget --no-check-certificate --no-verbose -O mozilla.cfg https://raw.githubusercontent.com/turboapps/turbome/master/firefox/config/mozilla.cfg
cd browser
wget --no-check-certificate --no-verbose -O override.ini https://raw.githubusercontent.com/turboapps/turbome/master/firefox/config/browser/override.ini
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
cd ..\..\..\uninstall
helper.exe /SetAsDefaultAppUser
helper.exe /SetAsDefaultAppGlobal
cd ..
popd
@ECHO Configure profile
mkdir %APPDATA%\Mozilla\Firefox\
copy %SYSTEMDRIVE%\Workspace\profiles.ini %APPDATA%\Mozilla\Firefox\profiles.ini
xcopy /sy /e /I C:\Workspace\Profiles %APPDATA%\Mozilla\Firefox\Profiles
@ECHO Write script to get app version
echo if (${env:ProgramFiles(x86)} -ne $null) {$dir=${env:ProgramFiles(x86)}} else {$dir=${env:ProgramFiles}} >> GetVersion.ps1
echo $Firefox=$dir + '\Mozilla Firefox\firefox.exe' >> GetVersion.ps1
echo (Get-Item $Firefox).VersionInfo.ProductVersion >> GetVersion.ps1
# 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
# Get app version
cmd powershell -executionpolicy remotesigned -File GetVersion.ps1
var tag = last
meta tag=tag
###################################
# Environment Variables
###################################
env path=""
env pathext=""
###################################
# Clean up
###################################
workdir C:\
batch
rmdir C:\Workspace /s /q
rmdir C:\wget /s /q
###################################
# Startup File
###################################
startup file ("@PROGRAMFILESX86@\Mozilla Firefox\firefox.exe")
###################################
# Settings
###################################
isolate window:firefoxMessageWindow full
# requires vm 21.11+
enable ChromiumSupport