summaryrefslogtreecommitdiff
blob: f6bd21fcdaa404c2f8526516d53859b55fad64d6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
--- main/gui_gtk/main_gtk.c
+++ main/gui_gtk/main_gtk.c
@@ -1881,7 +1881,7 @@
 	     unsigned char byte;
 	     dest = fopen(temp, "wb");
 	     strcpy(orig, WITH_HOME);
-	     strcat(orig, "share/mupen64/mupen64.ini");
+	     strcat(orig, "lib/mupen64/mupen64.ini");
 	     src = fopen(orig, "rb");
 	     while(fread(&byte, 1, 1, src))
 	       fwrite(&byte, 1, 1, dest);
@@ -1893,7 +1893,7 @@
 	strcpy(temp, g_WorkingDir);
 	strcat(temp, "lang");
 	strcpy(orig, WITH_HOME);
-	strcat(orig, "share/mupen64/lang");
+	strcat(orig, "lib/mupen64/lang");
 	symlink(orig, temp);
 	
 	/*strcpy(temp, g_WorkingDir);
@@ -1906,14 +1906,14 @@
 	strcat(temp, "plugins");
 	mkdir(temp, 0700);
 	strcpy(orig, WITH_HOME);
-	strcat(orig, "share/mupen64/plugins");
+	strcat(orig, "lib/mupen64/plugins");
 	dir = opendir(orig);
 	while((entry = readdir(dir)) != NULL)
 	  {
 	     if(strcmp(entry->d_name + strlen(entry->d_name) - 3, ".so"))
 	       {
 		  strcpy(orig, WITH_HOME);
-		  strcat(orig, "share/mupen64/plugins/");
+		  strcat(orig, "lib/mupen64/plugins/");
 		  strcat(orig, entry->d_name);
 		  src = fopen(orig, "rb");
 		  if(src == NULL) continue;
@@ -1939,7 +1939,7 @@
 		  strcat(temp, "plugins/");
 		  strcat(temp, entry->d_name);
 		  strcpy(orig, WITH_HOME);
-		  strcat(orig, "share/mupen64/plugins/");
+		  strcat(orig, "lib/mupen64/plugins/");
 		  strcat(orig, entry->d_name);
 		  symlink(orig, temp);
 	       }
--- main/main.c
+++ main/main.c
@@ -37,6 +37,8 @@
 
 #include <stdlib.h>
 #include <unistd.h>
+#include <dirent.h>
+#include <sys/stat.h>
 
 #include "main.h"
 #include "guifuncs.h"
@@ -263,7 +265,7 @@
 	     unsigned char byte;
 	     dest = fopen(temp, "wb");
 	     strcpy(orig, WITH_HOME);
-	     strcat(orig, "share/mupen64/mupen64.ini");
+	     strcat(orig, "lib/mupen64/mupen64.ini");
 	     src = fopen(orig, "rb");
 	     while(fread(&byte, 1, 1, src))
 	       fwrite(&byte, 1, 1, dest);
@@ -275,7 +277,7 @@
 	strcpy(temp, g_WorkingDir);
 	strcat(temp, "lang");
 	strcpy(orig, WITH_HOME);
-	strcat(orig, "share/mupen64/lang");
+	strcat(orig, "lib/mupen64/lang");
 	symlink(orig, temp);
 	
 	/*strcpy(temp, g_WorkingDir);
@@ -288,14 +290,14 @@
 	strcat(temp, "plugins");
 	mkdir(temp, 0700);
 	strcpy(orig, WITH_HOME);
-	strcat(orig, "share/mupen64/plugins");
+	strcat(orig, "lib/mupen64/plugins");
 	dir = opendir(orig);
 	while((entry = readdir(dir)) != NULL)
 	  {
 	     if(strcmp(entry->d_name + strlen(entry->d_name) - 3, ".so"))
 	       {
 		  strcpy(orig, WITH_HOME);
-		  strcat(orig, "share/mupen64/plugins/");
+		  strcat(orig, "lib/mupen64/plugins/");
 		  strcat(orig, entry->d_name);
 		  src = fopen(orig, "rb");
 		  if(src == NULL) continue;
@@ -321,7 +323,7 @@
 		  strcat(temp, "plugins/");
 		  strcat(temp, entry->d_name);
 		  strcpy(orig, WITH_HOME);
-		  strcat(orig, "share/mupen64/plugins/");
+		  strcat(orig, "lib/mupen64/plugins/");
 		  strcat(orig, entry->d_name);
 		  symlink(orig, temp);
 	       }
--- Makefile
+++ Makefile
@@ -166,7 +166,7 @@
 endif
 
 PREFIX		=$(shell grep WITH_HOME config.h | cut -d '"' -f 2)
-SHARE		="$(PREFIX)share/mupen64/"
+SHARE		="$(PREFIX)lib/mupen64/"
 
 PLUGINS		=plugins/mupen64_input.so plugins/blight_input.so plugins/mupen64_hle_rsp_azimer.so plugins/dummyaudio.so plugins/mupen64_audio.so plugins/jttl_audio.so plugins/mupen64_soft_gfx.so plugins/glN64.so