Page 1 of 1

Applying a patch in Eclipse

Posted: Wed Apr 24, 2013 2:05 pm
by cheatax21
If you want to receive support we need this info to help you properly.
» Find Revision
L2J Revision Number:5936
L2JDP Revision Number:9640

Code: Select all

 http://www.l2jserver.com/forum/viewtopic.php?f=73&t=17801
Hello, im interested in adding this voiced command, though im not sure on how to apply the two patches, so i will need some clarifications and assistance if possible:
I read the how_to_apply_a_patch guide from the wiki but still..
Can someone tell me what steps to do for applying this one with details i would really appreciate it..
thanks in advance for your time and assistance

Re: Applying a patch in Eclipse

Posted: Wed Apr 24, 2013 5:35 pm
by cheatax21
What is my main concern is how i can apply a patch for example the voiced command for toggle xp off/on, and then after compile how to put it on my server folder without loosing what i have modified so far.. im kinda lost on this one guys:/

Re: Applying a patch in Eclipse

Posted: Wed Apr 24, 2013 6:29 pm
by jurchiks
http://www.l2jserver.com/wiki/How_to_Apply_a_Patch
+
http://www.l2jserver.com/wiki/Synchronization
is all you need. If you don't understand them, read them several times.

Re: Applying a patch in Eclipse

Posted: Wed Apr 24, 2013 6:55 pm
by cheatax21
I read them both already:/

And from them i got these questions: for example:
My workspace path--> c:\workspace
my l2server path --> c:\l2server

lets say i have this patch.txt :

Code: Select all

Index: data/scripts/handlers/usercommandhandlers/InstanceZone.java===================================================================--- data/scripts/handlers/usercommandhandlers/InstanceZone.java (revision 7669)+++ data/scripts/handlers/usercommandhandlers/InstanceZone.java (working copy)@@ -72,13 +72,22 @@                        firstMessage = false;                        activeChar.sendPacket(new SystemMessage(SystemMessageId.INSTANCE_ZONE_TIME_LIMIT));                    }-                   int hours = (int) (remainingTime / 3600);-                   int minutes = (int) ((remainingTime%3600) / 60);-                   SystemMessage sm = new SystemMessage(SystemMessageId.AVAILABLE_AFTER_S1_S2_HOURS_S3_MINUTES);-                   sm.addString(InstanceManager.getInstance().getInstanceIdName(instanceId));-                   sm.addNumber(hours);-                   sm.addNumber(minutes);-                   activeChar.sendPacket(sm);+                   if (instanceId != 500000)+                   {+                       int hours = (int) (remainingTime / 3600);+                       int minutes = (int) ((remainingTime%3600) / 60);+                       SystemMessage sm = new SystemMessage(SystemMessageId.AVAILABLE_AFTER_S1_S2_HOURS_S3_MINUTES);+                       sm.addString(InstanceManager.getInstance().getInstanceIdName(instanceId));+                       sm.addNumber(hours);+                       sm.addNumber(minutes);+                       activeChar.sendPacket(sm);+                   }+                   else+                   {+                       int hours = (int) (remainingTime / 3600);+                       int minutes = (int) ((remainingTime%3600) / 60);+                       activeChar.sendMessage("Solo Instance will be available to re-use in " + hours + " hours and " + minutes + " minutes.");+                   }                }                else                    InstanceManager.getInstance().deleteInstanceTime(activeChar.getObjectId(), instanceId);Index: data/scripts.cfg===================================================================--- data/scripts.cfg    (revision 7669)+++ data/scripts.cfg    (working copy)@@ -207,6 +207,7 @@ village_master/orc_occupation_change_2/__init__.py  # Instance Dungeons Section+instances/Bloodshed/__init__.py instances/DarkCloudMansion/DarkCloudMansion.java instances/CrystalCaverns/CrystalCaverns.java instances/Kamaloka/Kamaloka.java
I open eclipse, right-click in the l2_server_BETA / team / apply patch / browse / i choose the patch.txt / next /
***Here i need to choose wether to apply the patch in the workspace root , or in a specified file/folder/project, and im not sure what i must choose there and what to to next***
#####
Regarding the synchronization with the repositories, i tried it but it says that i didnt change anything. and its true, all my changes are done in the c:\l2server, i havent touched workspace apart from taking the 2 .zip files to make the server folder.

could u assist here mate?

Re: Applying a patch in Eclipse

Posted: Wed Apr 24, 2013 7:03 pm
by jurchiks
You only change workspace, then compile it and paste the compiled code in c:\l2server. Make all your changes in workspace or you will have "lots of fun" making your changes stay when updating the server every time.
***Here i need to choose wether to apply the patch in the workspace root , or in a specified file/folder/project, and im not sure what i must choose there and what to to next***
When you choose the patch file, in the next step the correct project is already selected. Do not change anything, just click Next.

Re: Applying a patch in Eclipse

Posted: Wed Apr 24, 2013 7:12 pm
by cheatax21
so every change i did for example in game\config and game\data where i added some htmls and quests i shouldnt do it there?Is there any chance to add me in skype for instanst msg? I wont bother you long just to figure this one out

Re: Applying a patch in Eclipse

Posted: Wed Apr 24, 2013 7:52 pm
by jurchiks
You don't need my skype to do this. Just edit everything in workspace and synchronize with the SVN when you want to update the code.

Re: Applying a patch in Eclipse

Posted: Sat May 25, 2013 4:50 am
by fars666
jurchiks wrote:You only change workspace, then compile it and paste the compiled code in c:\l2server. Make all your changes in workspace or you will have "lots of fun" making your changes stay when updating the server every time.
***Here i need to choose wether to apply the patch in the workspace root , or in a specified file/folder/project, and im not sure what i must choose there and what to to next***
When you choose the patch file, in the next step the correct project is already selected. Do not change anything, just click Next.
Can you guide us on how to change projects in eclipse? I compiled with SVN eclipse then after the compling I got 2 zip files for data pack / login pack. I unzip it into C: drive .. and basically been use it for almost a week. Server runs good but I can't modify and .java or java core cuz it's not linked to my eclipse :(

Re: Applying a patch in Eclipse

Posted: Sat May 25, 2013 10:16 am
by jurchiks
You need to edit the sources and build again.