Ir para conteúdo

Beeki

Herói
  • Total de itens

    1900
  • Registro em

  • Última visita

  • Dias Ganhos

    13

Tudo que Beeki postou

  1. Eu acho que sou o único do fórum que deve dinheiro pro Alex
  2. Interessante o projeto, vai ter continuidade?
  3. Prefiro fazer manualmente, /shutdown 5, e fazer um backup da database.
  4. Eu acho que, você pode tentar usar os comando dessa shell pra compilar seu OTServ, mas pelo menos teste cheque se o shell funciona na sua maquina.
  5. Testa aí meu querido. @@ -0,0 +1,183 @@ +#!/usr/bin/env bash +## Usage instructions: +## yum/apt-get install git +## git clone https://github.com/otland/forgottenserver +## cd forgottenserver +## bash ncompile.sh +## It is important to run with 'bash' and not 'sh' or as an executable(./file) +## because the script is multi-platform so I did not include the shebang +## and old shell does not support a few things I did here + +## Script by dominique120 +## Few edits and fixes by fallen(decltype) +## Idea from the compile.sh script that was packed with some TFS 0.4 revs. +## Made for TFS 1.0 +## If you plan of editing try to keep the structure and conventions +## Line endings must be LF only, not CRLF. + +## TODO: +## Add other operating systems (MacOSX, Arch Linux) +## Test the multicore build section +## Add other optimizations to the make process (maybe use ccache?) +## Make it prettier? + +## Get CPU core count +## Still testing +cpuCores=$(nproc) +## make processes to be spawned. +coreBuild=$((cpuCores + 1)) + +## Colors +greenText=$(tput setab 0; tput setaf 2) +redText=$(tput setab 0; tput setaf 1) +blueText=$(tput setab 0; tput setaf 6) +yellowText=$(tput setab 0; tput setaf 3) +none=$(tput sgr0) +### +### Functions to simplify stuff +### + +debianDeps() { + apt-get -y install cmake build-essential liblua5.2-dev \ + libgmp3-dev libmysqlclient-dev libboost-system-dev +} + +fedoraDeps() { + yum -y install cmake gcc-c++ boost-devel \ + gmp-devel community-mysql-devel lua-devel +} + +centDeps() { + yum -y install cmake gcc-c++ boost-devel \ + gmp-devel mysql-devel lua-devel +} + +bsdDeps() { + cd /usr/ports/shells/bash && make install clean BATCH=yes + cd /usr/ports/devel/git && make install clean BATCH=yes + cd /usr/ports/devel/cmake && make install clean BATCH=yes + cd /usr/ports/lang/gcc47 && make install clean BATCH=yes + cd /usr/ports/lang/luajit && make install clean BATCH=yes + cd /usr/ports/devel/boost-libs && make install clean BATCH=yes + cd /usr/ports/math/gmp && make install clean BATCH=yes + cd /usr/ports/databases/mysql-connector-c && make install clean BATCH=yes +} + +libInstall() { + echo "Libraries and Build Tools... Installed" +} + +bsdBuild() { + echo "Building on FreeBSD" + mkdir build && cd build + CXX=g++47 cmake .. + echo "Build on $cpuCores threads with $coreBuild processes? (experimental but loads faster) y or n " + read ans1_4 + if [[ $ans1_4 = "y" ]]; then + echo -e $greenText"Building on $cpuCores threads with $coreBuild processes."$none + make -j $coreBuild + elif [[ $ans1_4 = "n" ]]; then + echo -e $blueText"Building on a single thread."$none + make + else + echo -e $redText"Answer y or n"$none + fi +} + +genBuild() { + echo "Building..." + mkdir build && cd build + cmake .. + echo "Build on $cpuCores threads with $coreBuild processes? (experimental but loads faster) y or n " + read ans1_4 + if [[ $ans1_4 = "y" ]]; then + echo -e $greenText"Building on $cpuCores threads with $coreBuild processes."$none + make -j $coreBuild + elif [[ $ans1_4 = "n" ]]; then + echo -e $blueText"Building on a single thread."$none + make + else + echo -e $redText"Answer y or n"$none + fi +} +# Unused clean, I'm leaving it here in case we might need it in the future. +clean() { + mkdir objs/ + mv *.o objs/ + echo "There might be a few leftover files." +} + +### +### Script starts here +### + +#check if root +if [[ $EUID -ne 0 ]]; then + echo "You must be root to use this script, press enter to exit." + read end + exit 1 +fi +#OS dependencies and other stuff +echo "Chose your Operating System. {Supported OS: Debian, Ubuntu, Fedora, FreeBSD."$yellowText" Not recommended->"$none " CentOS or Scientific Linux" +#Note for SL6 and CentOS, look below. +read ans1 + +if [[ $ans1 = "Fedora" ]]; then + echo -n "Should the script install dependencies? y or n: " + read ans1_1 + if [[ $ans1_1 = "y" ]]; then + fedoraDeps + elif [[ $ans1_1 = "n" ]]; then + : + else + echo "Answer 'y' or 'n' " + fi +elif [[ $ans1 = "CentOS" ]] || [[ $ans1 = "Scientific Linux" ]]; then + echo -n "Should the script install dependencies? y or n: " $redText"TFS 1.0 developers discourage the use of these distributions because they have outdated packages."$none $blueText"*NOTE that versions of cmake and boost installed in this process are old, they should be installed manually by adding repositories or compiling them manually."$none + read ans1_1 + if [[ $ans1_1 = "y" ]]; then + centDeps + elif [[ $ans1_1 = "n" ]]; then + : + else + echo "Answer 'y' or 'n' " + fi +elif [[ $ans1 = "Debian" ]] || [[ $ans1 = "Ubuntu" ]]; then + echo -n "Should the script install dependencies? y or n: " + read ans1_1 + if [[ $ans1_1 = "y" ]]; then + debianDeps + elif [[ $ans1_1 = "n" ]]; then + : + else + echo "Answer 'y' or 'n' " + fi +elif [[ $ans1 = "FreeBSD" ]]; then + echo -n "Should the script install dependencies? y or n: " + read ans1_1 + if [[ $ans1_1 = "y" ]]; then + bsdDeps + elif [[ $ans1_1 = "n" ]]; then + : + else + echo "Answer 'y' or 'n' " + fi + else + echo "Pick a valid OS" + fi + +#Compiling here +echo -n "Are we on FreeBSD? y or n: " +read ans1_2 + if [[ $ans1_2 = "y" ]]; then + bsdbuild + elif [[ $ans1_2 = "n" ]]; then + genBuild + else + echo "Answer y or n" + fi + +## Notes +# 1: SL6 and CentOS latest version of CMAKE is 2.6.4 as of 1/7/2014(us), thus incompatible with TFS 1.0 building process. It must be manually added, tutorial below: +# https://github.com/jackywei/HOW-TO-BUILD-HHVM-WiKi/wiki/Build-&-Install-CMake-2.8.10.2-in-CentOS6.3 +# And look at issue #391 for more details about old packages in SL6 and CentOS
  6. lf eu assisti o filme do seu avatar, a mina mata geral
  7. Abraços, volte sempre. Alessandro, seja bem vinda.
  8. eu só acredito se postar foto beijando, k
  9. Obrigado, mas os créditos não são meus, e sim, do Wallace Ex-Administrador do DBZ Union (Sim são os arquivos do DBZ Union).
  10. Eu era bom nesse jogo, aí eu vendi minha conta.
  11. Ao meu ver o cargo não foi merecido, elevar assim a moral de uma pessoa, entregando de mão beijada um cargo tão alto, é muita coisa para quem não tem maturidade (são só opiniões) Não vou mais falar nada sobre esse assunto, a respeito do Alex.
  12. Tirando o fato do Piabeta querer ser diretor, você está certo, eu particularmente não gosto nem um pouco do Anyur, por isso dei o fora da equipe. '-'
  13. Beeki

    Eu =D

    tocando uma né...
  • Quem Está Navegando   0 membros estão online

    • Nenhum usuário registrado visualizando esta página.
×
×
  • Criar Novo...