Note: This forum is merely an archive. It is no longer possible to register or post. - StackOverflow
New Ace of Spades Forums: http://buildandshoot.com/

[Question] How can I create a *.exe from the source files?

For all your hosting needs.

[Question] How can I create a *.exe from the source files?

Postby oxygenxd » Fri Mar 16, 2012 11:05 pm

Hi guys!

I sometimes use my server also at other pcs, so a *.exe is better, because i don't want to install python everytime.
Last time I used the binary files from pyspades, but now I edited some features in run.py and commands.py .
So I can't use the server at an other pc, beause it needs now python to run.

Can you tell me if and how I can compile the Python files to a binary file *.exe ?

Thx.


Sorry, if my english is not so perfect, I'm German. Would be nice if you speak in simple english :)
There are 10 types of humen, the ones who understand the binary system and the ones who don't.

Sorry, if my english is not so perfect, I'm German. Would be nice if you speak in simple english :)
oxygenxd
Member
 
Posts: 11
Joined: Fri Mar 16, 2012 10:42 pm

Re: [Question] How can I create a *.exe from the source file

Postby matpow2 » Sat Mar 17, 2012 7:14 pm

You should add changes by scripts, not by editing run.py or commands.py.
User avatar
matpow2
Site Admin
 
Posts: 47
Joined: Thu Dec 29, 2011 12:35 pm
Location: Denmark, Odense

Re: [Question] How can I create a *.exe from the source file

Postby oxygenxd » Sat Mar 17, 2012 8:19 pm

Hmm.... Yes.

But this is not my Question.
You should know this as admin... :P
There are 10 types of humen, the ones who understand the binary system and the ones who don't.

Sorry, if my english is not so perfect, I'm German. Would be nice if you speak in simple english :)
oxygenxd
Member
 
Posts: 11
Joined: Fri Mar 16, 2012 10:42 pm

Re: [Question] How can I create a *.exe from the source file

Postby oxygenxd » Sun Mar 18, 2012 11:17 am

Ohh, now i got what you meant :)

You're right, so i can make it.

It edited run.py so (exapmle):
Code: Select all
....

    def on_hit(self, hit_amount, player, type):
        if not self.protocol.killing and not self.admin:
            self.send_chat(
                "Du kannst jetzt niemanden umbringen! Schaden ist AUS!")
            return False
        if not self.killing and not self.admin:
            self.send_chat("%s. Du kannst niemanden umbringen." % player.name)
            return False
        elif player.god:
            if not player.invisible:
                self.send_chat("Du kannst %s nicht schaden! Dieser Spieler ist im "
                    "*god mode*" % player.name)
            return True
        #if self.god:
            #self.protocol.send_chat('%s, toeten im *god mode* ist verboten!' %
            #    self.name, irc = True)
            #self.protocol.send_chat('%s ist jetzt wieder ein normaler Mensch.' %
            #    self.name, irc = True)
            #self.god = False
            #self.god_build = False

......

I know, killing in invis-mode is unfair, but I use it only in LAN-fights... :)

But can you tell me how to make it into a script?


Ignore the german language, it's not really needed, i just tried to translate it.
There are 10 types of humen, the ones who understand the binary system and the ones who don't.

Sorry, if my english is not so perfect, I'm German. Would be nice if you speak in simple english :)
oxygenxd
Member
 
Posts: 11
Joined: Fri Mar 16, 2012 10:42 pm


Return to Server



Who is online

Users browsing this forum: No registered users and 18 guests