Skip to content

Commit

Permalink
compatibility with pyinstaller
Browse files Browse the repository at this point in the history
  • Loading branch information
rkenmi committed Aug 23, 2017
1 parent 755b789 commit d673a87
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ You can simply execute the launcher.py file, or you can go into command prompt a

`python launcher.py`

# How to Build

An executable file can be built by using `pyinstaller`:

`pyinstaller --add-data src;src --add-data sounds;sounds --add-data img;img --add-data sprites;sprites --add-data tilemap;tilemap --onefile launcher.py`

# Backstory

The game is set in the middle of 22nd century, and the player flies a futuristic fighter craft called the R-9a "Arrowhead", named for its shape, and because it is the ninth model in the 'R' series of fighter craft (but it is the first of the series to actually be used in combat; the previous models were all prototypes).
Expand Down
4 changes: 4 additions & 0 deletions launcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
Rick Miyamoto
"""
import os
import sys

import pygame
Expand All @@ -14,6 +15,9 @@

FPS = 60

# A hack to get pyinstaller to work
if getattr(sys, 'frozen', False):
os.chdir(sys._MEIPASS)

def main():
pygame.init()
Expand Down

0 comments on commit d673a87

Please sign in to comment.