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

Does not work in Arch Linux #72

Open
Oroborius opened this issue Aug 15, 2024 · 5 comments
Open

Does not work in Arch Linux #72

Oroborius opened this issue Aug 15, 2024 · 5 comments

Comments

@Oroborius
Copy link

Oroborius commented Aug 15, 2024

Terminal Logs

@sirus20x6
Copy link

I have a fix on my home machine. I'll make a pull request after work

@Oroborius
Copy link
Author

I have a fix on my home machine. I'll make a pull request after work

Just saw this. Let me know once you do :-)

@sirus20x6
Copy link

sirus20x6 commented Aug 18, 2024

so looks like the real repo is on gitlab so I can't just create a pull request from github, until I get that together here is my diff file

no changes added to commit (use "git add" and/or "git commit -a")

(venv) (base) neuromancer :) > git diff
diff --git a/Makefile b/Makefile
index 9d91f59..ae33578 100644
--- a/Makefile
+++ b/Makefile
@@ -4,7 +4,7 @@
 
 # Compiler settings - Can be customized.
 CC = gcc
-CXXFLAGS = -ggdb3 -O0 -std=c99 -Wall -Werror -Wextra -Wno-sign-compare -Wno-unused-parameter -Wno-unused-variable -Wshadow -w -pedantic
+CXXFLAGS = -ggdb3 -O0 -std=gnu99 -Wall -Werror -Wextra -Wno-sign-compare -Wno-unused-parameter -Wno-unused-variable -Wshadow -w -pedantic
 OPTIMIZATION=-O2
 LDFLAGS = 
 
diff --git a/Photoshop2020 b/Photoshop2020
index f5b0eef..d392a75 100755
Binary files a/Photoshop2020 and b/Photoshop2020 differ
diff --git a/scripts/Installer.c b/scripts/Installer.c
index 7f4efbb..cdb4454 100644
--- a/scripts/Installer.c
+++ b/scripts/Installer.c
@@ -164,7 +164,7 @@ void setup_fedora()
     int max_len = sizeof(char) * 100;
     char *command = malloc(max_len);
     check_memory_allocation(command);
-    snprintf(command, max_len, sizeof(char) * 100, "sudo dnf config-manager --add-repo https://dl.winehq.org/wine-builds/fedora/%i/winehq.repo", *version);
+    snprintf(command, max_len, "sudo dnf config-manager --add-repo https://dl.winehq.org/wine-builds/fedora/%i/winehq.repo", *version);
     system(command);
     // Free memory of version and command
     free(version);
diff --git a/scripts/Requirements.c b/scripts/Requirements.c
index 4692b91..be15f35 100644
--- a/scripts/Requirements.c
+++ b/scripts/Requirements.c
@@ -10,6 +10,7 @@ https://helpx.adobe.com/es/photoshop/system-requirements/2020.html
 #include <sys/sysinfo.h>
 // Use this for atoi, conversor string to int, strcmp...
 #include <string.h>
+#include <stdlib.h>
 
 int check_ram();
 int check_cpu();
@@ -63,10 +64,11 @@ int check_ram()
     FILE *mem_info; 
     mem_info = popen("grep MemTotal /proc/meminfo | awk {'print $2'}", "r");
     check_memory_allocation(mem_info);
-    char *ram = malloc(sizeof(char) * 30);
+    char ram[50];  // Use a fixed-size array instead of malloc
     check_memory_allocation(ram);
-    // Read the output
-    fgets(ram, sizeof(char) * 30, mem_info);
+    
+    fgets(ram, sizeof(ram), mem_info);
+    // Remove the malloc and free for ram
     // Inform to user
     int max_len = sizeof(char) * 80;
     char *msg = malloc(max_len);
@@ -84,7 +86,8 @@ int check_ram()
     }
     free(msg);
     pclose(mem_info);
-    
+    free(ram);
+    free(msg);
     return 0;
 }

@Oroborius
Copy link
Author

Unfortunately I get this when trying to apply the diff: error: corrupt patch at line 67

@FNklazo
Copy link

FNklazo commented Oct 17, 2024

Removing that section entirely to avoid that error, I get another error. I'm sorry I didn't copy it but essentially the error was the full index line in the Photoshop2020 binary file was not given in sirus20x6's diff file.

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

No branches or pull requests

3 participants