Open
Conversation
This was referenced Oct 18, 2024
Pipshag
reviewed
Oct 18, 2024
| } | ||
| pclose(fupppath); | ||
| void set_upp_path(app_widgets *widgets) { | ||
| snprintf(upppath, sizeof(upppath), "%s/.local/bin/venv/bin/upp", getenv("HOME")); |
There was a problem hiding this comment.
This breaks my setup by not finding the executable.
|
By using a work-around for the actual filepath for UPP, everything loads as expected and my options are not greyed out after selecting the card in the dropdow. |
|
I used |
|
This patch fixed the application, on my 6900xt system. I did, however, need to revert the hunk Pipshag mentioned above. I've attached the diff below for anyone else who runs into this issue. diff --git a/src/main.c b/src/main.c
index f720885..d0f141f 100644
--- a/src/main.c
+++ b/src/main.c
@@ -661,8 +661,21 @@ void get_home_path(app_widgets *widgets) {
}
void set_upp_path(app_widgets *widgets) {
- snprintf(upppath, sizeof(upppath), "%s/.local/bin/venv/bin/upp", getenv("HOME"));
- printf("UPP path is %s\n", upppath);
+ FILE *fupppath = popen("which upp", "r");
+ if (fupppath) {
+ if (fgets(upppath, sizeof(upppath), fupppath)){
+ size_t len = strlen(upppath);
+ if (len > 0 && upppath[len-1] == '\n') {
+ upppath[--len] = '\0';
+ }
+ printf("UPP path is %s\n", upppath);
+ }
+ else {
+ gtk_text_buffer_set_text(GTK_TEXT_BUFFER(g_text_revealer), "UPP module not found, install with pip", -1);
+ gtk_revealer_set_reveal_child (GTK_REVEALER(widgets->g_revealer), TRUE);
+ }
+ }
+ pclose(fupppath);
}
void unsupported_amd(int num) { |
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.