Spaces:
Running
Running
Daniel Huynh
commited on
Commit
·
8042b49
1
Parent(s):
4442dc4
feat: woorking demo
Browse filesThis view is limited to 50 files because it contains too many changes.
See raw diff
- app.py +91 -94
- chrome-linux64/ABOUT +0 -9
- chrome-linux64/MEIPreload/manifest.json +0 -8
- chrome-linux64/MEIPreload/preloaded_data.pb +0 -3
- chrome-linux64/chrome +0 -3
- chrome-linux64/chrome-wrapper +0 -163
- chrome-linux64/chrome_100_percent.pak +0 -0
- chrome-linux64/chrome_200_percent.pak +0 -3
- chrome-linux64/chrome_crashpad_handler +0 -3
- chrome-linux64/chrome_debug.log +0 -12
- chrome-linux64/chrome_sandbox +0 -0
- chrome-linux64/icudtl.dat +0 -3
- chrome-linux64/libEGL.so +0 -0
- chrome-linux64/libGLESv2.so +0 -3
- chrome-linux64/libvk_swiftshader.so +0 -3
- chrome-linux64/libvulkan.so.1 +0 -0
- chrome-linux64/locales/af.pak +0 -0
- chrome-linux64/locales/af.pak.info +0 -0
- chrome-linux64/locales/am.pak +0 -0
- chrome-linux64/locales/am.pak.info +0 -0
- chrome-linux64/locales/ar.pak +0 -0
- chrome-linux64/locales/ar.pak.info +0 -0
- chrome-linux64/locales/bg.pak +0 -0
- chrome-linux64/locales/bg.pak.info +0 -0
- chrome-linux64/locales/bn.pak +0 -3
- chrome-linux64/locales/bn.pak.info +0 -0
- chrome-linux64/locales/ca.pak +0 -0
- chrome-linux64/locales/ca.pak.info +0 -0
- chrome-linux64/locales/cs.pak +0 -0
- chrome-linux64/locales/cs.pak.info +0 -0
- chrome-linux64/locales/da.pak +0 -0
- chrome-linux64/locales/da.pak.info +0 -0
- chrome-linux64/locales/de.pak +0 -0
- chrome-linux64/locales/de.pak.info +0 -0
- chrome-linux64/locales/el.pak +0 -3
- chrome-linux64/locales/el.pak.info +0 -0
- chrome-linux64/locales/en-GB.pak +0 -0
- chrome-linux64/locales/en-GB.pak.info +0 -0
- chrome-linux64/locales/en-US.pak +0 -0
- chrome-linux64/locales/en-US.pak.info +0 -0
- chrome-linux64/locales/es-419.pak +0 -0
- chrome-linux64/locales/es-419.pak.info +0 -0
- chrome-linux64/locales/es.pak +0 -0
- chrome-linux64/locales/es.pak.info +0 -0
- chrome-linux64/locales/et.pak +0 -0
- chrome-linux64/locales/et.pak.info +0 -0
- chrome-linux64/locales/fa.pak +0 -0
- chrome-linux64/locales/fa.pak.info +0 -0
- chrome-linux64/locales/fi.pak +0 -0
- chrome-linux64/locales/fi.pak.info +0 -0
app.py
CHANGED
@@ -1,52 +1,21 @@
|
|
1 |
import gradio as gr
|
2 |
-
from selenium import webdriver
|
3 |
-
from selenium.webdriver.chrome.service import Service
|
4 |
-
from selenium.webdriver.common.by import By
|
5 |
-
from selenium.webdriver.chrome.options import Options
|
6 |
-
from selenium.webdriver.common.keys import Keys
|
7 |
from lavague.ActionEngine import ActionEngine
|
8 |
from lavague.defaults import DefaultLocalLLM, DefaultLLM
|
9 |
from llama_index.llms.huggingface import HuggingFaceInferenceAPI
|
|
|
|
|
|
|
|
|
10 |
|
11 |
MAX_CHARS = 1500
|
12 |
|
|
|
|
|
|
|
13 |
# Use this action_engine instead to have a local inference
|
14 |
# action_engine = ActionEngine(llm=DefaultLocalLLM())
|
15 |
|
16 |
-
|
17 |
-
import os
|
18 |
-
from llama_index.llms.azure_openai import AzureOpenAI
|
19 |
-
|
20 |
-
api_key=os.getenv("AZURE_OPENAI_KEY")
|
21 |
-
api_version="2023-05-15"
|
22 |
-
azure_endpoint = os.getenv("AZURE_OPENAI_ENDPOINT")
|
23 |
-
model = "gpt-4"
|
24 |
-
deployment_name = "gpt-4-turbo"
|
25 |
-
|
26 |
-
llm = AzureOpenAI(
|
27 |
-
model=model,
|
28 |
-
deployment_name=deployment_name,
|
29 |
-
api_key=api_key,
|
30 |
-
azure_endpoint=azure_endpoint,
|
31 |
-
api_version=api_version,
|
32 |
-
temperature=0.0
|
33 |
-
)
|
34 |
-
|
35 |
-
action_engine = ActionEngine(llm=llm)
|
36 |
-
|
37 |
-
## Setup chrome options
|
38 |
-
chrome_options = Options()
|
39 |
-
chrome_options.add_argument("--headless") # Ensure GUI is off
|
40 |
-
chrome_options.add_argument("--no-sandbox")
|
41 |
-
chrome_options.add_argument("--window-size=1600,900")
|
42 |
-
|
43 |
-
# Set path to chrome/chromedriver as per your configuration
|
44 |
-
|
45 |
-
import os.path
|
46 |
-
homedir = os.path.expanduser("~")
|
47 |
-
chrome_options.binary_location = "./chrome-linux64/chrome"
|
48 |
-
webdriver_service = Service("./chromedriver-linux64/chromedriver")
|
49 |
-
|
50 |
|
51 |
title = """
|
52 |
<div align="center">
|
@@ -55,35 +24,62 @@ title = """
|
|
55 |
</div>
|
56 |
"""
|
57 |
|
58 |
-
# Choose Chrome Browser
|
59 |
-
driver = webdriver.Chrome(service=webdriver_service, options=chrome_options)
|
60 |
-
|
61 |
# action_engine = ActionEngine(llm, embedder)
|
62 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
63 |
def process_url(url):
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
return "screenshot.png"
|
69 |
|
70 |
def process_instruction(query, url_input):
|
71 |
-
|
72 |
-
|
73 |
-
state = driver.page_source
|
74 |
query_engine = action_engine.get_query_engine(state)
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
response = ""
|
80 |
-
|
81 |
-
for text in streaming_response.response_gen:
|
82 |
-
# do something with text as they arrive.
|
83 |
-
response += text
|
84 |
-
yield response, source_nodes
|
85 |
-
|
86 |
-
import re
|
87 |
|
88 |
def extract_first_python_code(markdown_text):
|
89 |
# Pattern to match the first ```python ``` code block
|
@@ -99,41 +95,34 @@ def extract_first_python_code(markdown_text):
|
|
99 |
return None
|
100 |
|
101 |
|
102 |
-
def exec_code(code, source_nodes, full_code):
|
103 |
-
print(code)
|
104 |
code = extract_first_python_code(code)
|
105 |
-
html =
|
106 |
try:
|
107 |
-
|
|
|
|
|
108 |
output = "Successful code execution"
|
109 |
status = """<p style="color: green; font-size: 20px; font-weight: bold;">Success!</p>"""
|
110 |
full_code += code
|
111 |
except Exception as e:
|
112 |
output = f"Error in code execution: {str(e)}"
|
113 |
status = """<p style="color: red; font-size: 20px; font-weight: bold;">Failure! Open the Debug tab for more information</p>"""
|
114 |
-
return output, code, html, status, full_code
|
115 |
|
116 |
-
def update_image_display(img):
|
117 |
-
|
118 |
-
|
|
|
|
|
119 |
return "screenshot.png", url
|
120 |
|
121 |
def show_processing_message():
|
122 |
return "Processing..."
|
123 |
|
124 |
-
def
|
125 |
-
|
126 |
-
|
127 |
-
return "screenshot.png", url
|
128 |
-
|
129 |
-
base_url = "https://huggingface.co/"
|
130 |
-
|
131 |
-
instructions = ["Click on the Datasets item on the menu, between Models and Spaces",
|
132 |
-
"Click on the search bar 'Filter by name', type 'The Stack', and press 'Enter'",
|
133 |
-
"Scroll by 500 pixels",]
|
134 |
-
|
135 |
-
with gr.Blocks() as demo:
|
136 |
-
with gr.Tab("LaVague"):
|
137 |
with gr.Row():
|
138 |
gr.HTML(title)
|
139 |
with gr.Row():
|
@@ -154,7 +143,7 @@ with gr.Blocks() as demo:
|
|
154 |
with gr.Column(scale=8):
|
155 |
text_area = gr.Textbox(label="Enter instructions and press 'Enter' to generate code.")
|
156 |
gr.Examples(examples=instructions, inputs=text_area)
|
157 |
-
|
158 |
with gr.Row():
|
159 |
with gr.Column():
|
160 |
log_display = gr.Textbox(interactive=False, lines=20)
|
@@ -163,15 +152,23 @@ with gr.Blocks() as demo:
|
|
163 |
with gr.Row():
|
164 |
with gr.Accordion(label="Full HTML", open=False):
|
165 |
full_html = gr.Code(language="html", label="Full HTML", interactive=False, lines=20)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
166 |
|
167 |
-
|
168 |
-
url_input.submit(process_url, inputs=url_input, outputs=image_display)
|
169 |
-
text_area.submit(show_processing_message, outputs=[status_html]).then(
|
170 |
-
process_instruction, inputs=[text_area, url_input], outputs=[code_display, source_display]
|
171 |
-
).then(
|
172 |
-
exec_code, inputs=[code_display, source_display, full_code],
|
173 |
-
outputs=[log_display, code_display, full_html, status_html, full_code]
|
174 |
-
).then(
|
175 |
-
update_image_display, inputs=image_display, outputs=[image_display, url_input]
|
176 |
-
)
|
177 |
-
demo.launch(debug=True)
|
|
|
1 |
import gradio as gr
|
|
|
|
|
|
|
|
|
|
|
2 |
from lavague.ActionEngine import ActionEngine
|
3 |
from lavague.defaults import DefaultLocalLLM, DefaultLLM
|
4 |
from llama_index.llms.huggingface import HuggingFaceInferenceAPI
|
5 |
+
import base64
|
6 |
+
import requests
|
7 |
+
import uuid
|
8 |
+
import re
|
9 |
|
10 |
MAX_CHARS = 1500
|
11 |
|
12 |
+
USER_ID = str(uuid.uuid4())
|
13 |
+
SERVER_URL = "https://lavague.mithrilsecurity.io"
|
14 |
+
|
15 |
# Use this action_engine instead to have a local inference
|
16 |
# action_engine = ActionEngine(llm=DefaultLocalLLM())
|
17 |
|
18 |
+
action_engine = ActionEngine()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
|
20 |
title = """
|
21 |
<div align="center">
|
|
|
24 |
</div>
|
25 |
"""
|
26 |
|
|
|
|
|
|
|
27 |
# action_engine = ActionEngine(llm, embedder)
|
28 |
|
29 |
+
def exec_code_req(url, code):
|
30 |
+
headers = {
|
31 |
+
"X-User-ID": USER_ID # Include the X-User-ID header for authentication
|
32 |
+
}
|
33 |
+
try:
|
34 |
+
response = requests.post(SERVER_URL + "/execute_req", json={"url": url, "requests": code}, headers=headers)
|
35 |
+
if response.status_code == 200:
|
36 |
+
return response.json()
|
37 |
+
else:
|
38 |
+
return {"error": f"Failed with status code {response.status_code}"}
|
39 |
+
except requests.RequestException as e:
|
40 |
+
return {"error": str(e)}
|
41 |
+
|
42 |
+
def get_html(url):
|
43 |
+
headers = {
|
44 |
+
"X-User-ID": USER_ID # Include the X-User-ID header for authentication
|
45 |
+
}
|
46 |
+
try:
|
47 |
+
response = requests.post(SERVER_URL + "/get_html", json={"url": url}, headers=headers)
|
48 |
+
if response.status_code == 200:
|
49 |
+
return response.json()
|
50 |
+
else:
|
51 |
+
return {"error": f"Failed with status code {response.status_code}"}
|
52 |
+
except requests.RequestException as e:
|
53 |
+
return {"error": str(e)}
|
54 |
+
|
55 |
+
|
56 |
+
def send_request(url):
|
57 |
+
headers = {
|
58 |
+
"X-User-ID": USER_ID # Include the X-User-ID header for authentication
|
59 |
+
}
|
60 |
+
try:
|
61 |
+
response = requests.get(SERVER_URL + "/screenshot", params={"url": url}, headers=headers)
|
62 |
+
if response.status_code == 200:
|
63 |
+
return response.json()
|
64 |
+
else:
|
65 |
+
return {"error": f"Failed with status code {response.status_code}"}
|
66 |
+
except requests.RequestException as e:
|
67 |
+
return {"error": str(e)}
|
68 |
+
|
69 |
def process_url(url):
|
70 |
+
r = send_request(url)
|
71 |
+
f = open("screenshot.png", "wb")
|
72 |
+
scr = base64.b64decode(r["result"])
|
73 |
+
f.write(scr)
|
74 |
return "screenshot.png"
|
75 |
|
76 |
def process_instruction(query, url_input):
|
77 |
+
r = get_html(url_input)
|
78 |
+
state = r["html"]
|
|
|
79 |
query_engine = action_engine.get_query_engine(state)
|
80 |
+
response = query_engine.query(query)
|
81 |
+
source_nodes = response.get_formatted_sources(MAX_CHARS)
|
82 |
+
return response.response, source_nodes
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
83 |
|
84 |
def extract_first_python_code(markdown_text):
|
85 |
# Pattern to match the first ```python ``` code block
|
|
|
95 |
return None
|
96 |
|
97 |
|
98 |
+
def exec_code(code, source_nodes, full_code, url):
|
|
|
99 |
code = extract_first_python_code(code)
|
100 |
+
html = ""
|
101 |
try:
|
102 |
+
r = exec_code_req(url, code)
|
103 |
+
url = r["url"]
|
104 |
+
html = r["html"]
|
105 |
output = "Successful code execution"
|
106 |
status = """<p style="color: green; font-size: 20px; font-weight: bold;">Success!</p>"""
|
107 |
full_code += code
|
108 |
except Exception as e:
|
109 |
output = f"Error in code execution: {str(e)}"
|
110 |
status = """<p style="color: red; font-size: 20px; font-weight: bold;">Failure! Open the Debug tab for more information</p>"""
|
111 |
+
return output, code, html, status, full_code, url
|
112 |
|
113 |
+
def update_image_display(img, url):
|
114 |
+
r = send_request(url)
|
115 |
+
f = open("screenshot.png", "wb")
|
116 |
+
scr = base64.b64decode(r["result"])
|
117 |
+
f.write(scr)
|
118 |
return "screenshot.png", url
|
119 |
|
120 |
def show_processing_message():
|
121 |
return "Processing..."
|
122 |
|
123 |
+
def create_demo(base_url, instructions):
|
124 |
+
with gr.Blocks() as demo:
|
125 |
+
with gr.Tab("LaVague"):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
126 |
with gr.Row():
|
127 |
gr.HTML(title)
|
128 |
with gr.Row():
|
|
|
143 |
with gr.Column(scale=8):
|
144 |
text_area = gr.Textbox(label="Enter instructions and press 'Enter' to generate code.")
|
145 |
gr.Examples(examples=instructions, inputs=text_area)
|
146 |
+
with gr.Tab("Debug"):
|
147 |
with gr.Row():
|
148 |
with gr.Column():
|
149 |
log_display = gr.Textbox(interactive=False, lines=20)
|
|
|
152 |
with gr.Row():
|
153 |
with gr.Accordion(label="Full HTML", open=False):
|
154 |
full_html = gr.Code(language="html", label="Full HTML", interactive=False, lines=20)
|
155 |
+
|
156 |
+
# Linking components
|
157 |
+
url_input.submit(process_url, inputs=url_input, outputs=image_display)
|
158 |
+
text_area.submit(show_processing_message, outputs=[status_html]).then(
|
159 |
+
process_instruction, inputs=[text_area, url_input], outputs=[code_display, source_display]
|
160 |
+
).then(
|
161 |
+
exec_code, inputs=[code_display, source_display, full_code, url_input],
|
162 |
+
outputs=[log_display, code_display, full_html, status_html, full_code, url_input]
|
163 |
+
).then(
|
164 |
+
update_image_display, inputs=[image_display, url_input], outputs=[image_display, url_input]
|
165 |
+
)
|
166 |
+
demo.launch(share=True, debug=True)
|
167 |
+
|
168 |
+
base_url = "https://huggingface.co/"
|
169 |
+
|
170 |
+
instructions = ["Click on the Datasets item on the menu, between Models and Spaces",
|
171 |
+
"Click on the search bar 'Filter by name', type 'The Stack', and press 'Enter'",
|
172 |
+
"Scroll by 500 pixels",]
|
173 |
|
174 |
+
create_demo(base_url, instructions)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
chrome-linux64/ABOUT
DELETED
@@ -1,9 +0,0 @@
|
|
1 |
-
Google Chrome
|
2 |
-
|
3 |
-
Copyright 2024 Google LLC. All rights reserved.
|
4 |
-
|
5 |
-
Chrome is made possible by the Chromium open source project
|
6 |
-
(https://www.chromium.org/) and other open source software
|
7 |
-
(chrome://credits).
|
8 |
-
|
9 |
-
See the Terms of Service at chrome://terms.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
chrome-linux64/MEIPreload/manifest.json
DELETED
@@ -1,8 +0,0 @@
|
|
1 |
-
{
|
2 |
-
"name": "MEI Preload",
|
3 |
-
"icons": {},
|
4 |
-
"version": "1.0.7.1652906823",
|
5 |
-
"manifest_version": 2,
|
6 |
-
"update_url": "https://clients2.google.com/service/update2/crx",
|
7 |
-
"description": "Contains preloaded data for Media Engagement"
|
8 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
chrome-linux64/MEIPreload/preloaded_data.pb
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:c6070a157b4e28d16fbccbd233e93846ddb070c85e1a1bc64469b7a5f1424fad
|
3 |
-
size 8254
|
|
|
|
|
|
|
|
chrome-linux64/chrome
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:2e5f912ec332df79dfcba176cd7219cdefabd9d21a1474262a6eed02f2d66af6
|
3 |
-
size 237713440
|
|
|
|
|
|
|
|
chrome-linux64/chrome-wrapper
DELETED
@@ -1,163 +0,0 @@
|
|
1 |
-
#!/bin/bash
|
2 |
-
|
3 |
-
# Copyright 2011 The Chromium Authors
|
4 |
-
# Use of this source code is governed by a BSD-style license that can be
|
5 |
-
# found in the LICENSE file.
|
6 |
-
|
7 |
-
# Running Chromium via this script makes it possible to set Chromium as the
|
8 |
-
# default browser directly out of a compile, without needing to package it.
|
9 |
-
|
10 |
-
DESKTOP="chromium-devel"
|
11 |
-
TITLE="Chromium"
|
12 |
-
|
13 |
-
usage() {
|
14 |
-
echo "$0 [--gdb] [--help] [--man-page] [--] [chrome-options]"
|
15 |
-
echo
|
16 |
-
echo " --gdb Start within gdb"
|
17 |
-
echo " --help This help screen"
|
18 |
-
echo " --man-page Open the man page in the tree"
|
19 |
-
}
|
20 |
-
|
21 |
-
# Check to see if there is a desktop file of the given name.
|
22 |
-
exists_desktop_file() {
|
23 |
-
# Build a search list from $XDG_DATA_HOME and $XDG_DATA_DIRS, the latter
|
24 |
-
# of which can itself be a colon-separated list of directories to search.
|
25 |
-
search="${XDG_DATA_HOME:-$HOME/.local/share}:${XDG_DATA_DIRS:-/usr/local/share:/usr/share}"
|
26 |
-
IFS=:
|
27 |
-
for dir in $search; do
|
28 |
-
unset IFS
|
29 |
-
[ "$dir" -a -d "$dir/applications" ] || continue
|
30 |
-
[ -r "$dir/applications/$DESKTOP.desktop" ] && return
|
31 |
-
done
|
32 |
-
# Didn't find it in the search path.
|
33 |
-
return 1
|
34 |
-
}
|
35 |
-
|
36 |
-
# Checks a file to see if it's a 32 or 64-bit.
|
37 |
-
check_executable() {
|
38 |
-
out=$(file $(readlink -f $1) 2> /dev/null)
|
39 |
-
echo $out | grep -qs "ELF 32-bit LSB"
|
40 |
-
if [ $? = 0 ]; then
|
41 |
-
echo 32
|
42 |
-
return
|
43 |
-
fi
|
44 |
-
echo $out | grep -qs "ELF 64-bit LSB"
|
45 |
-
if [ $? = 0 ]; then
|
46 |
-
echo 64
|
47 |
-
return
|
48 |
-
fi
|
49 |
-
echo neither
|
50 |
-
}
|
51 |
-
|
52 |
-
# Generate a desktop file that will run this script.
|
53 |
-
generate_desktop_file() {
|
54 |
-
apps="${XDG_DATA_HOME:-$HOME/.local/share}/applications"
|
55 |
-
mkdir -p "$apps"
|
56 |
-
cat > "$apps/$DESKTOP.desktop" << EOF
|
57 |
-
[Desktop Entry]
|
58 |
-
Version=1.0
|
59 |
-
Encoding=UTF-8
|
60 |
-
Name=$TITLE
|
61 |
-
Exec=$CHROME_WRAPPER %U
|
62 |
-
Terminal=false
|
63 |
-
Icon=$HERE/product_logo_48.png
|
64 |
-
Type=Application
|
65 |
-
Categories=Application;Network;WebBrowser;
|
66 |
-
MimeType=text/html;text/xml;application/xhtml_xml;
|
67 |
-
EOF
|
68 |
-
}
|
69 |
-
|
70 |
-
# Let the wrapped binary know that it has been run through the wrapper.
|
71 |
-
export CHROME_WRAPPER="`readlink -f "$0"`"
|
72 |
-
export CHROME_DESKTOP="$DESKTOP.desktop"
|
73 |
-
|
74 |
-
HERE="`dirname "$CHROME_WRAPPER"`"
|
75 |
-
|
76 |
-
# We include some xdg utilities next to the binary, and we want to prefer them
|
77 |
-
# over the system versions when we know the system versions are very old. We
|
78 |
-
# detect whether the system xdg utilities are sufficiently new to be likely to
|
79 |
-
# work for us by looking for xdg-settings. If we find it, we leave $PATH alone,
|
80 |
-
# so that the system xdg utilities (including any distro patches) will be used.
|
81 |
-
if ! which xdg-settings &> /dev/null; then
|
82 |
-
# Old xdg utilities. Prepend $HERE to $PATH to use ours instead.
|
83 |
-
export PATH="$HERE:$PATH"
|
84 |
-
else
|
85 |
-
# Use system xdg utilities. But first create mimeapps.list if it doesn't
|
86 |
-
# exist; some systems have bugs in xdg-mime that make it fail without it.
|
87 |
-
xdg_app_dir="${XDG_DATA_HOME:-$HOME/.local/share/applications}"
|
88 |
-
mkdir -p "$xdg_app_dir"
|
89 |
-
[ -f "$xdg_app_dir/mimeapps.list" ] || touch "$xdg_app_dir/mimeapps.list"
|
90 |
-
fi
|
91 |
-
|
92 |
-
# Always use our ffmpeg and other shared libs.
|
93 |
-
export LD_LIBRARY_PATH="$HERE:$HERE/lib:$HERE/lib.target${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}"
|
94 |
-
|
95 |
-
MISSING_LIBS=$(ldd "$HERE/chrome" 2> /dev/null |grep "not found$" | cut -d" " -f 1|sed 's/\t//')
|
96 |
-
CHROME_ARCH=$(check_executable "$HERE/chrome")
|
97 |
-
uname -m | grep -qs x86_64
|
98 |
-
if [ $? = 1 ]; then
|
99 |
-
LIBDIRS="/lib /lib32 /usr/lib /usr/lib32"
|
100 |
-
else
|
101 |
-
LIBDIRS="/lib64 /lib /usr/lib64 /usr/lib"
|
102 |
-
fi
|
103 |
-
|
104 |
-
echo $MISSING_LIBS | grep -qs libbz2.so.1.0
|
105 |
-
if [ $? = 0 ]; then
|
106 |
-
for dir in $LIBDIRS
|
107 |
-
do
|
108 |
-
if [ -e "$dir/libbz2.so.1" ]; then
|
109 |
-
LIB_ARCH=$(check_executable "$dir/libbz2.so.1")
|
110 |
-
if [ "$CHROME_ARCH" = "$LIB_ARCH" ]; then
|
111 |
-
ln -snf "$dir/libbz2.so.1" "$HERE/libbz2.so.1.0"
|
112 |
-
break;
|
113 |
-
fi
|
114 |
-
fi
|
115 |
-
done
|
116 |
-
fi
|
117 |
-
|
118 |
-
for lib in libnspr4.so.0d libnss3.so.1d libnssutil3.so.1d libplc4.so.0d libplds4.so.0d libsmime3.so.1d libssl3.so.1d
|
119 |
-
do
|
120 |
-
echo $MISSING_LIBS | grep -qs $lib
|
121 |
-
if [ $? = 0 ]; then
|
122 |
-
reallib=$(echo $lib | sed 's/\.[01]d$//')
|
123 |
-
for dir in $LIBDIRS
|
124 |
-
do
|
125 |
-
if [ -e "$dir/$reallib" ]; then
|
126 |
-
LIB_ARCH=$(check_executable "$dir/$reallib")
|
127 |
-
if [ "$CHROME_ARCH" = "$LIB_ARCH" ]; then
|
128 |
-
ln -snf "$dir/$reallib" "$HERE/$lib"
|
129 |
-
break;
|
130 |
-
fi
|
131 |
-
fi
|
132 |
-
done
|
133 |
-
fi
|
134 |
-
done
|
135 |
-
|
136 |
-
# Custom version string for this release. This can be used to add a downstream
|
137 |
-
# vendor string or release channel information.
|
138 |
-
export CHROME_VERSION_EXTRA="custom"
|
139 |
-
|
140 |
-
exists_desktop_file || generate_desktop_file
|
141 |
-
|
142 |
-
CMD_PREFIX=
|
143 |
-
ARGS=()
|
144 |
-
while [ "$#" -gt 0 ]; do
|
145 |
-
case "$1" in
|
146 |
-
"--")
|
147 |
-
shift
|
148 |
-
break ;;
|
149 |
-
"--gdb")
|
150 |
-
CMD_PREFIX="gdb --args" ;;
|
151 |
-
"--help")
|
152 |
-
usage
|
153 |
-
exit 0 ;;
|
154 |
-
"--man-page")
|
155 |
-
exec man "$HERE/../../chrome/app/resources/manpage.1.in" ;;
|
156 |
-
*)
|
157 |
-
ARGS=( "${ARGS[@]}" "$1" ) ;;
|
158 |
-
esac
|
159 |
-
shift
|
160 |
-
done
|
161 |
-
set -- "${ARGS[@]}" "$@"
|
162 |
-
|
163 |
-
exec $CMD_PREFIX "$HERE/chrome" "$@"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
chrome-linux64/chrome_100_percent.pak
DELETED
Binary file (689 kB)
|
|
chrome-linux64/chrome_200_percent.pak
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:a83953bdc30a7bef4aac291c3dd372347112d06c6e349eb911465e00ee3cc230
|
3 |
-
size 1079901
|
|
|
|
|
|
|
|
chrome-linux64/chrome_crashpad_handler
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:c3f16888562dacb3ba8f176760a154d4e265ec9934546e7d8c7d16bdbf309380
|
3 |
-
size 1285544
|
|
|
|
|
|
|
|
chrome-linux64/chrome_debug.log
DELETED
@@ -1,12 +0,0 @@
|
|
1 |
-
[0315/230118.453008:WARNING:sandbox_linux.cc(418)] InitializeSandbox() called with multiple threads in process gpu-process.
|
2 |
-
[0315/230118.457310:ERROR:command_buffer_proxy_impl.cc(131)] ContextResult::kTransientFailure: Failed to send GpuControl.CreateCommandBuffer.
|
3 |
-
[0315/230730.412325:WARNING:sandbox_linux.cc(418)] InitializeSandbox() called with multiple threads in process gpu-process.
|
4 |
-
[0315/230730.416401:ERROR:command_buffer_proxy_impl.cc(131)] ContextResult::kTransientFailure: Failed to send GpuControl.CreateCommandBuffer.
|
5 |
-
[0315/230847.823186:WARNING:sandbox_linux.cc(418)] InitializeSandbox() called with multiple threads in process gpu-process.
|
6 |
-
[0315/230847.827306:ERROR:command_buffer_proxy_impl.cc(131)] ContextResult::kTransientFailure: Failed to send GpuControl.CreateCommandBuffer.
|
7 |
-
[0315/230848.271773:WARNING:sandbox_linux.cc(418)] InitializeSandbox() called with multiple threads in process gpu-process.
|
8 |
-
[0315/230848.275744:ERROR:command_buffer_proxy_impl.cc(131)] ContextResult::kTransientFailure: Failed to send GpuControl.CreateCommandBuffer.
|
9 |
-
[0315/231648.363103:WARNING:sandbox_linux.cc(418)] InitializeSandbox() called with multiple threads in process gpu-process.
|
10 |
-
[0315/231648.460819:WARNING:sqlite_persistent_store_backend_base.cc(197)] Failed to post task from operator()@net/extras/sqlite/sqlite_persistent_shared_dictionary_store.cc:253 to client_task_runner_.
|
11 |
-
[0315/231658.347556:WARNING:sandbox_linux.cc(418)] InitializeSandbox() called with multiple threads in process gpu-process.
|
12 |
-
[0315/231658.351751:ERROR:command_buffer_proxy_impl.cc(131)] ContextResult::kTransientFailure: Failed to send GpuControl.CreateCommandBuffer.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
chrome-linux64/chrome_sandbox
DELETED
Binary file (210 kB)
|
|
chrome-linux64/icudtl.dat
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:f5170aa2b388d23bebf98784dd488a9bcb741470384a6a9a8d7a2638d768defb
|
3 |
-
size 10717392
|
|
|
|
|
|
|
|
chrome-linux64/libEGL.so
DELETED
Binary file (243 kB)
|
|
chrome-linux64/libGLESv2.so
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:959ac39416543aef8182a37d1b36d0c038bc947977d6269a69a4cd4fd4144034
|
3 |
-
size 6621128
|
|
|
|
|
|
|
|
chrome-linux64/libvk_swiftshader.so
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:f93571a29ce28faf90498336e55353b3f950496cd0d03788e7dc1fcceabcb27c
|
3 |
-
size 4027696
|
|
|
|
|
|
|
|
chrome-linux64/libvulkan.so.1
DELETED
Binary file (609 kB)
|
|
chrome-linux64/locales/af.pak
DELETED
Binary file (496 kB)
|
|
chrome-linux64/locales/af.pak.info
DELETED
The diff for this file is too large to render.
See raw diff
|
|
chrome-linux64/locales/am.pak
DELETED
Binary file (805 kB)
|
|
chrome-linux64/locales/am.pak.info
DELETED
The diff for this file is too large to render.
See raw diff
|
|
chrome-linux64/locales/ar.pak
DELETED
Binary file (888 kB)
|
|
chrome-linux64/locales/ar.pak.info
DELETED
The diff for this file is too large to render.
See raw diff
|
|
chrome-linux64/locales/bg.pak
DELETED
Binary file (918 kB)
|
|
chrome-linux64/locales/bg.pak.info
DELETED
The diff for this file is too large to render.
See raw diff
|
|
chrome-linux64/locales/bn.pak
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:9f006dfdfd3765dd2596028d9d647507104795c666926bf72bcc21dc8b8ad8c5
|
3 |
-
size 1180551
|
|
|
|
|
|
|
|
chrome-linux64/locales/bn.pak.info
DELETED
The diff for this file is too large to render.
See raw diff
|
|
chrome-linux64/locales/ca.pak
DELETED
Binary file (567 kB)
|
|
chrome-linux64/locales/ca.pak.info
DELETED
The diff for this file is too large to render.
See raw diff
|
|
chrome-linux64/locales/cs.pak
DELETED
Binary file (577 kB)
|
|
chrome-linux64/locales/cs.pak.info
DELETED
The diff for this file is too large to render.
See raw diff
|
|
chrome-linux64/locales/da.pak
DELETED
Binary file (525 kB)
|
|
chrome-linux64/locales/da.pak.info
DELETED
The diff for this file is too large to render.
See raw diff
|
|
chrome-linux64/locales/de.pak
DELETED
Binary file (565 kB)
|
|
chrome-linux64/locales/de.pak.info
DELETED
The diff for this file is too large to render.
See raw diff
|
|
chrome-linux64/locales/el.pak
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:6fd858f28be29bc92d93edbfaf174bfe7e593b034767d36703bebf444e810154
|
3 |
-
size 1005183
|
|
|
|
|
|
|
|
chrome-linux64/locales/el.pak.info
DELETED
The diff for this file is too large to render.
See raw diff
|
|
chrome-linux64/locales/en-GB.pak
DELETED
Binary file (455 kB)
|
|
chrome-linux64/locales/en-GB.pak.info
DELETED
The diff for this file is too large to render.
See raw diff
|
|
chrome-linux64/locales/en-US.pak
DELETED
Binary file (459 kB)
|
|
chrome-linux64/locales/en-US.pak.info
DELETED
The diff for this file is too large to render.
See raw diff
|
|
chrome-linux64/locales/es-419.pak
DELETED
Binary file (554 kB)
|
|
chrome-linux64/locales/es-419.pak.info
DELETED
The diff for this file is too large to render.
See raw diff
|
|
chrome-linux64/locales/es.pak
DELETED
Binary file (553 kB)
|
|
chrome-linux64/locales/es.pak.info
DELETED
The diff for this file is too large to render.
See raw diff
|
|
chrome-linux64/locales/et.pak
DELETED
Binary file (504 kB)
|
|
chrome-linux64/locales/et.pak.info
DELETED
The diff for this file is too large to render.
See raw diff
|
|
chrome-linux64/locales/fa.pak
DELETED
Binary file (816 kB)
|
|
chrome-linux64/locales/fa.pak.info
DELETED
The diff for this file is too large to render.
See raw diff
|
|
chrome-linux64/locales/fi.pak
DELETED
Binary file (512 kB)
|
|
chrome-linux64/locales/fi.pak.info
DELETED
The diff for this file is too large to render.
See raw diff
|
|