MAMEWorld >> EmuChat
View all threads Index   Threaded Mode Threaded  

Pages: 1

Chibi Shirou
MAME Fan
Reged: 11/18/12
Posts: 11
Send PM


Creating diff patches (delete if not allowed)
#299225 - 11/18/12 01:21 AM


Sooo... I need to create a diff patch by comparing two source folders, but after going into the bin folder of the mingW app I only find the diff.exe ...

After executing it a command promp opens for half a second and closes... I execute it as admin and set the compatibility mode to windows XP...

Note that I'm using windows 7, Also i already know the command line but I don't know where to put it... On the start menu app called "RUN" ??

I'm sorry if this is not allowed but I can't find any info on this anywhere else...



redk9258
Regular
Reged: 09/21/03
Posts: 3968
Loc: Troy, Illinois USA
Send PM


Re: Creating diff patches (delete if not allowed) new [Re: Chibi Shirou]
#299226 - 11/18/12 01:44 AM


Open a command prompt.
Set the path to where diff resides, for example... SET PATH=C:\mingw\mingw64-w64\bin
Diff -Nru FOLDER_1 FOLDER_2 >patch.diff

Then when using patch, use..

patch -p1 <patch.diff



Chibi Shirou
MAME Fan
Reged: 11/18/12
Posts: 11
Send PM


Re: Creating diff patches (delete if not allowed) new [Re: redk9258]
#299227 - 11/18/12 01:47 AM


Ok, so this process will create a new diff after comparing the two source folders?

While waiting for your response I'll try what you said, thanks.



redk9258
Regular
Reged: 09/21/03
Posts: 3968
Loc: Troy, Illinois USA
Send PM


Re: Creating diff patches (delete if not allowed) new [Re: Chibi Shirou]
#299228 - 11/18/12 01:48 AM


It should.



Chibi Shirou
MAME Fan
Reged: 11/18/12
Posts: 11
Send PM


Re: Creating diff patches (delete if not allowed) new [Re: redk9258]
#299229 - 11/18/12 01:55 AM


I just tried it, And another command prompt opened for half a second, I guess it created the new diff?

If so, were is the new diff stored? because I don't see it on the "patches" folder.



redk9258
Regular
Reged: 09/21/03
Posts: 3968
Loc: Troy, Illinois USA
Send PM


Re: Creating diff patches (delete if not allowed) new [Re: Chibi Shirou]
#299230 - 11/18/12 01:57 AM


It should not have opened another command prompt for a second. It should have created the file where the command prompt is open. Type DIR and see if patch.diff is listed.



Chibi Shirou
MAME Fan
Reged: 11/18/12
Posts: 11
Send PM


Re: Creating diff patches (delete if not allowed) new [Re: Chibi Shirou]
#299231 - 11/18/12 01:58 AM


Here is a screenshot of the command prompt and the created diff I just found... It's 0KB in size tough...

http://sadpanda.us/images/1254933-RR3RT5X.png



Chibi Shirou
MAME Fan
Reged: 11/18/12
Posts: 11
Send PM


Re: Creating diff patches (delete if not allowed) new [Re: redk9258]
#299232 - 11/18/12 02:00 AM


Yes, the diff is listed but it's 0KB in size.

Here's a screenshot:

http://sadpanda.us/images/1254933-RR3RT5X.png



Anonymous
Unregistered
Send PM


Re: Creating diff patches (delete if not allowed) new [Re: Chibi Shirou]
#299235 - 11/18/12 02:32 AM


> Yes, the diff is listed but it's 0KB in size.
>
> Here's a screenshot:
>
> http://sadpanda.us/images/1254933-RR3RT5X.png

those folders you named don't exist in the c:\mingw\mingw64-w32\bin directory, where are they? and how do you think it will find them unless you tell it?



Chibi Shirou
MAME Fan
Reged: 11/18/12
Posts: 11
Send PM


Re: Creating diff patches (delete if not allowed) new [Re: ]
#299236 - 11/18/12 02:39 AM


Ahhhh, sorry. So they need to be on the bin directory? I'll do that right now.



Chibi Shirou
MAME Fan
Reged: 11/18/12
Posts: 11
Send PM


Re: Creating diff patches (delete if not allowed) new [Re: Chibi Shirou]
#299237 - 11/18/12 02:46 AM


I just copied the folders and ran the command on CMD again, Another Command Propmt opens and does some operations. After a few seconds it stops and closes then generates the patch. But it's still 0KB in size.



Chibi Shirou
MAME Fan
Reged: 11/18/12
Posts: 11
Send PM


Re: Creating diff patches (delete if not allowed) new [Re: Chibi Shirou]
#299238 - 11/18/12 03:04 AM


Here's a picture of the second command prompt:

http://sadpanda.us/images/1254982-CGY8EG6.png



redk9258
Regular
Reged: 09/21/03
Posts: 3968
Loc: Troy, Illinois USA
Send PM


Re: Creating diff patches (delete if not allowed) new [Re: Chibi Shirou]
#299244 - 11/18/12 03:44 AM


Did you set the PATH to the mingw bin folder?
Where are the folders you are trying to diff?



Chibi Shirou
MAME Fan
Reged: 11/18/12
Posts: 11
Send PM


Re: Creating diff patches (delete if not allowed) new [Re: redk9258]
#299252 - 11/18/12 04:55 AM


Ahhh, I didn't put the "PATH" part of the code in the command promp. When you go to the MinGW folder there is a "Source" folder, That's where the mame0147s and mame0143s are.

I copied them to the bin folder where the "diff.exe" is and ran the command prompt again, After that the second prompt window did something and closed after a few seconds.

After this the "patch.diff" was generated but it's 0KB in size...



Chibi Shirou
MAME Fan
Reged: 11/18/12
Posts: 11
Send PM


Re: Creating diff patches (delete if not allowed) new [Re: Chibi Shirou]
#299258 - 11/18/12 05:25 AM


Nope, Same result... It gives me a 0KB diff file...

I think it would be easier if I just upload the 2 source folders I'm trying to diff and maybe some of you could create the diff file for me?

After that this topic could be deleted and I would delete the upload from the host I uploaded it to.

I mean, that would be faster because this is the first time I'm trying to do this stuff with MAME.

Edited by Chibi Shirou (11/18/12 05:33 AM)



redk9258
Regular
Reged: 09/21/03
Posts: 3968
Loc: Troy, Illinois USA
Send PM


Re: Creating diff patches (delete if not allowed) new [Re: Chibi Shirou]
#299264 - 11/18/12 05:40 AM


I don't think you are running the command prompt as Administrator.

Make a folder on the C drive named DIFF. Move the two folders into that folder.

Click the Start orb and type CMD in the combo box.

Right click cmd.exe and run as Administrator. This should open in the system 32 folder and say Administrator at the very top.

Type CD C:\DIFF [enter].

Type PATH=C:\mingw\mingw64-w32\bin[enter].

Type DIFF -Nru FOLDER_1 FOLDER_2 >patch.diff [enter]. Change FOLDER_1 and FOLDER_2 to the names of the folders you are trying to diff.

Did that work?

Edited by redk9258 (11/18/12 05:42 AM)



Chibi Shirou
MAME Fan
Reged: 11/18/12
Posts: 11
Send PM


Re: Creating diff patches (delete if not allowed) new [Re: redk9258]
#299269 - 11/18/12 05:53 AM


Eureka!! It worked!!

Now I got a didd file of 132 MB In size, So this must mean the process was sucessful.

Now I just need to apply the diff patch to mame147 source folder and compile it right?

If I have any other problems I'll tell you guys and update this thread.



redk9258
Regular
Reged: 09/21/03
Posts: 3968
Loc: Troy, Illinois USA
Send PM


Re: Creating diff patches (delete if not allowed) new [Re: Chibi Shirou]
#299293 - 11/18/12 03:53 PM


It sounds like it worked and there are a loy of differences between the two folders. It may or may not compile correctly when applied to the latest source, I just hope you aren't doing something stupid, like trying to mess with K*shit*a.


Pages: 1

MAMEWorld >> EmuChat
View all threads Index   Threaded Mode Threaded  

Extra information Permissions
Moderator:  Robbbert, Tafoid 
0 registered and 366 anonymous users are browsing this forum.
You cannot start new topics
You cannot reply to topics
HTML is enabled
UBBCode is enabled
Thread views: 1391