Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Winapps
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
IMGW
Winapps
Commits
80ba2ad3
Commit
80ba2ad3
authored
4 months ago
by
Oskar Manhart
Browse files
Options
Downloads
Patches
Plain Diff
fix: always source inquirer from path on nix
parent
8a4d8906
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
packages/winapps/setup.patch
+50
-22
50 additions, 22 deletions
packages/winapps/setup.patch
with
50 additions
and
22 deletions
packages/winapps/setup.patch
+
50
−
22
View file @
80ba2ad3
diff --git a/setup.sh b/setup.sh
index
6aa9b574..9fbefe6
5 100755
index
8c6209fb..b765148
5 100755
--- a/setup.sh
+++ b/setup.sh
@@ -
48
,8 +
48
,8 @@
readonly SYS_BIN_PATH="/usr/local/bin" # UNIX path to 'bin' dir
@@ -
39
,8 +
39
,8 @@
readonly SYS_BIN_PATH="/usr/local/bin" # UNIX path to 'bin' dir
readonly USER_BIN_PATH="${HOME}/.local/bin" # UNIX path to 'bin' directory for a '--user' WinApps installation.
readonly USER_BIN_PATH_WIN='\\tsclient\home\.local\bin' # WINDOWS path to 'bin' directory for a '--user' WinApps installation.
# 'SOURCE'
...
...
@@ -13,7 +13,7 @@ index 6aa9b574..9fbefe65 100755
# 'APP'
readonly SYS_APP_PATH="/usr/share/applications" # UNIX path to 'applications' directory for a '--system' WinApps installation.
readonly USER_APP_PATH="${HOME}/.local/share/applications" # UNIX path to 'applications' directory for a '--user' WinApps installation.
@@ -7
9
,7 +7
9
,7 @@
readonly TEST_PATH_WIN="${USER_APPDATA_PATH_WIN}\\FreeRDP_Connection_Test" # WIN
@@ -7
0
,7 +7
0
,7 @@
readonly TEST_PATH_WIN="${USER_APPDATA_PATH_WIN}\\FreeRDP_Connection_Test" # WIN
# 'WinApps Configuration File'
readonly CONFIG_PATH="${HOME}/.config/winapps/winapps.conf" # UNIX path to the WinApps configuration file.
# 'Inquirer Bash Script'
...
...
@@ -22,7 +22,7 @@ index 6aa9b574..9fbefe65 100755
# REMOTE DESKTOP CONFIGURATION
readonly VM_NAME="RDPWindows" # Name of the Windows VM (FOR 'libvirt' ONLY).
@@ -13
9
,13 +13
9
,13 @@
function waTerminateScript() {
@@ -13
0
,13 +13
0
,13 @@
function waTerminateScript() {
# Role: Displays usage information for the script.
function waUsage() {
echo -e "Usage:
...
...
@@ -43,16 +43,44 @@ index 6aa9b574..9fbefe65 100755
}
# Name: 'waGetSourceCode'
@@ -168,7 +168,7 @@
function waGetSourceCode() {
$SUDO git clone --recurse-submodules --remote-submodules https://github.com/winapps-org/winapps.git "$SOURCE_PATH"
else
echo -e "${INFO_TEXT}WinApps installation already present at ${CLEAR_TEXT}${COMMAND_TEXT}${SOURCE_PATH}${CLEAR_TEXT}${INFO_TEXT}. Updating...${CLEAR_TEXT}"
- $SUDO git -C "$SOURCE_PATH" pull --no-rebase
+
@@ -155,13 +155,6 @@
function waGetSourceCode() {
echo -e "${WARNING_TEXT}[WARNING]${CLEAR_TEXT} You might want to remove your old installation on '${SCRIPT_DIR_PATH}'."
fi
- if [[ ! -d "$SOURCE_PATH" ]]; then
- $SUDO git clone --recurse-submodules --remote-submodules https://github.com/winapps-org/winapps.git "$SOURCE_PATH"
- else
- echo -e "${INFO_TEXT}WinApps installation already present at ${CLEAR_TEXT}${COMMAND_TEXT}${SOURCE_PATH}${CLEAR_TEXT}${INFO_TEXT}. Updating...${CLEAR_TEXT}"
- $SUDO git -C "$SOURCE_PATH" pull --no-rebase
- fi
-
# Silently change the working directory.
@@ -395,7 +395,7 @@
function waCheckExistingInstall() {
if ! cd "$SOURCE_PATH" &>/dev/null; then
# Display the error type.
@@ -186,21 +179,8 @@
function waGetSourceCode() {
# Name: 'waGetInquirer'
# Role: Loads the inquirer script, even if the source isn't cloned yet
function waGetInquirer() {
- local INQUIRER=$INQUIRER_PATH
-
- if [ -d "$SYS_SOURCE_PATH" ]; then
- INQUIRER=$SYS_SOURCE_PATH/$INQUIRER_PATH
- elif [ -d "$USER_SOURCE_PATH" ] ; then
- INQUIRER=$USER_SOURCE_PATH/$INQUIRER_PATH
- else
- INQUIRER="/tmp/waInquirer.sh"
- rm -f "$INQUIRER"
-
- curl -o "$INQUIRER" "https://raw.githubusercontent.com/winapps-org/winapps/main/install/inquirer.sh"
- fi
-
# shellcheck source=/dev/null # Exclude this file from being checked by ShellCheck.
- source "$INQUIRER"
+ source "$INQUIRER_PATH"
}
# Name: 'waCheckInput'
@@ -390,7 +370,7 @@
function waCheckExistingInstall() {
# Display the suggested action(s).
echo "--------------------------------------------------------------------------------"
...
...
@@ -61,7 +89,7 @@ index 6aa9b574..9fbefe65 100755
echo "--------------------------------------------------------------------------------"
# Terminate the script.
@@ -41
5
,7 +
415
,7 @@
function waCheckExistingInstall() {
@@ -41
0
,7 +
390
,7 @@
function waCheckExistingInstall() {
# Display the suggested action(s).
echo "--------------------------------------------------------------------------------"
...
...
@@ -70,7 +98,7 @@ index 6aa9b574..9fbefe65 100755
echo "--------------------------------------------------------------------------------"
# Terminate the script.
@@ -8
1
0,7 +
810
,7 @@
function waCheckGroupMembership() {
@@ -80
5
,7 +
785
,7 @@
function waCheckGroupMembership() {
# Identify groups the current user belongs to.
USER_GROUPS=$(groups "$(whoami)")
...
...
@@ -79,7 +107,7 @@ index 6aa9b574..9fbefe65 100755
# Complete the previous line.
echo -e "${FAIL_TEXT}Failed!${CLEAR_TEXT}\n"
@@ -12
44
,11 +12
44
,11 @@
function waConfigureWindows() {
@@ -12
39
,11 +12
19
,11 @@
function waConfigureWindows() {
# Populate variables.
WIN_BASH="\
#!/usr/bin/env bash
...
...
@@ -93,7 +121,7 @@ index 6aa9b574..9fbefe65 100755
Terminal=false
Type=Application
Icon=${APPDATA_PATH}/icons/windows.svg
@@ -129
5
,13 +12
95
,13 @@
function waConfigureApp() {
@@ -129
0
,13 +12
70
,13 @@
function waConfigureApp() {
# Determine the content of the bash script for the application.
APP_BASH="\
#!/usr/bin/env bash
...
...
@@ -109,7 +137,7 @@ index 6aa9b574..9fbefe65 100755
Terminal=false
Type=Application
Icon=${APP_ICON}
@@ -16
31
,8 +16
31
,8 @@
function waInstall() {
@@ -16
26
,8 +16
06
,8 @@
function waInstall() {
waFindInstalled
# Install the WinApps bash scripts.
...
...
@@ -120,7 +148,7 @@ index 6aa9b574..9fbefe65 100755
# Configure the Windows RDP session application launcher.
waConfigureWindows
@@ -16
82
,18 +16
82
,15 @@
function waUninstall() {
@@ -16
77
,18 +16
57
,15 @@
function waUninstall() {
local DESKTOP_FILE_NAME="" # Stores the name of the '.desktop' file for the application.
local BASH_SCRIPT_NAME="" # Stores the name of the application.
...
...
@@ -141,7 +169,7 @@ index 6aa9b574..9fbefe65 100755
# Remove each '.desktop' file.
for DESKTOP_FILE_PATH in "${WINAPPS_DESKTOP_FILES[@]}"; do
@@ -17
14
,7 +1
711
,7 @@
function waUninstall() {
@@ -17
09
,7 +1
686
,7 @@
function waUninstall() {
done
# Store the paths of bash scripts calling 'WinApps' to launch specific applications in an array, returning an empty array if no such files exist.
...
...
@@ -150,7 +178,7 @@ index 6aa9b574..9fbefe65 100755
# Remove each bash script.
for BASH_SCRIPT_PATH in "${WINAPPS_APP_BASH_SCRIPTS[@]}"; do
@@ -173
5
,10 +17
32
,9 @@
function waUninstall() {
@@ -173
0
,10 +17
07
,9 @@
function waUninstall() {
done
# Print caveats.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment