Building script
#27
(11-20-2012, 02:36 AM)xoft Wrote: This has a few issues:
- where are you installing? Into Program Files? Bam - UAC won't let ordinary users write there (-> world and config not writable)
- you're using absolute paths for files, this script won't work on any other computer than yours
- if there is ever a new file added to the plugins, or webadmin folder, your script will have to be modified (and it will be forgotten to be modified Wink . Use wildcards - *.lua, *.ini etc.

this was a way i found on internet so i used thisTongue.
it install in: C:\Program Files (x86)\FakeTruth\MC-Server
its not germenTongue its dutch sorry Sad i posted it with my mobile phone and it has auto correct.
map = folder indeed.
here is the code if you want to take a look at it without downloading the script:
Code:
@ECHO off
set tortoisesvncmd="%ProgramFiles%\TortoiseSVN\bin\svn.exe"
set visualexpress2008cmd="%ProgramFiles(x86)%\Microsoft Visual Studio 9.0\VC\vcpackages\vcbuild.exe"

echo ___                      _                _  _                                        
echo !   \  ___ __ __ __ _ _  ! ! ___  __ _  __! !(_) _ _   __ _  
echo ! !) !/ _ \\ V  V /! ' \ ! !/ _ \/ _` !/ _` !! !! ' \ / _` !
echo !___/ \___/ \_/\_/ !_!!_!!_!\___/\__,_!\__,_!!_!!_!!_!\__, !
echo ___ ___  _  _  _ _  __  ___                            !___/    
echo (_--/ _ \! !! !! '_!/ _!/ -_)
echo /__/\___/ \_,_!!_!  \__!\___!    
echo.
echo.
echo Downloading Source                                                                                                  
timeout /t 3 >nul
%tortoisesvncmd% checkout http://mc-server.googlecode.com/svn/trunk/
cd trunk
cd VC2008
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo   ___                    _  _  _            
echo  / __! ___  _ __   _ __ (_)! !(_) _ _   __ _
echo ! (__ / _ \! '  \ ! '_ \! !! !! !! ' \ / _` !
echo  \___!\___/!_!_!_!! .__/!_!!_!!_!!_!!_!\__, !
echo                   !_!                  !___/
echo.
echo.
echo.
echo.
echo.
echo.
echo.
timeout /t 3 >nul
%visualexpress2008cmd% /build MCServer.sln "Release|Win32"
echo !                                                                      !
echo !                                                                      !
echo !                                                                      !
echo !                                                                      !
echo !                                                                      !
echo !                                                                      !
echo !                                                                      !
echo !                                                                      !
echo _______ _________ _       _________ _______           _______  ______  
echo (  ____ \\__   __/( (    /!\__   __/(  ____ \!\     /!(  ____ \(  __  \
echo ! (    \/   ) (   !  \  ( !   ) (   ! (    \/! )   ( !! (    \/! (  \  )
echo ! (__       ! !   !   \ ! !   ! !   ! (_____ ! (___) !! (__    ! !   ) !
echo !  __)      ! !   ! (\ \) !   ! !   (_____  )!  ___  !!  __)   ! !   ! !
echo ! (         ! !   ! ! \   !   ! !         ) !! (   ) !! (      ! !   ) !
echo ! )      ___) (___! )  \  !___) (___/\____) !! )   ( !! (____/\! (__/  )
echo !_!       \_______/!/    )_)\_______/\_______)!/     \!(_______/(______/
echo !                                                                      !
echo !                                                                      !
echo !                                                                      !
echo !                                                                      !
echo !                                                                      !
echo !                                                                      !
echo !                                                                      !
set /p answer=Would you like to configurate MC-Server? (Y/N) :

if %answer% == Y goto A
if %answer% == y goto A
if %answer% == N goto B
if %answer% == n goto B

:A
cls
echo Alright we start with your username.
echo.
cd ..
cd MCServer
set /p Admin=Please Enter your Username:

cls
del users.ini
Echo [%Admin%] >> users.ini
Echo Groups=Admins >> users.ini

set /p MN=Would you like to have more people with admin permissions? [Y/N] :
cls
if %MN% == Y goto MNY
if %MN% == y goto MNY
if %MN% == N goto MNN
if %MN% == n goto MNN
:MNY
set /p Nickname=Please Enter Another Username:

cls
Echo. >> users.ini
Echo [%Nickname%] >> users.ini
Echo Groups=Admins >> users.ini
set /p MN=Would you like to have more people with admin permissions? [Y/N] :
cls
if %MN% == Y goto MNY
if %MN% == y goto MNY
if %MN% == N goto MNN
if %MN% == n goto MNN

:MNN
set /p Port=Please Enter your server port (default minecraft is 25565):

cls
set /p MaxPlayers= Please enter the maxplayers able to join:

cls
set /p Description=Please enter your server description:

cls
del settings.ini
echo [Server]>> settings.ini
echo Port=%port%>> settings.ini
echo MaxPlayers=%MaxPlayers%>> settings.ini
echo Description=%Description%>> settings.ini

set /p Worldname=Please set your Default Worldname:

cls

echo. >> settings.ini
echo [Worlds] >> settings.ini
echo DefaultWorld=%Worldname%>> settings.ini
:World
set /p CWorld=Would you like to have more worlds? [Y/N] :
cls
if %CWorld% == Y goto CWY
if %CWorld% == y goto CWY
if %CWorld% == N goto CWN
if %CWorld% == n goto CWN
:CWY

set /p World=Please choose another worldname :
cls
echo World=%World%>> settings.ini
goto World
:CWN
set /p Core=Would you like to enable core? [Y/N]:

cls
if %Core% == Y goto Y
if %Core% == y goto Y
if %Core% == N goto N
if %Core% == n goto N

:Y
cls
echo. >> settings.ini
echo [Plugins]>> settings.ini
echo Plugin=Core>> settings.ini
set /p pl=Would you like to have the /pluginlist command work? [Y/N] :
cls
if %pl% == Y goto PLY
if %pl% == y goto PLY
if %pl% == N goto N
if %pl% == n goto N

:PLY
echo. >> settings.ini
echo [HelpPlugin] >> settings.ini
echo ShowPluginNames=1 >> settings.ini

goto Next

:N
echo. >> settings.ini
echo [Plugins]>> settings.ini
echo. >> settings.ini
echo [HelpPlugin] >> settings.ini
echo ShowPluginNames=0 >> settings.ini

:Next

set /p Mobs=Would you like to have mobs enabled? [Y/N] :

cls
if %Mobs% == Y goto Yes
if %Mobs% == y goto Yes
if %Mobs% == N goto No
if %Mobs% == n goto No

:Yes
echo. >> settings.ini
echo [Monsters]>> settings.ini
echo AnimalsOn=1 >> settings.ini
echo AnimalSpawnInterval=10>> settings.ini
echo Types=Spider,Chicken,Cow,Pig,Sheep,Squid,Enderman,Zombiepigman,Cavespider,Creeper,Ghast,Silverfish,Skeleton,Slime,Spider,Zombie>> settings.ini

Goto Next2

:No
echo. >> settings.ini
echo [Monsters]>> settings.ini
echo AnimalsOn=0 >> settings.ini
echo AnimalSpawnInterval=10>> settings.ini
echo Types=Spider,Chicken,Cow,Pig,Sheep,Squid,Enderman,Zombiepigman,Cavespider,Creeper,Ghast,Silverfish,Skeleton,Slime,Spider,Zombie>> settings.ini

:Next2
set /p Auth=Would you like to have authentication on? [Y/N]:

cls
if %Auth% == Y goto Yy
if %Auth% == y goto Yy
if %Auth% == N goto Nn
if %Auth% == n goto Nn

:Yy
echo. >> settings.ini
echo [Authentication]>> settings.ini
echo Server=session.minecraft.net>> settings.ini
echo Authenticate=1 >> settings.ini
goto next3

:Nn
echo.>> settings.ini
echo [Authentication]>> settings.ini
echo Server=session.minecraft.net>> settings.ini
echo Authenticate=0 >> settings.ini

:next3
cls
echo.
echo.
echo.
echo   ___           __ _                    _   _          
echo  / __!___ _ _  / _(_)__ _ _  _ _ _ __ _! !_(_)___ _ _  
echo ! (__/ _ \ ' \!  _! / _` ! !! ! '_/ _` !  _! / _ \ ' \
echo  \___\___/_!!_!_! !_\__, !\_,_!_! \__,_!\__!_\___/_!!_!
echo                     !___/          
echo  ___ _      _    _           _
echo ! __(_)_ _ (_)__! !_  ___ __! !
echo ! _!! ! ' \! (_-- ' \/ -_) _` !
echo !_! !_!_!!_!_/__/_!!_\___\__,_!
echo.
echo.
echo.
echo configuration finished                                                  
timeout /t 3 >nul
Goto Finish

:B
cls
cd ..
cd MCServer
Echo Thank you for Downloading MC-Server
Timeout /t 3 >nul


:Finish
cd ..
cd..
mkdir MCServer
cd MCServer
mkdir Plugins
cd Plugins
mkdir Core
cd ..
mkdir webadmin
cd ..
xcopy trunk\MCServer MCServer
xcopy trunk\MCServer\Plugins MCServer\plugins
xcopy trunk\MCServer\Plugins\core MCServer\plugins\core
xcopy trunk\MCServer\webadmin MCServer\webadmin
cd MCServer
del MCServer.pdb

pause
its probably not the cleanest code but hey it works Smile
Reply
Thanks given by:


Messages In This Thread
Building script - by NiLSPACE - 11-03-2012, 08:30 AM
RE: Building script - by Taugeshtu - 11-03-2012, 08:31 AM
RE: Building script - by xoft - 11-03-2012, 09:12 AM
RE: Building script - by NiLSPACE - 11-03-2012, 09:14 AM
RE: Building script - by NiLSPACE - 11-03-2012, 11:02 PM
RE: Building script - by xoft - 11-04-2012, 01:16 AM
RE: Building script - by Luksor - 11-04-2012, 03:21 AM
RE: Building script - by NiLSPACE - 11-05-2012, 06:46 AM
RE: Building script - by NiLSPACE - 11-17-2012, 11:54 PM
RE: Building script - by NiLSPACE - 11-19-2012, 02:21 AM
RE: Building script - by xoft - 11-19-2012, 02:47 AM
RE: Building script - by NiLSPACE - 11-19-2012, 04:46 AM
RE: Building script - by xoft - 11-19-2012, 04:57 AM
RE: Building script - by NiLSPACE - 11-19-2012, 05:02 AM
RE: Building script - by xoft - 11-19-2012, 06:11 AM
RE: Building script - by NiLSPACE - 11-19-2012, 06:46 AM
RE: Building script - by ThuGie - 11-19-2012, 06:46 AM
RE: Building script - by NiLSPACE - 11-19-2012, 06:52 AM
RE: Building script - by ThuGie - 11-19-2012, 07:27 AM
RE: Building script - by NiLSPACE - 11-19-2012, 07:30 AM
RE: Building script - by NiLSPACE - 11-19-2012, 08:57 PM
RE: Building script - by xoft - 11-20-2012, 12:39 AM
RE: Building script - by NiLSPACE - 11-20-2012, 01:40 AM
RE: Building script - by xoft - 11-20-2012, 02:36 AM
RE: Building script - by NiLSPACE - 11-20-2012, 03:14 AM
RE: Building script - by NiLSPACE - 11-20-2012, 04:32 PM
RE: Building script - by xoft - 11-20-2012, 07:27 PM
RE: Building script - by NiLSPACE - 11-20-2012, 02:39 AM
RE: Building script - by xoft - 11-20-2012, 02:43 AM
RE: Building script - by NiLSPACE - 11-20-2012, 05:29 AM
RE: Building script - by NiLSPACE - 11-21-2012, 03:53 AM
RE: Building script - by ThuGie - 11-21-2012, 05:27 AM
RE: Building script - by xoft - 11-21-2012, 05:54 AM
RE: Building script - by NiLSPACE - 11-21-2012, 06:07 AM
RE: Building script - by NiLSPACE - 12-01-2012, 05:19 AM
RE: Building script - by NiLSPACE - 12-01-2012, 09:59 PM
RE: Building script - by xoft - 12-02-2012, 05:39 AM
RE: Building script - by NiLSPACE - 12-02-2012, 06:04 AM
RE: Building script - by xoft - 12-02-2012, 06:06 AM
RE: Building script - by NiLSPACE - 12-27-2012, 11:59 PM



Users browsing this thread: 3 Guest(s)