Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Downloadable Windows Script #626

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

SenkaWolf
Copy link

Added downloadable 'Send to' Windows Context Menu script as requested in #580 . All .bat code provided by https://github.com/Sectly

Preview: https://senkawolf.fyi/me/RUgOWoQI51.png

Added downloadable 'Send to' Windows Context Menu script as requested in sergix44#580 . All .bat code provided by https://github.com/Sectly

Preview: https://senkawolf.fyi/me/RUgOWoQI51.png
@Sectly
Copy link
Contributor

Sectly commented Jan 19, 2025

Very nice hope it gets added to release as soon as possible 😄

$fileName = $fileBaseName . '.bat'; // Full file name with extension

// Prepare the content of the .txt file
$batscript = '@echo off' . PHP_EOL;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔨 issue: ‏Can you please put the script in a proper template like for the others? This is very hard to understand and maintain

$batscript .= ':CreateSendToShortcut' . PHP_EOL;
$batscript .= 'set "ShortcutName=Upload to ' .$appName. ' (@'.$user->username.').lnk"' . PHP_EOL;
$batscript .= 'set "ShortcutPath=%APPDATA%\\Microsoft\\Windows\\SendTo\\%ShortcutName%"' . PHP_EOL;
$batscript .= 'set "IconUrl=https://xbackbone.app/favicon.ico"' . PHP_EOL;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔨 issue: ‏This shuld point to the current instance, not the xbb website.

Comment on lines +74 to +75
$config = include __DIR__ . '/../../config.php'; // Adjust the path as necessary
$appName = $config['app_name'] ?? 'XBackBone'; // Provide a default if not set
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔨 issue: ‏config must be fetch from the container, as it can be altered during bootstrapping. The config file is never read during the app runtime

@SrS2225a
Copy link
Contributor

You can use my contribution I made a year ago as an guide and example to fix for all these issues Sergi mentioned. Sorry if it is a little hard to read, it is a limitation with how KDE handles shell commands. Found here: #554. Good luck :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants