Skip to content

Commit

Permalink
Merge pull request #8 from DazedNConfused-/develop
Browse files Browse the repository at this point in the history
Fixed built binaries startup problems for new Python version
  • Loading branch information
DazedNConfused- authored Feb 25, 2022
2 parents fc7d244 + 257f20c commit 3ea83bc
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
4 changes: 3 additions & 1 deletion BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ CDDA Game Launcher is developed using Python. In order to run or build the launc

The full list of requirements is available in [requirements.txt](requirements.txt). Most of these requirements are Python packages that can be installed using [pip](https://en.wikipedia.org/wiki/Pip_%28package_manager%29). Unfortunately, some of these requirements need build tools which are not easy to use nor easy to install on Windows. Here are those special requirements:

* lxml
* pylzma
* Microsoft C++ Build Tools
* Windows 10 SDK
* Inno Setup

Compiled binaries for lxml and pylzma can be found on [Christoph Gohlke's Unofficial Windows Binaries](http://www.lfd.uci.edu/~gohlke/pythonlibs/). If you are using Python >= 3.5, scandir should already be included. If you are using Python <= 3.4, you can also find compiled binaries for scandir on that website.

Expand Down
2 changes: 1 addition & 1 deletion cddagl/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.6.0
1.6.1
Binary file modified requirements.txt
Binary file not shown.
11 changes: 7 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ def run_other_command(self, command_name, **kwargs):
def include_requirements(target_path):
# Install packages from requirements.txt file into build dir
requirements_path = Path('requirements.txt')
subprocess.run([
'python', '-m', 'pip', 'install', '--upgrade', "pip"
])
subprocess.run([
'python', '-m', 'pip', 'install', '-r', requirements_path,
'--target', target_path
Expand Down Expand Up @@ -116,8 +119,8 @@ def run(self):
download_path.mkdir(parents=True, exist_ok=True)

# Download Python embeddable package
python_embed_url = 'https://www.python.org/ftp/python/3.9.0/python-3.9.0-embed-amd64.zip'
python_embed_name = 'python-3.9.0-embed-amd64.zip'
python_embed_url = 'https://www.python.org/ftp/python/3.9.7/python-3.9.7-embed-amd64.zip'
python_embed_name = 'python-3.9.7-embed-amd64.zip'

python_embed_archive = download_path.joinpath(python_embed_name)
try:
Expand Down Expand Up @@ -171,7 +174,7 @@ def run(self):

# Let's find and add unrar if available
try:
unrar_path = r'.\external-deps\unrar-command-line-tool\UnRAR.exe'
unrar_path = r'.\third-party\unrar-command-line-tool\UnRAR.exe'
shutil.copy(unrar_path, archive_dir_path)
except CalledProcessError:
log("'unrar.exe' couldn't be found.")
Expand Down Expand Up @@ -310,7 +313,7 @@ class CreateInnoSetupInstaller(ExtendedCommand):
]

def initialize_options(self):
self.compiler = r'.\external-deps\inno-setup\6.2.0\Compil32.exe'
self.compiler = r'.\third-party\inno-setup\6.2.0\Compil32.exe'

def finalize_options(self):
if not pathlib.Path(self.compiler).exists():
Expand Down

0 comments on commit 3ea83bc

Please sign in to comment.