Author Topic: [Tutorial] aCis installation, from A to Z  (Read 11870 times)

Offline FighterBoss

  • Urban Legend!
  • Dungeon Skeleton Archer
  • *
  • Posts: 131
[Tutorial] aCis installation, from A to Z
« on: January 21, 2011, 08:52:25 PM »
Setup Eclipse & SVN

Well, in this tutorial I will explain how to setup Eclipse to work with aCis project. As you perhaps know, the project is located online on a Assembla server. You, as owner, have to take a copy of the project on your computer in order to work on it and make it custom.

Some vocabulary before :
- IDE* : Integrated Development Environment. Basically, your working environnement.
- Subversion : A software used to version a project, allowing to make revision. Eclipse uses his own Subversion plugin, named Subclipse.
- Checkout : the act to download sources  (at last revision if possible...) from the online repository.

*Some others IDEs are existing, but this tutorial will only cover Eclipse setup.



1. Download and extract Eclipse !

First of all, you must download Eclipse software on its website.

Eclipse IDE for Java EE Developers or Eclipse IDE for Java Developers are both good choices.
The archive have to be directly extracted, generally on the root of your drive (C:/, D:/)



2. First launch of Eclipse

At first launch, Eclipse will ask you where your workspace will be located. Try to use a safe partition or another drive, like that all your work will be secured.




3. Installation of Subclipse

Now you must install the plugin named subclipse in order to checkout the project : in the main bar, select Help->Install New Software.


From the new window that will popup, press Add site... and write the following link: http://subclipse.tigris.org/update_1.10.x

Eclipse will ask you if you agree about the plugin rules, accept, click on Install and in the end click on the Finish button.



4. Call the SVN Repositories window

Eclipse will perhaps ask to reload, accept and wait. We have to call a window, which will be used to checkout project, and which comes with the installation of Subclispe. Click at the bar Window->Show View->Other...


In the new window, select the little SVN folder type, then select SVN Repositories and click OK.




5. Write the SVN URL in the SVN Repositories window

On the new tab, click at SVN Repositories, then  right click anywhere inside and go to New->Repository Location....


Using the following url : http://xp-dev.com/svn/aCis_public/ you will link yourself to the project. Click Finish.



6. Checkout !

Last but not least, you must check out datapack and gameserver with the same way.
Select the new location, right click on the SVN link, select Checkout...


and click in the new window Finish.


Wait Eclipse download the whole project in order to work on it, depending of your connection it can be 2-10 minutes.



7. Configure compiler path.

Your eclipse will try to search the compiler in the wrong direction if you had an old version of JRE installed.

You have to change this direction, following those simple instructions :

- Window > Preferences. A window will popup.
- Java tab > Installed JREs.

Push "Search..." and give yourself the good path. It mustn't be JRE, but jdk.
« Last Edit: February 18, 2016, 01:49:16 PM by SweeTs »

Offline Tryskell

  • The cute dwarf
  • Administrator
  • Core
  • *
  • Posts: 3.763
  • Awards You don't like me, but I got the power. Forever dwarf.
Re: [Tutorial] aCis installation, from A to Z
« Reply #1 on: November 28, 2011, 02:46:39 PM »
Compilation of aCis project using Eclipse

In this short tutorial, I will explain how to compile aCis project using Eclipse.
 
Before starting compiling, you must setup eclipse & svn (see the previous tutorial for further details).



1. Checkout any revision & create java's path !

As you have clicked to datapack (or gameserver) checkout button, a window poped up.
You can checkout any version writing an existing revision number instead the xx on my screen.


If you check Check out HEAD Revision, it will automatically checkout the last revision. Others options will be grey.
Then, simply click on Finish.



2. Compile aCis project!

When projects' checkouts (gameserver/datapack) are over, you will have a local copy of aCis' files. Congratulations, you are ready to compile them.


On the image, we have only checkouted datapack sources. This is an exemple, normally you should have 2 distinct projects. You need to compile each project.

  • Click on the little + icon from datapack (once again, it could be gameserver, datapack is taken as exemple).
  • Right click at build.xml
  • Choose Run as -> 1 Ant Build

The compilation should normally begin. It will take some seconds / minutes depending of your own computer performances. At the end of any compilation you should have

Code: [Select]
Buildfile: C:\workspace\aCis_datapack\build.xml
init:
    [mkdir] Created dir: C:\workspace\aCis_datapack\build\dist
    [mkdir] Created dir: C:\workspace\aCis_datapack\build\dist\gameserver
    [mkdir] Created dir: C:\workspace\aCis_datapack\build\dist\login
version:
     [echo] aCis datapack revision: 170
export:
     [sync] Copying 3949 files to C:\workspace\aCis_datapack\build\dist\gameserver\data
     [sync] Copying 84 files to C:\workspace\aCis_datapack\build\dist\sql
     [sync] Copying 4 files to C:\workspace\aCis_datapack\build\dist\tools
     [sync] Copying 1 file to C:\workspace\aCis_datapack\build\dist\login
dist:
BUILD SUCCESSFUL
Total time: 46 seconds

From the moment you got BUILD SUCCESFULL, it means compilation succeeded. You have to do same actions for gameserver project.



3. Find compiled files on your drive !

The path fully depends of where you put your workspace. Don't take those informations at first degree.

As my workspace is setup in C:/, let's go at C:\workspace\aCis_datapack\build to see what new files / folders have been created from compilation. For gameserver project, the location is C:\workspace\aCis_gameserver\build\dist.

As you have build/compile datapack & gameserver, you should have also create a folder with name(for ex.)MyServer at C: and copy paste the folders inside there.
So now at MyServer folder you should have folders: gameserver, login, sql, tools.
« Last Edit: February 18, 2016, 01:56:14 PM by SweeTs »
Code: [Select]
<html><body>Triskel:<br>
Triskel does not speak with foolish fellows who do not know their profession!
</body></html>

Offline Tryskell

  • The cute dwarf
  • Administrator
  • Core
  • *
  • Posts: 3.763
  • Awards You don't like me, but I got the power. Forever dwarf.
Re: [Tutorial] aCis installation, from A to Z
« Reply #2 on: November 28, 2011, 02:47:57 PM »
Installing aCis

INTRODUCTION

Well, don't laugh, but some people asked for it. You have to know this tutorial is useful at any case, from L2J IL to Freya, using my pack or not.

Important things :
  • In this tutorial, some things aren't essential (shortcuts, etc), but they're presented to make your life easier & reduce the installation / upgrade time.
  • We use 2 different locations : the sources location, which got compiled version and sources, and the server installation location, which got your server files organized. It's IMPORTANT TO DON'T USE SAME PLACE FOR BOTH USES. Using your build location as server installation will result in a big mess. You're warned. So be clever and simply create a new folder. I personally use a folder Sources and another named Servers.
  • My windows is in French, just use common sense in order to find good paths...

So, you compiled both gameserver and datapack using FighterBoss's tutorial. How to install the crap then ?



DATAPACK INSTALLATION

Okay, as you have all necessary files in one folder, now you can configure them and install.

Quote
I don't give any hints on how to install mySQL/WAMP/whatever nor paramatering it. You're enough old to use Google, or to check existing tutorials in specialized websites.

You have to create your database first in navicat / phpMyAdmin. Continuing this tutorial without doing it will result in a fail at database installation.

We will first install the database, so go on tools folder, right click on database_installer.bat and click on Modify option.

You have to edit this square with your own informations.

Code: [Select]
REM ############################################
REM ## You can change here your own DB params ##
REM ############################################
REM MYSQL BIN PATH
set mysqlBinPath=C:\Program Files\MySQL\MySQL Server 5.5\bin

REM LOGINSERVER
set lsuser=root
set lspass=KEEP_EMPTY_IF_NO_PASSWORD
set lsdb=acis
set lshost=localhost

REM GAMESERVER
set gsuser=root
set gspass=KEEP_EMPTY_IF_NO_PASSWORD
set gsdb=acis
set gshost=localhost
REM ############################################

Don't forget to save modifications, then run database_installer.bat double clicking on it. For a full install, just type f and type y anew to confirm you want to delete all characters table. Wait it install tables, than verify (who knowns, you are perhaps the unlucky type) if the database is installed.



After you verified database is populated, move from tools folder to login.

Open config folder, then edit loginserver.properties

Quote
#=============================================================
#                    Database informations
#=============================================================

URL = jdbc:mysql://localhost/acis
#URL = jdbc:hsqldb:hsql://localhost/acis
#URL = jdbc:sqlserver://localhost/database=acis/user=sa/password=

Login = root
Password = KEEP_EMPTY_IF_NO_PASSWORD

The same you have to do with gameserver.properties located inside gameserver/config folder.

As you have set correct database path, now you can register your gameserver / create hexid file.

Go to login folder and run RegisterGameServer.bat

When the window pops up, type 1 and press enter. If you (previously) correctly configured the db path, the result should be following



Now, select the hexid(server 1) and rename it to hexid. Cut the file and paste it inside gameserver/config folder.

And that's it, you have successfully configured your server files. Now you can launch the server (startLoginServer.bat and startGameServer.bat).
« Last Edit: February 18, 2016, 02:30:35 PM by SweeTs »
Code: [Select]
<html><body>Triskel:<br>
Triskel does not speak with foolish fellows who do not know their profession!
</body></html>

Offline Tryskell

  • The cute dwarf
  • Administrator
  • Core
  • *
  • Posts: 3.763
  • Awards You don't like me, but I got the power. Forever dwarf.
Re: [Tutorial] aCis installation, from A to Z
« Reply #3 on: November 28, 2011, 02:52:53 PM »
Updating server

If you made java developement like adding customs etc, you have to use Team Synchronize from Eclipse to keep your customs but refresh code.



If you "only" talk of updating your server from revision xxx to revision xxx+1, you have first to checkout/synchronize latest version, then compile, then :

- in near 90% of case, pick the l2jserver.jar and copy/paste it in the libs folder of your server. It is needed if there was core additions. In some very rare cases, you will have to update the loginserver l2jserver lib too, but in 95% of time it's not needed.

- add DP (can be HTMs added, drop/update of a SQL table for another with better content, and such). Use the timeline to see what files have been changed, it's useful for DP.

- configs file are rarely updated, but sometimes they are. Like the addition of floodProtector. You can keep old configs in server.properties or delete them at hand, but you have to add the new .properties in order you want to change values. By default it will use values written in core so even if you forget the file, that works, but you can't configure it :)
Code: [Select]
<html><body>Triskel:<br>
Triskel does not speak with foolish fellows who do not know their profession!
</body></html>

Offline Tryskell

  • The cute dwarf
  • Administrator
  • Core
  • *
  • Posts: 3.763
  • Awards You don't like me, but I got the power. Forever dwarf.
Re: [Tutorial] aCis installation, from A to Z
« Reply #4 on: April 24, 2013, 08:21:22 PM »


« Last Edit: February 19, 2016, 01:10:36 AM by SweeTs »
Code: [Select]
<html><body>Triskel:<br>
Triskel does not speak with foolish fellows who do not know their profession!
</body></html>

Offline SweeTs

  • ╭∩╮(︶︿︶)╭∩╮
  • Fanatic Fan
  • Core
  • *
  • Posts: 3.581
  • You're never too old to learn something stupid.
  • Awards Do what you want 'cause a pirate is free, you are a pirate ! Searched by gold diggers, loved by Mama Tryskell. Bring good advices or reports. Crazy Banana.
Re: [Tutorial] aCis installation, from A to Z
« Reply #5 on: February 18, 2016, 05:31:58 PM »
The crappy guide has been updated. A short video added as well.