Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 103989
Collapse All | Expand All

(-)mupen64_src-0.5/main/gui_gtk/main_gtk.c (-5 / +5 lines)
Lines 1881-1887 Link Here
1881
	     unsigned char byte;
1881
	     unsigned char byte;
1882
	     dest = fopen(temp, "wb");
1882
	     dest = fopen(temp, "wb");
1883
	     strcpy(orig, WITH_HOME);
1883
	     strcpy(orig, WITH_HOME);
1884
	     strcat(orig, "share/mupen64/mupen64.ini");
1884
	     strcat(orig, "lib/mupen64/mupen64.ini");
1885
	     src = fopen(orig, "rb");
1885
	     src = fopen(orig, "rb");
1886
	     while(fread(&byte, 1, 1, src))
1886
	     while(fread(&byte, 1, 1, src))
1887
	       fwrite(&byte, 1, 1, dest);
1887
	       fwrite(&byte, 1, 1, dest);
Lines 1893-1899 Link Here
1893
	strcpy(temp, g_WorkingDir);
1893
	strcpy(temp, g_WorkingDir);
1894
	strcat(temp, "lang");
1894
	strcat(temp, "lang");
1895
	strcpy(orig, WITH_HOME);
1895
	strcpy(orig, WITH_HOME);
1896
	strcat(orig, "share/mupen64/lang");
1896
	strcat(orig, "lib/mupen64/lang");
1897
	symlink(orig, temp);
1897
	symlink(orig, temp);
1898
	
1898
	
1899
	/*strcpy(temp, g_WorkingDir);
1899
	/*strcpy(temp, g_WorkingDir);
Lines 1906-1919 Link Here
1906
	strcat(temp, "plugins");
1906
	strcat(temp, "plugins");
1907
	mkdir(temp, 0700);
1907
	mkdir(temp, 0700);
1908
	strcpy(orig, WITH_HOME);
1908
	strcpy(orig, WITH_HOME);
1909
	strcat(orig, "share/mupen64/plugins");
1909
	strcat(orig, "lib/mupen64/plugins");
1910
	dir = opendir(orig);
1910
	dir = opendir(orig);
1911
	while((entry = readdir(dir)) != NULL)
1911
	while((entry = readdir(dir)) != NULL)
1912
	  {
1912
	  {
1913
	     if(strcmp(entry->d_name + strlen(entry->d_name) - 3, ".so"))
1913
	     if(strcmp(entry->d_name + strlen(entry->d_name) - 3, ".so"))
1914
	       {
1914
	       {
1915
		  strcpy(orig, WITH_HOME);
1915
		  strcpy(orig, WITH_HOME);
1916
		  strcat(orig, "share/mupen64/plugins/");
1916
		  strcat(orig, "lib/mupen64/plugins/");
1917
		  strcat(orig, entry->d_name);
1917
		  strcat(orig, entry->d_name);
1918
		  src = fopen(orig, "rb");
1918
		  src = fopen(orig, "rb");
1919
		  if(src == NULL) continue;
1919
		  if(src == NULL) continue;
Lines 1939-1945 Link Here
1939
		  strcat(temp, "plugins/");
1939
		  strcat(temp, "plugins/");
1940
		  strcat(temp, entry->d_name);
1940
		  strcat(temp, entry->d_name);
1941
		  strcpy(orig, WITH_HOME);
1941
		  strcpy(orig, WITH_HOME);
1942
		  strcat(orig, "share/mupen64/plugins/");
1942
		  strcat(orig, "lib/mupen64/plugins/");
1943
		  strcat(orig, entry->d_name);
1943
		  strcat(orig, entry->d_name);
1944
		  symlink(orig, temp);
1944
		  symlink(orig, temp);
1945
	       }
1945
	       }
(-)mupen64_src-0.5/main/main.c (-5 / +7 lines)
Lines 37-42 Link Here
37
37
38
#include <stdlib.h>
38
#include <stdlib.h>
39
#include <unistd.h>
39
#include <unistd.h>
40
#include <dirent.h>
41
#include <sys/stat.h>
40
42
41
#include "main.h"
43
#include "main.h"
42
#include "guifuncs.h"
44
#include "guifuncs.h"
Lines 263-269 Link Here
263
	     unsigned char byte;
265
	     unsigned char byte;
264
	     dest = fopen(temp, "wb");
266
	     dest = fopen(temp, "wb");
265
	     strcpy(orig, WITH_HOME);
267
	     strcpy(orig, WITH_HOME);
266
	     strcat(orig, "share/mupen64/mupen64.ini");
268
	     strcat(orig, "lib/mupen64/mupen64.ini");
267
	     src = fopen(orig, "rb");
269
	     src = fopen(orig, "rb");
268
	     while(fread(&byte, 1, 1, src))
270
	     while(fread(&byte, 1, 1, src))
269
	       fwrite(&byte, 1, 1, dest);
271
	       fwrite(&byte, 1, 1, dest);
Lines 275-281 Link Here
275
	strcpy(temp, g_WorkingDir);
277
	strcpy(temp, g_WorkingDir);
276
	strcat(temp, "lang");
278
	strcat(temp, "lang");
277
	strcpy(orig, WITH_HOME);
279
	strcpy(orig, WITH_HOME);
278
	strcat(orig, "share/mupen64/lang");
280
	strcat(orig, "lib/mupen64/lang");
279
	symlink(orig, temp);
281
	symlink(orig, temp);
280
	
282
	
281
	/*strcpy(temp, g_WorkingDir);
283
	/*strcpy(temp, g_WorkingDir);
Lines 288-301 Link Here
288
	strcat(temp, "plugins");
290
	strcat(temp, "plugins");
289
	mkdir(temp, 0700);
291
	mkdir(temp, 0700);
290
	strcpy(orig, WITH_HOME);
292
	strcpy(orig, WITH_HOME);
291
	strcat(orig, "share/mupen64/plugins");
293
	strcat(orig, "lib/mupen64/plugins");
292
	dir = opendir(orig);
294
	dir = opendir(orig);
293
	while((entry = readdir(dir)) != NULL)
295
	while((entry = readdir(dir)) != NULL)
294
	  {
296
	  {
295
	     if(strcmp(entry->d_name + strlen(entry->d_name) - 3, ".so"))
297
	     if(strcmp(entry->d_name + strlen(entry->d_name) - 3, ".so"))
296
	       {
298
	       {
297
		  strcpy(orig, WITH_HOME);
299
		  strcpy(orig, WITH_HOME);
298
		  strcat(orig, "share/mupen64/plugins/");
300
		  strcat(orig, "lib/mupen64/plugins/");
299
		  strcat(orig, entry->d_name);
301
		  strcat(orig, entry->d_name);
300
		  src = fopen(orig, "rb");
302
		  src = fopen(orig, "rb");
301
		  if(src == NULL) continue;
303
		  if(src == NULL) continue;
Lines 321-327 Link Here
321
		  strcat(temp, "plugins/");
323
		  strcat(temp, "plugins/");
322
		  strcat(temp, entry->d_name);
324
		  strcat(temp, entry->d_name);
323
		  strcpy(orig, WITH_HOME);
325
		  strcpy(orig, WITH_HOME);
324
		  strcat(orig, "share/mupen64/plugins/");
326
		  strcat(orig, "lib/mupen64/plugins/");
325
		  strcat(orig, entry->d_name);
327
		  strcat(orig, entry->d_name);
326
		  symlink(orig, temp);
328
		  symlink(orig, temp);
327
	       }
329
	       }
(-)mupen64_src-0.5/Makefile (-2 / +2 lines)
Lines 166-172 Link Here
166
endif
166
endif
167
167
168
PREFIX		=$(shell grep WITH_HOME config.h | cut -d '"' -f 2)
168
PREFIX		=$(shell grep WITH_HOME config.h | cut -d '"' -f 2)
169
SHARE		="$(PREFIX)share/mupen64/"
169
SHARE		="$(PREFIX)lib/mupen64/"
170
170
171
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
171
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
172
172
Lines 405-411 Link Here
405
	
405
	
406
clean:
406
clean:
407
	find . -name '*.o' -print0 | xargs -0r rm -f
407
	find . -name '*.o' -print0 | xargs -0r rm -f
408
	rm mupen64 mupen64_nogui mupen64_dbg plugins/mupen64_input.so blight_input/arial.ttf.c blight_input/ttftoh 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
408
	rm -f mupen64 mupen64_nogui mupen64_dbg plugins/mupen64_input.so blight_input/arial.ttf.c blight_input/ttftoh 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
409
409
410
clean_o:
410
clean_o:
411
	find . -name '*.o' -print0 | xargs -0r rm -f
411
	find . -name '*.o' -print0 | xargs -0r rm -f

Return to bug 103989