Skip to content

Commit b4c1c2a

Browse files
committed
Undo unneded formatting changes
Change-Id: I93b4b337b5571c1391d37ed914a4fad6b5aa3660
1 parent f58ef2f commit b4c1c2a

File tree

2 files changed

+115
-126
lines changed

2 files changed

+115
-126
lines changed

install-photobooth.sh

Lines changed: 58 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ SKIP_WEBSERVER=false
1212
SKIP_PHP=false
1313
SKIP_NODE=false
1414
SKIP_PYTHON=false
15-
SKIP_GUNICORN=false
16-
SKIP_NGROK=false
15+
SKIP_GUNICORN=true
16+
SKIP_NGROK=true
1717
PHOTOBOOTH_FOUND=false
1818
INSTALLFOLDERPATH=""
1919
PHOTOBOOTH_SUBFOLDER=""
@@ -23,10 +23,8 @@ WEBBROWSER="unknown"
2323

2424
# GitHub
2525
GIT_INSTALLED=false
26-
GIT_REPO_URL="https://github.com/frogro/photobooth.git"
27-
GIT_REMOTE_NAME="origin"
28-
BRANCH="feature/sumup-payment"
29-
REMOTE_BRANCH_API=""
26+
BRANCH="dev"
27+
REMOTE_BRANCH_API="https://api.github.com/repos/PhotoboothProject/photobooth/branches/${BRANCH}"
3028
REMOTE_BRANCH_SHA=""
3129

3230
# OS environment
@@ -184,21 +182,21 @@ function error() {
184182

185183
function print_logo() {
186184
local logo="
187-
%@@@@.
188-
@@ @@*
189-
@@@@@@@@@@@@@@@@@@@@@@
190-
@@%%%%%%%%%%%%%%%%%%%%%@
191-
@@ @@@@@@ @@
192-
@@ @@ @@ @@
193-
@@ @@ @@ @@
194-
@@ @@ @@ @@
195-
@@ @@ @@ @@
196-
@@ @@@@@@ @@
197-
@@%%%%%%%%%%%%%%%%%%%%%@
198-
199-
P H O T O B O O T H
200-
201-
@@%%%%%%%%%%%%%%%%%%%%%@
185+
%@@@@.
186+
@@ @@*
187+
@@@@@@@@@@@@@@@@@@@@@@
188+
@@%%%%%%%%%%%%%%%%%%%%%@
189+
@@ @@@@@@ @@
190+
@@ @@ @@ @@
191+
@@ @@ @@ @@
192+
@@ @@ @@ @@
193+
@@ @@ @@ @@
194+
@@ @@@@@@ @@
195+
@@%%%%%%%%%%%%%%%%%%%%%@
196+
197+
P H O T O B O O T H
198+
199+
@@%%%%%%%%%%%%%%%%%%%%%@
202200
"
203201

204202
if [ "$SILENT" = true ]; then
@@ -216,28 +214,28 @@ function show_help() {
216214
echo ""
217215
echo "Adjust your setup for Photobooth. Available options:"
218216
echo ""
219-
echo " --branch=<branch> Specify the Git branch to use for installation or updates."
220-
echo " --php=<version> Set the PHP version for the setup (e.g., --php=8.3)."
221-
echo " --silent Run the Photobooth Setup Wizard in silent mode"
222-
echo " for automated installation or updates."
223-
echo " --username=\"<username>\" Required if --silent is used."
224-
echo " Provide a username for installation or updates."
225-
echo " --raspberry Skip automatic Raspberry Pi detection and enable Raspberry Pi specific configuration."
226-
echo " --wayland Skip automatic Wayland detection and enable Wayland configuration."
227-
echo " --update Requires --silent to update Photobooth if installed already."
228-
echo " --skip-webserver Skip web server setup"
229-
echo " (if already configured or e.g. Nginx is used as Webserver)."
230-
echo " --skip-php Skip PHP installation"
231-
echo " (if already configured for used Webserver)."
232-
echo " --skip-node Skip Node.js and npm installation"
233-
echo " (if already installed as required)."
234-
echo " --skip-python Skip python3 installation"
235-
echo " (if already installed as required)."
236-
echo " --skip-gunicorn Skip Gunicorn installation"
237-
echo " (for SumUp webhook service)."
238-
echo " --skip-ngrok Skip ngrok installation"
239-
echo " (for SumUp webhook tunnel)."
240-
echo " --skip-auto-update Skip automatic updates for Photobooth Setup Wizard."
217+
echo " --branch=<branch> Specify the Git branch to use for installation or updates."
218+
echo " --php=<version> Set the PHP version for the setup (e.g., --php=8.3)."
219+
echo " --silent Run the Photobooth Setup Wizard in silent mode"
220+
echo " for automated installation or updates."
221+
echo " --username=\"<username>\" Required if --silent is used."
222+
echo " Provide a username for installation or updates."
223+
echo " --raspberry Skip automatic Raspberry Pi detection and enable Raspberry Pi specific configuration."
224+
echo " --wayland Skip automatic Wayland detection and enable Wayland configuration."
225+
echo " --update Requires --silent to update Photobooth if installed already."
226+
echo " --skip-webserver Skip web server setup"
227+
echo " (if already configured or e.g. Nginx is used as Webserver)."
228+
echo " --skip-php Skip PHP installation"
229+
echo " (if already configured for used Webserver)."
230+
echo " --skip-node Skip Node.js and npm installation"
231+
echo " (if already installed as required)."
232+
echo " --skip-python Skip python3 installation"
233+
echo " (if already installed as required)."
234+
echo " --skip-gunicorn Skip Gunicorn installation"
235+
echo " (for SumUp webhook service)."
236+
echo " --skip-ngrok Skip ngrok installation"
237+
echo " (for SumUp webhook tunnel)."
238+
echo " --skip-auto-update Skip automatic updates for Photobooth Setup Wizard."
241239
echo ""
242240
echo "Examples:"
243241
echo " $0 --silent --branch=dev --php=8.3 --username=\"photobooth\" --update"
@@ -302,7 +300,7 @@ function is_wayland_env() {
302300
function install_system_icon() {
303301
local icon_dir="/usr/share/icons/hicolor/scalable/apps"
304302
local icon_file="$icon_dir/photobooth.svg"
305-
local icon_url="https://github.com/frogro/photobooth/raw/refs/heads/${BRANCH}/resources/img/favicon.svg"
303+
local icon_url="https://github.com/PhotoboothProject/photobooth/raw/refs/heads/dev/resources/img/favicon.svg"
306304
local local_file=""
307305

308306
# Return if icon already exists
@@ -959,7 +957,7 @@ function check_username() {
959957
else
960958
confirm "Invalid Username" "The username '$USERNAME' does not exist. Please try again."
961959
USERNAME=""
962-
fi
960+
fi
963961
fi
964962
else
965963
if [ "$SILENT" = true ]; then
@@ -2870,10 +2868,6 @@ function check_remote_sha() {
28702868
local json_data
28712869
local commit_sha
28722870

2873-
if [[ -z "$REMOTE_BRANCH_API" ]]; then
2874-
return 1
2875-
fi
2876-
28772871
json_data=$(curl -s "$REMOTE_BRANCH_API")
28782872
if [[ -z "$json_data" ]]; then
28792873
info "Error" "Failed to retrieve remote branch data."
@@ -2941,18 +2935,13 @@ function check_photobooth_version() {
29412935

29422936
function add_git_remote() {
29432937
info "GitHub remote" "Checking needed remote information..."
2944-
if sudo -u www-data git config remote.${GIT_REMOTE_NAME}.url >/dev/null; then
2945-
info "GitHub remote" "${GIT_REMOTE_NAME} remote exists already"
2946-
if ! sudo -u www-data git remote set-url ${GIT_REMOTE_NAME} "${GIT_REPO_URL}" >/dev/null 2>&1; then
2947-
error "Updating ${GIT_REMOTE_NAME} remote failed."
2948-
confirm "GitHub remote Error" "Failed to update the Git remote URL."
2949-
return 1
2950-
fi
2938+
if sudo -u www-data git config remote.photoboothproject.url >/dev/null; then
2939+
info "GitHub remote" "photoboothproject remote exist already"
29512940
else
2952-
info "GitHub remote" "Adding ${GIT_REMOTE_NAME} remote..."
2953-
if ! sudo -u www-data git remote add ${GIT_REMOTE_NAME} "${GIT_REPO_URL}"; then
2954-
error "Adding ${GIT_REMOTE_NAME} remote failed."
2955-
confirm "GitHub remote Error" "Failed to add the Git remote repository."
2941+
info "GitHub remote" "Adding photoboothproject remote..."
2942+
if ! sudo -u www-data git remote add photoboothproject https://github.com/PhotoboothProject/photobooth.git; then
2943+
error "Adding photoboothproject remote failed."
2944+
confirm "GitHub remote Error" "Failed to add the Photobooth remote repository."
29562945
return 1
29572946
fi
29582947
fi
@@ -2970,7 +2959,7 @@ function do_git_clone() {
29702959
chown www-data:www-data "$INSTALLFOLDERPATH"
29712960

29722961
info "GitHub clone" "Cloning the Photobooth repository..."
2973-
if ! sudo -u www-data git clone "${GIT_REPO_URL}" "$INSTALLFOLDERPATH" >/dev/null 2>&1; then
2962+
if ! sudo -u www-data git clone https://github.com/PhotoboothProject/photobooth "$INSTALLFOLDERPATH" >/dev/null 2>&1; then
29742963
error "Failed to clone the Photobooth repository."
29752964
confirm "Error: git clone failed" "Failed to clone the Photobooth repository.\nPlease check your network connection and permissions, then retry."
29762965
return 1
@@ -2994,8 +2983,8 @@ function start_git_install() {
29942983
# Configure Git settings and fetch the specified branch
29952984
info "GitHub installation" "Installing/Updating Photobooth via git."
29962985
sudo -u www-data git config core.fileMode false >/dev/null 2>&1
2997-
sudo -u www-data git fetch ${GIT_REMOTE_NAME} "$BRANCH" >/dev/null 2>&1
2998-
if ! sudo -u www-data git checkout -B "$BRANCH" "${GIT_REMOTE_NAME}/$BRANCH" >/dev/null 2>&1; then
2986+
sudo -u www-data git fetch photoboothproject "$BRANCH" >/dev/null 2>&1
2987+
if ! sudo -u www-data git checkout photoboothproject/"$BRANCH" >/dev/null 2>&1; then
29992988
error "Failed to fetch or checkout the branch: $BRANCH."
30002989
return 2
30012990
fi
@@ -3591,7 +3580,7 @@ function printer_setup() {
35913580
confirm "Printer Setup" "An unknown error occurred during setup to print from any address."
35923581
;;
35933582
esac
3594-
;;
3583+
;;
35953584
2)
35963585
cups_disable_remote_any
35973586
case $? in
@@ -3608,7 +3597,7 @@ function printer_setup() {
36083597
confirm "Printer Setup" "An unknown error occurred during setup to disable print from any address."
36093598
;;
36103599
esac
3611-
;;
3600+
;;
36123601
3)
36133602
cups_enable_share
36143603
case $? in
@@ -3625,7 +3614,7 @@ function printer_setup() {
36253614
confirm "Printer Setup" "An unknown error occurred during printer sharing."
36263615
;;
36273616
esac
3628-
;;
3617+
;;
36293618
4)
36303619
cups_disable_share
36313620
case $? in
@@ -3642,7 +3631,7 @@ function printer_setup() {
36423631
confirm "Printer Setup" "An unknown error occurred during disabling printer sharing."
36433632
;;
36443633
esac
3645-
;;
3634+
;;
36463635
5)
36473636
cups_enable_remote_admin
36483637
case $? in
@@ -3659,7 +3648,7 @@ function printer_setup() {
36593648
confirm "Printer Setup" "An unknown error occurred during remote administration setup."
36603649
;;
36613650
esac
3662-
;;
3651+
;;
36633652
6)
36643653
cups_disable_remote_admin
36653654
case $? in
@@ -3676,7 +3665,7 @@ function printer_setup() {
36763665
confirm "Printer Setup" "An unknown error occurred during setup to disable remote administration."
36773666
;;
36783667
esac
3679-
;;
3668+
;;
36803669
7)
36813670
setup_printer_groups
36823671
case $? in

lib/configsetup.inc.php

Lines changed: 57 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -14,68 +14,68 @@
1414
** This file defines the admin panel of photobooth. The admin panel definition is done in a JSON variable and structured as follows
1515
**
1616
** Admin panel
17-
** |- Section 1
18-
** | |- Parameter 1
19-
** | |- Parameter 2
20-
** | |- Setting A
21-
** | |- Setting B
22-
** |
23-
** |- Section 2
24-
** | |- Setting C
25-
** | |- Setting D
26-
** | |- Setting E
27-
** |
28-
** |- Section 3
29-
** | |- Parameter 1
30-
** | |- ...
31-
** |
32-
** |...
17+
** |- Section 1
18+
** | |- Parameter 1
19+
** | |- Parameter 2
20+
** | |- Setting A
21+
** | |- Setting B
22+
** |
23+
** |- Section 2
24+
** | |- Setting C
25+
** | |- Setting D
26+
** | |- Setting E
27+
** |
28+
** |- Section 3
29+
** | |- Parameter 1
30+
** | |- ...
31+
** |
32+
** |...
3333
**
3434
** * Section descriptor
35-
** - Always key / array pair
36-
** * 'key': always starts with a character, consists of characters, numbers and underscore only
37-
** - Admin panel sort order is defined by the order in this config file
38-
** - The i18n tag for translation is identified by the actual section key
39-
** - Parameter: Key / Value pairs are parameters which apply to how the section is displayed in the admin panel
40-
** * 'view' (optional): Accepted values are 'basic', 'advanced' or 'expert'. Defines in which admin panel view mode
41-
** the section is shown or not. Missing parameter defaults to 'expert'.
42-
** * 'platform' (optional): Accepted values are 'all', 'linux', 'windows'. Defines whether the section is visible
43-
** by platform. Missing parameter defaults to 'all'
44-
** - Settings: Key / Array pairs define a setting (see next)
35+
** - Always key / array pair
36+
** * 'key': always starts with a character, consists of characters, numbers and underscore only
37+
** - Admin panel sort order is defined by the order in this config file
38+
** - The i18n tag for translation is identified by the actual section key
39+
** - Parameter: Key / Value pairs are parameters which apply to how the section is displayed in the admin panel
40+
** * 'view' (optional): Accepted values are 'basic', 'advanced' or 'expert'. Defines in which admin panel view mode
41+
** the section is shown or not. Missing parameter defaults to 'expert'.
42+
** * 'platform' (optional): Accepted values are 'all', 'linux', 'windows'. Defines whether the section is visible
43+
** by platform. Missing parameter defaults to 'all'
44+
** - Settings: Key / Array pairs define a setting (see next)
4545
**
4646
** * Settings descriptor
47-
** - Is a key / array pair where the key string is distinct across the entire admin panel. Even with different sections, no
48-
** duplicate setting keys are allowed across the file.
49-
** * 'key': always starts with a character, consists of characters, numbers and underscore only
50-
** - Admin panel sort order is defined by the order in this config file
51-
** - The i18n tag for translation is identified by concatenation of section key, ':', setting key. Tags for manual entries
52-
** start with "manual:"
53-
** Examples:
54-
** "general:ui_language"
55-
** "user_interface:button_show_fs"
56-
** "manual:print:print_from_result"
47+
** - Is a key / array pair where the key string is distinct across the entire admin panel. Even with different sections, no
48+
** duplicate setting keys are allowed across the file.
49+
** * 'key': always starts with a character, consists of characters, numbers and underscore only
50+
** - Admin panel sort order is defined by the order in this config file
51+
** - The i18n tag for translation is identified by concatenation of section key, ':', setting key. Tags for manual entries
52+
** start with "manual:"
53+
** Examples:
54+
** "general:ui_language"
55+
** "user_interface:button_show_fs"
56+
** "manual:print:print_from_result"
5757
**
58-
** - Parameter: Can be key/value or key/array pairs. Sort order does not matter.
59-
** * 'view' (optional): Accepted values are 'basic', 'advanced' or 'expert'. Defines in which admin panel view mode
60-
** the section is shown or not. Missing parameter defaults to 'expert'.
61-
** * 'name': Matches the name of the config variable or array. For type 'button' this has no effect.
62-
** * 'data-theme-field'
63-
** * 'type': Values are 'input', 'number', 'range', 'color', 'hidden', 'checkbox', 'multi-select', 'select', 'button'. Defines the actual
64-
** input type in the admin panel for this setting.
65-
** * 'value': Value is a reference to the actual PB config (i.e. 'value' => $config['dev']['reload_on_error']) and pre-
66-
** populates the current config value into the admin panel
67-
** Exceptionally, for type 'button' this is the HTML element ID applied to the actual button itself.
68-
** * 'placeholder': For types 'input', 'range', 'color' to prepopulate / preset the admin panel setting entry
69-
** field / range selector. Often references the default config for this setting
70-
** (i.e 'placeholder' => $defaultConfig['picture']['time_to_live'])
71-
** For type 'button' this is the i18ntag string for the actual button text.
72-
** * 'option': Only for types 'select','multi-select'. Lists the options available in this setting (i.e.
73-
** 'options' => [
74-
** '360px' => 'XS',
75-
** '540px' => 'S',
76-
** ])
77-
** * 'range_min', 'range_max', 'range_step': Only for type 'range'. Define the slider range and step when moved
78-
** * 'unit': Only for type 'range'. Defines the unit of the slider and is used to identify the i18n tag for translation of the unit
58+
** - Parameter: Can be key/value or key/array pairs. Sort order does not matter.
59+
** * 'view' (optional): Accepted values are 'basic', 'advanced' or 'expert'. Defines in which admin panel view mode
60+
** the section is shown or not. Missing parameter defaults to 'expert'.
61+
** * 'name': Matches the name of the config variable or array. For type 'button' this has no effect.
62+
** * 'data-theme-field'
63+
** * 'type': Values are 'input', 'number', 'range', 'color', 'hidden', 'checkbox', 'multi-select', 'select', 'button'. Defines the actual
64+
** input type in the admin panel for this setting.
65+
** * 'value': Value is a reference to the actual PB config (i.e. 'value' => $config['dev']['reload_on_error']) and pre-
66+
** populates the current config value into the admin panel
67+
** Exceptionally, for type 'button' this is the HTML element ID applied to the actual button itself.
68+
** * 'placeholder': For types 'input', 'range', 'color' to prepopulate / preset the admin panel setting entry
69+
** field / range selector. Often references the default config for this setting
70+
** (i.e 'placeholder' => $defaultConfig['picture']['time_to_live'])
71+
** For type 'button' this is the i18ntag string for the actual button text.
72+
** * 'option': Only for types 'select','multi-select'. Lists the options available in this setting (i.e.
73+
** 'options' => [
74+
** '360px' => 'XS',
75+
** '540px' => 'S',
76+
** ]
77+
** * 'range_min', 'range_max', 'range_step': Only for type 'range'. Define the slider range and step when moved
78+
** * 'unit': Only for type 'range'. Defines the unit of the slider and is used to identify the i18n tag for translation of the unit
7979
*/
8080

8181
$configurationService = ConfigurationService::getInstance();

0 commit comments

Comments
 (0)