• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • If you're using Gesior 2012 or MyAAC, please review this thread for information about a serious security vulnerability and a fix.

CMake Nostalrius Ubuntu 20.04.

chucky91

Well-Known Member
Joined
Apr 8, 2010
Messages
171
Solutions
9
Reaction score
81
I come to contribute here with an edition of CMake for Nostalrius 3.0
Before saying it already existed, I didn't find it myself, but come on, this one is for those who can't compile a nostalrius on ubuntu 20.04
The files you must replace the CMake folder and the CmakeLists.txt this is what is outside the SRC folder, while inside the SRC it already comes in your downloaded Nostalrius, however you must remove the weapons.cpp from it, because it doesn't have for nostalrius .

Then just install the libraries.
sudo apt install git cmake build-essential libluajit-5.1-dev libmariadb-dev-compat libboost-date-time-dev libboost-filesystem-dev libboost-system-dev libboost-iostreams-dev libpugixml-dev libgmp3-dev libcrypto++-dev libfmt-dev
when you have your project ready, go to the project folder where the config.dist is.
start the commands.
mkdir build && cd build
after
after analyzing everything
and hope it finishes its compilation, the file will be in green and written tfs
then just move it to the otserv folder before the data
mv tfs /your path ots
 

Attachments

marcelomnzs

New Member
Joined
Aug 9, 2019
Messages
42
Reaction score
4
# cmake ..
-- MySQL Include dir: /usr/include/mysql library dir: /usr/lib/aarch64-linux-gnu
-- MySQL client libraries: /usr/lib/aarch64-linux-gnu/libmysqlclient.so;-ldl
-- IPO / LTO enabled
-- Configuring done
CMake Error at CMakeLists.txt:9 (add_executable):
No SOURCES given to target: tfs


CMake Generate step failed. Build files cannot be regenerated correctly.

help please, and where I remove the weapons.cpp?
 
Last edited:

Joriku

Working in the mines, need something?
Joined
Jul 16, 2016
Messages
1,033
Solutions
15
Reaction score
323
Location
Sweden
YouTube
Joriku
# cmake ..
-- MySQL Include dir: /usr/include/mysql library dir: /usr/lib/aarch64-linux-gnu
-- MySQL client libraries: /usr/lib/aarch64-linux-gnu/libmysqlclient.so;-ldl
-- IPO / LTO enabled
-- Configuring done
CMake Error at CMakeLists.txt:9 (add_executable):
No SOURCES given to target: tfs


CMake Generate step failed. Build files cannot be regenerated correctly.

help please, and where I remove the weapons.cpp?
Try this:

1. sudo apt-get -y install libboost-all-dev

2. Remove the weapons.cpp through CMakeLists.txt, you can find it by CTRL + F and search for weapons.cpp. Remove the whole line.

If I remember correctly, remove this line at line 12 in CMakeLists.txt aswell:
-Werror
 
OP
OP
chucky91

chucky91

Well-Known Member
Joined
Apr 8, 2010
Messages
171
Solutions
9
Reaction score
81
# cmake ..
-- MySQL Include dir: /usr/include/mysql library dir: /usr/lib/aarch64-linux-gnu
-- MySQL client libraries: /usr/lib/aarch64-linux-gnu/libmysqlclient.so;-ldl
-- IPO / LTO enabled
-- Configuring done
CMake Error at CMakeLists.txt:9 (add_executable):
No SOURCES given to target: tfs


CMake Generate step failed. Build files cannot be regenerated correctly.

help please, and where I remove the weapons.cpp?
in Folder src CMakeLists.txt
Lua:
set(tfs_SRC
    ${CMAKE_CURRENT_LIST_DIR}/otpch.cpp
    ${CMAKE_CURRENT_LIST_DIR}/actions.cpp
    ${CMAKE_CURRENT_LIST_DIR}/ban.cpp
    ${CMAKE_CURRENT_LIST_DIR}/baseevents.cpp
    ${CMAKE_CURRENT_LIST_DIR}/bed.cpp
    ${CMAKE_CURRENT_LIST_DIR}/behaviourdatabase.cpp
    ${CMAKE_CURRENT_LIST_DIR}/chat.cpp
    ${CMAKE_CURRENT_LIST_DIR}/combat.cpp
    ${CMAKE_CURRENT_LIST_DIR}/commands.cpp
    ${CMAKE_CURRENT_LIST_DIR}/condition.cpp
    ${CMAKE_CURRENT_LIST_DIR}/configmanager.cpp
    ${CMAKE_CURRENT_LIST_DIR}/connection.cpp
    ${CMAKE_CURRENT_LIST_DIR}/container.cpp
    ${CMAKE_CURRENT_LIST_DIR}/creature.cpp
    ${CMAKE_CURRENT_LIST_DIR}/creatureevent.cpp
    ${CMAKE_CURRENT_LIST_DIR}/cylinder.cpp
    ${CMAKE_CURRENT_LIST_DIR}/database.cpp
    ${CMAKE_CURRENT_LIST_DIR}/databasemanager.cpp
    ${CMAKE_CURRENT_LIST_DIR}/databasetasks.cpp
    ${CMAKE_CURRENT_LIST_DIR}/depotlocker.cpp
    ${CMAKE_CURRENT_LIST_DIR}/fileloader.cpp
    ${CMAKE_CURRENT_LIST_DIR}/game.cpp
    ${CMAKE_CURRENT_LIST_DIR}/globalevent.cpp
    ${CMAKE_CURRENT_LIST_DIR}/guild.cpp
    ${CMAKE_CURRENT_LIST_DIR}/groups.cpp
    ${CMAKE_CURRENT_LIST_DIR}/house.cpp
    ${CMAKE_CURRENT_LIST_DIR}/housetile.cpp
    ${CMAKE_CURRENT_LIST_DIR}/ioguild.cpp
    ${CMAKE_CURRENT_LIST_DIR}/iologindata.cpp
    ${CMAKE_CURRENT_LIST_DIR}/iomap.cpp
    ${CMAKE_CURRENT_LIST_DIR}/iomapserialize.cpp
    ${CMAKE_CURRENT_LIST_DIR}/item.cpp
    ${CMAKE_CURRENT_LIST_DIR}/items.cpp
    ${CMAKE_CURRENT_LIST_DIR}/luascript.cpp
    ${CMAKE_CURRENT_LIST_DIR}/mailbox.cpp
    ${CMAKE_CURRENT_LIST_DIR}/map.cpp
    ${CMAKE_CURRENT_LIST_DIR}/monster.cpp
    ${CMAKE_CURRENT_LIST_DIR}/monsters.cpp
    ${CMAKE_CURRENT_LIST_DIR}/movement.cpp
    ${CMAKE_CURRENT_LIST_DIR}/networkmessage.cpp
    ${CMAKE_CURRENT_LIST_DIR}/npc.cpp
    ${CMAKE_CURRENT_LIST_DIR}/otserv.cpp
    ${CMAKE_CURRENT_LIST_DIR}/outputmessage.cpp
    ${CMAKE_CURRENT_LIST_DIR}/party.cpp
    ${CMAKE_CURRENT_LIST_DIR}/player.cpp
    ${CMAKE_CURRENT_LIST_DIR}/position.cpp
    ${CMAKE_CURRENT_LIST_DIR}/protocol.cpp
    ${CMAKE_CURRENT_LIST_DIR}/protocolgame.cpp
    ${CMAKE_CURRENT_LIST_DIR}/protocollogin.cpp
    ${CMAKE_CURRENT_LIST_DIR}/protocolstatus.cpp
    ${CMAKE_CURRENT_LIST_DIR}/raids.cpp
    ${CMAKE_CURRENT_LIST_DIR}/rsa.cpp
    ${CMAKE_CURRENT_LIST_DIR}/scheduler.cpp
    ${CMAKE_CURRENT_LIST_DIR}/scriptmanager.cpp
    ${CMAKE_CURRENT_LIST_DIR}/server.cpp
    ${CMAKE_CURRENT_LIST_DIR}/spawn.cpp
    ${CMAKE_CURRENT_LIST_DIR}/spells.cpp
    ${CMAKE_CURRENT_LIST_DIR}/script.cpp
    ${CMAKE_CURRENT_LIST_DIR}/talkaction.cpp
    ${CMAKE_CURRENT_LIST_DIR}/tasks.cpp
    ${CMAKE_CURRENT_LIST_DIR}/teleport.cpp
    ${CMAKE_CURRENT_LIST_DIR}/thing.cpp
    ${CMAKE_CURRENT_LIST_DIR}/tile.cpp
    ${CMAKE_CURRENT_LIST_DIR}/tools.cpp
    ${CMAKE_CURRENT_LIST_DIR}/vocation.cpp
    ${CMAKE_CURRENT_LIST_DIR}/waitlist.cpp
    ${CMAKE_CURRENT_LIST_DIR}/wildcardtree.cpp
PARENT_SCOPE)
 

marcelomnzs

New Member
Joined
Aug 9, 2019
Messages
42
Reaction score
4
very thanks.. i got it online. but erros in mysql again:

Message: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '?,lastlogin = 1661393577,lastip = 3732834984,conditions = '',skulltime =' at line 1
Error while saving player: Mage
Message: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '?,lastlogin = 1661393577,lastip = 3732834984,conditions = '',skulltime =' at line 1
Error while saving player: Mage

can help?
 
Top