Register for your free account! | Forgot your password?

Go Back   elitepvpers > Popular Games > Metin2 > Metin2 Private Server > Metin2 PServer Guides & Strategies
You last visited: Today at 14:30

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[Crap RLS] Automatische Version beim Gamecore compilen

Discussion on [Crap RLS] Automatische Version beim Gamecore compilen within the Metin2 PServer Guides & Strategies forum part of the Metin2 Private Server category.

Reply
 
Old   #1
 
xCPx's Avatar
 
elite*gold: 20
Join Date: Jun 2011
Posts: 2,897
Received Thanks: 3,336
[**** RLS] Automatische Version beim Gamecore compilen

Hey,

da es mich ankotzt jedesmal wieder die version zu ändern hab ich mal just 4 fun n script für gebastelt.

funktioniert soweit auf der mainline_released.


erstellt ne datei namens getVersion.py:
Code:
#!/usr/local/bin/python
import sys
    
if(len(sys.argv) == 2):
    try:
        a = open("actual_version", "r")
        b = int(a.read())
        a.close()            
        b = str(b)
        lng = len(b)
        for i in xrange(lng, 3):
            b = "0"+b
            
        print sys.argv[1].replace("%version%", b)
    except:
        a = open("actual_version", "w")
        a.write("1")
        a.close()
        print sys.argv[1].replace("%version%", "001")
if(len(sys.argv) == 3):
    try:
        a = open("actual_version", "r")
        b = int(a.read())
        a.close()            
        b+=1
        b = str(b)
        a = open("actual_version", "w")
        a.write(b)
        a.close()
        
    except:
        a = open("actual_version", "w")
        a.write("1")
        a.close()

und dann so ne makefile dazu:

Code:
PLATFORM = $(shell file /bin/ls | cut -d' ' -f3 | cut -d'-' -f1)

GCC_VERSION = $(shell $(CC) --version 2>&1 | grep "(GCC)" | cut -d' ' -f3  | cut -d'.' -f1)
BSD_VERSION = $(shell uname -v 2>&1 | cut -d' ' -f2 | cut -d'.' -f1)
BV = r%version%
SVN_VERSION = $(shell python getVersion.py $(BV))
CC = g++

INCDIR =
LIBDIR =
BINDIR = ..
OBJDIR = OBJDIR
$(shell if [ ! -d $(OBJDIR) ]; then mkdir $(OBJDIR); fi)

# Standard Setting
LIBS = -pthread -lm -lmd
# Removed -fno-rtti 
CFLAGS = -g -Wall -O2 -m32 -pipe -fexceptions -D_THREAD_SAFE -DNDEBUG # -D_USE_SERVER_KEY_

ifeq ($(GCC_VERSION), 4)
CFLAGS += -mtune=i686 -fstack-protector-all
else
CFLAGS += -mcpu=i686
endif

# boost
INCDIR += -I../../../Extern/include/boost

# DevIL
INCDIR += -I../../libdevil
LIBDIR += -L../../libdevil
LIBS += -lIL -lpng -ltiff -lmng -llcms -ljpeg

# MySQL
ifeq ($(BSD_VERSION), 7)
INCDIR += -I../../libmysql/7.x-5.1.35
LIBDIR += -L../../libmysql/7.x-5.1.35
else
INCDIR += -I../../libmysql/5.x-5.1.35
LIBDIR += -L../../libmysql/5.x-5.1.35
endif

#LIBS += -lmysqlclient -lz
LIBS += -lmysqlclient -L/usr/local/lib/mysql -lz

# Miscellaneous external libraries
INCDIR += -I../../../Extern/include
LIBDIR += -L../../../Extern/lib
LIBS += -lcryptopp -lgtest

# HackShield
INCDIR += -I../../libhackshield/include
LIBDIR += -L../../libhackshield/lib
LIBS += -lanticpxsvr

# XTrap
INCDIR += -I../../libxtrap/include

# openssl
#INCDIR += -I/usr/include
#LIBS += -lssl
#LIBS += /usr/lib/libssl.a

# Project Library
INCDIR += -I../../liblua/include
INCDIR += -I/usr/local/include
INCDIR += -I../../libserverkey
LIBDIR += -L../../libthecore/lib -L../../libpoly -L../../libsql -L../../libgame/lib -L../../liblua/lib -L../../libserverkey
LIBDIR += -L/usr/local/lib
LIBS += -lthecore -lpoly -llua -llualib -lsql -lgame -lserverkey
USE_STACKTRACE = 0
ifeq ($(USE_STACKTRACE), 1)
LIBS += /usr/local/lib/libexecinfo.a
endif

TARGET  = $(BINDIR)/game_$(SVN_VERSION)_$(PLATFORM)
TS = $(TARGET)_stripped

CFILE	= minilzo.c

CPPFILE = BattleArena.cpp FSM.cpp MarkConvert.cpp MarkImage.cpp MarkManager.cpp OXEvent.cpp TrafficProfiler.cpp ani.cpp\
		  arena.cpp banword.cpp battle.cpp blend_item.cpp block_country.cpp buffer_manager.cpp building.cpp castle.cpp\
		  char.cpp char_affect.cpp char_battle.cpp char_change_empire.cpp char_horse.cpp char_item.cpp char_manager.cpp\
		  char_quickslot.cpp char_resist.cpp char_skill.cpp char_state.cpp PetSystem.cpp cmd.cpp cmd_emotion.cpp cmd_general.cpp\
		  cmd_gm.cpp cmd_oxevent.cpp config.cpp constants.cpp crc32.cpp cube.cpp db.cpp desc.cpp\
		  desc_client.cpp desc_manager.cpp desc_p2p.cpp dev_log.cpp dungeon.cpp empire_text_convert.cpp entity.cpp\
		  entity_view.cpp event.cpp event_queue.cpp exchange.cpp file_loader.cpp fishing.cpp gm.cpp guild.cpp\
		  guild_manager.cpp guild_war.cpp horse_rider.cpp horsename_manager.cpp input.cpp input_auth.cpp input_db.cpp\
		  input_login.cpp input_main.cpp input_p2p.cpp input_teen.cpp input_udp.cpp ip_ban.cpp\
		  item.cpp item_addon.cpp item_attribute.cpp item_manager.cpp item_manager_idrange.cpp locale.cpp\
		  locale_service.cpp log.cpp login_data.cpp lzo_manager.cpp marriage.cpp matrix_card.cpp\
		  messenger_manager.cpp mining.cpp mob_manager.cpp monarch.cpp motion.cpp over9refine.cpp p2p.cpp packet_info.cpp\
		  party.cpp passpod.cpp pcbang.cpp polymorph.cpp priv_manager.cpp pvp.cpp\
		  questevent.cpp questlua.cpp questlua_affect.cpp questlua_arena.cpp questlua_ba.cpp questlua_building.cpp\
		  questlua_danceevent.cpp questlua_dungeon.cpp questlua_forked.cpp questlua_game.cpp questlua_global.cpp\
		  questlua_guild.cpp questlua_horse.cpp questlua_pet.cpp questlua_item.cpp questlua_marriage.cpp questlua_mgmt.cpp\
		  questlua_monarch.cpp questlua_npc.cpp questlua_oxevent.cpp questlua_party.cpp questlua_pc.cpp\
		  questlua_quest.cpp questlua_target.cpp questmanager.cpp questnpc.cpp questpc.cpp\
		  refine.cpp regen.cpp safebox.cpp sectree.cpp sectree_manager.cpp sequence.cpp shop.cpp\
		  skill.cpp start_position.cpp target.cpp text_file_loader.cpp trigger.cpp utils.cpp vector.cpp war_map.cpp\
		  wedding.cpp xmas_event.cpp version.cpp panama.cpp threeway_war.cpp map_location.cpp auth_brazil.cpp\
		  BlueDragon.cpp BlueDragon_Binder.cpp DragonLair.cpp questlua_dragonlair.cpp\
		  HackShield.cpp HackShield_Impl.cpp char_hackshield.cpp skill_power.cpp affect.cpp\
		  SpeedServer.cpp questlua_speedserver.cpp XTrapManager.cpp\
		  auction_manager.cpp FileMonitor_FreeBSD.cpp ClientPackageCryptInfo.cpp cipher.cpp\
		  buff_on_attributes.cpp check_server.cpp dragon_soul_table.cpp DragonSoul.cpp\
		  group_text_parse_tree.cpp char_dragonsoul.cpp questlua_dragonsoul.cpp\
		  shop_manager.cpp shopEx.cpp item_manager_read_tables.cpp


COBJS	= $(CFILE:%.c=$(OBJDIR)/%.o)
CPPOBJS	= $(CPPFILE:%.cpp=$(OBJDIR)/%.o)

MAINOBJ = $(OBJDIR)/main.o
MAINCPP = main.cpp

TESTOBJ = $(OBJDIR)/test.o
TESTCPP = test.cpp
TEST_TARGET = $(BINDIR)/test

default: $(TARGET)
test: $(TEST_TARGET)
stripped: $(TS)


$(OBJDIR)/minilzo.o: minilzo.c
	@$(CC) -w $(CFLAGS) $(INCDIR) -c $< -o $@
	@echo compile $<

$(OBJDIR)/version.o: version.cpp
	@$(CC) -w $(CFLAGS) -D__P4_VERSION__=\"$(SVN_VERSION)\" -c $< -o $@
	@echo compile $<

$(OBJDIR)/%.o: %.cpp
	@echo compile $<
	@$(CC) -w $(CFLAGS) $(INCDIR) -c $< -o $@
update_version:
	@echo Updating Version ...
	$(shell python getVersion.py $(BV) 1)
	@echo Updating Limit Time
	@python update_limit_time.py
limit_time:
	@echo update limit time
	@python update_limit_time.py

$(TARGET): $(CPPOBJS) $(COBJS) $(MAINOBJ)
	@echo linking $(TARGET)....
	@$(CC) -w $(CFLAGS) $(LIBDIR) $(COBJS) $(CPPOBJS) $(MAINOBJ) $(LIBS) -o $(TARGET)

$(TS): $(CPPOBJS) $(COBJS) $(MAINOBJ)
	@echo linking $(TS)....
	@$(CC) -s -w -o3 $(CFLAGS) $(LIBDIR) $(COBJS) $(CPPOBJS) $(MAINOBJ) $(LIBS) -o $(TS)

$(TEST_TARGET): $(TESTCPP) $(CPPOBJS) $(COBJS) $(TESTOBJ)
	@echo linking $(TEST_TARGET)
	@$(CC) -w $(CFLAGS) $(LIBDIR) $(COBJS) $(CPPOBJS) $(TESTOBJ) $(LIBS) -o ../test

clean:
	@rm -f $(COBJS) $(CPPOBJS)
	@rm -f $(BINDIR)/game_* $(BINDIR)/conv

tag:
	ctags *.cpp *.h *.c

dep:
	makedepend -f Depend $(INCDIR) -I/usr/include/c++/3.3 -I/usr/include/c++/4.2 -p$(OBJDIR)/ $(CPPFILE) $(CFILE) $(MAINCPP) $(TESTCPP) 2> /dev/null > Depend

sinclude Depend

danach einfach eingeben:
Code:
make update_version stripped -j20
was machts? ---> updated die TimeBomb, updated die Verson und erstellt danach die stripped game


#Edit: Vergessen zu erwähnen: da mich die warnings immer angekotzt haben sind die in der makefile komplett rausgeflogen
Wers brauchen kann solls usen (habs eig wegen NetBeans geschrieben, da es mir da viel arbeit abnimmt) und wer ned der eben ned
xCPx is offline  
Thanks
11 Users
Old 01/28/2015, 21:57   #2
 
Alergix2's Avatar
 
elite*gold: 103
Join Date: Aug 2014
Posts: 1,425
Received Thanks: 315
Danke sehr nice D
Alergix2 is offline  
Old 01/28/2015, 22:16   #3
 
QuickFlameZ's Avatar
 
elite*gold: 0
Join Date: Mar 2012
Posts: 646
Received Thanks: 696
Hast du fein gemacht, bin stolz auf dich <3
QuickFlameZ is offline  
Thanks
2 Users
Old 01/29/2015, 19:35   #4


 
MrTherzon's Avatar
 
elite*gold: 170
The Black Market: 179/0/1
Join Date: Dec 2012
Posts: 9,372
Received Thanks: 2,726
Sehr schön Danke wird mir weiterhelfen.
MrTherzon is offline  
Old 01/29/2015, 22:13   #5
 
Zonni's Avatar
 
elite*gold: 100
Join Date: Feb 2008
Posts: 195
Received Thanks: 270
That's easy, simple and preety. Big thanks to you. But i've have one question: why stripped game? In this time ... poeple often doesn't steal gamecore :P The sources is more valuable.
Zonni is offline  
Thanks
1 User
Old 01/30/2015, 23:32   #6
 
xCPx's Avatar
 
elite*gold: 20
Join Date: Jun 2011
Posts: 2,897
Received Thanks: 3,336
Quote:
Originally Posted by Zonni View Post
That's easy, simple and preety. Big thanks to you. But i've have one question: why stripped game? In this time ... poeple often doesn't steal gamecore :P The sources is more valuable.
One simple thing: i got a really bad internet connection

uploading 4mb is much less than uploading 60mb.

And my source code is never on any server outside of my home
xCPx is offline  
Reply


Similar Threads Similar Threads
Source v15 Fehler beim Compilen
06/25/2013 - Flyff Private Server - 9 Replies
Hallo Community, ich habe bei Vs2003 alles richtig eingestellt und das SP1 istalliert, die Bloody Files Source lässt sich ohne Probleme compilen aber mit der v15 Source klappt es nicht und ich erhalten diesen Error: http://www.fotos-hochladen.net/uploads/unbenanntg xopfe8c02.png Kennt wer die Lösung? Habe BOOST_SDK etc. eingefügt, wie gesagt mit BF Source klappts! Danke im vorraus, Mfg
Fehler beim Compilen
02/18/2013 - WoW Private Server - 10 Replies
Ich habe mir die Aktuelle Trinity geladen, aber leider spuckt er mir bei 99% einen Fehler aus :confused: Hier mal der Screen: http://www10.pic-upload.de/17.02.13/fcrhdmqjzh.pn g Ich hoffe ihr könnt mir dabei helfen
Hilfe beim neu Compilen
02/17/2013 - .NET Languages - 2 Replies
Hallo Leute, ich habe ein Programm, dass ich mit de4dot clean gemacht habe und dann mit Net Reflector die Source rausgeholt habe, jetzt fehlen mir aber die Kenntnisse das Programm leicht zu bearbeiten und dann wieder neu abzuspeichern, damit es funktioniert, da würde ich eure hilfe brauchen. Bezahlung wäre per PayPal. Wer Interesse hat einfach eine PN schicken. Danke
Problem beim compilen
10/02/2011 - Flyff Private Server - 8 Replies
Hallo Com! Habe seit gestern anfangen mit der source zu arbeiten (reversion of chaos). nun habe ich alles bei vs2003 eingestellt, doch er will mir irgendwie nicht die Neuz.exe und die Worldserver.exe compilieren... sonst hat er alles compiliert. Hilfe... bei anfrage gibts error pics..
Probleme beim Compilen.
08/04/2010 - WoW Private Server - 0 Replies
Servus, ich habe mir die neueste Mangos Core mit SD2 Compilen wollen nur hat das nicht geklappt. Die Mangos Core habe ich zuerst compiliert und dann die SD2 Projektdatei geöffnet und versucht zu compilen nur klappt das nicht :S bekomme diesen Fehler : 1>..\ScriptMgr.cpp(478): error C3861: "GetEventIdScriptId": Bezeichner wurde nicht gefunden. ========== Erstellen: 0 erfolgreich, Fehler bei 1, 0 aktuell, 0 übersprungen ========== Hoffe mir kann jemand helfen. mfg



All times are GMT +2. The time now is 14:30.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.