<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Teeworlds Forum — [OSX] Droplet to start server with cfg file]]></title>
		<link>https://www.teeworlds.com/forum/viewtopic.php?id=3400</link>
		<atom:link href="https://www.teeworlds.com/forum/extern.php?action=feed&amp;tid=3400&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in [OSX] Droplet to start server with cfg file.]]></description>
		<lastBuildDate>Thu, 12 Feb 2009 09:14:11 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[[OSX] Droplet to start server with cfg file]]></title>
			<link>https://www.teeworlds.com/forum/viewtopic.php?pid=34624#p34624</link>
			<description><![CDATA[<p>Hi! Here is my AppleScript based droplet to start Teeworlds Server simply dropping on it a cfg file. It supports custom maps and custom path of folder maps (you have to customize it)</p><div class="codebox"><pre><code>on open of the_file
    
    set the_file to quoted form of (POSIX path of (the_file))
    -- this is the path of the folder containing a folder called &quot;maps&quot;
    -- in which there are maps: (customize it)
    set the_map_folder to &quot;/Applications/Game/Teeworlds/&quot;
    
    -- this is the path of the folder containing Teeworlds Server.app (customize it)
    set the_app_folder to &quot;/Applications/Game/Teeworlds/&quot;
    tell application &quot;Terminal&quot;
        
        set cmd to &quot;cd &quot; &amp; the_map_folder &amp; &quot;;&quot; &amp; the_app_folder &amp; &quot;&#039;Teeworlds Server.app&#039;/Contents/MacOS/teeworlds_srv -f &quot; &amp; the_file
        do script cmd
    end tell
    
    -- display dialog to stop the server
    set x to (display dialog (&quot;Click this to stop server&quot;) buttons {&quot;OK&quot;} default button 1 with icon 1 with title &quot;TeewordServer&quot;)
    
    if the button returned of x is &quot;OK&quot; then
        do shell script &quot;killall quit &#039;teeworlds_srv&#039;&quot;
        tell application &quot;Terminal&quot;
            quit
        end tell
    end if
end open</code></pre></div><p>save it as application (or application bundle), put it everywhere you whant an thats it. It&#039;s a droplet, so drop file on it.<br />It uses a &quot;brute force&quot; way to stop the server. Suggestions are welcome.</p><p>Jeby</p>]]></description>
			<author><![CDATA[null@example.com (jeby)]]></author>
			<pubDate>Thu, 12 Feb 2009 09:14:11 +0000</pubDate>
			<guid>https://www.teeworlds.com/forum/viewtopic.php?pid=34624#p34624</guid>
		</item>
	</channel>
</rss>
