-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
112a0eb
commit 128e258
Showing
3 changed files
with
72 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
#!/usr/bin/env python | ||
|
||
# GTX Extractor | ||
# Version v2.2.1 | ||
# Copyright © 2014 Treeki, 2015-2016 AboodXD | ||
|
||
# This file is part of GTX Extractor. | ||
|
||
# GTX Extractor is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation, either version 3 of the License, or | ||
# (at your option) any later version. | ||
|
||
# GTX Extractor is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
|
||
# You should have received a copy of the GNU General Public License | ||
# along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
"""build.py: Build an executable for GTX Extractor.""" | ||
|
||
import os, shutil, sys | ||
from cx_Freeze import setup, Executable | ||
|
||
version = 'v2.2.1' | ||
|
||
# Pick a build directory | ||
dir_ = 'gtx_extract_nomipmap ' + version | ||
|
||
# Add the "build" parameter to the system argument list | ||
if 'build' not in sys.argv: | ||
sys.argv.append('build') | ||
|
||
# Clear the directory | ||
print('>> Clearing/creating directory...') | ||
if os.path.isdir(dir_): shutil.rmtree(dir_) | ||
os.makedirs(dir_) | ||
print('>> Directory ready!') | ||
|
||
# exclude QtWebKit to save space, plus Python stuff we don't use | ||
excludes = ['doctest', 'pdb', 'unittest', 'difflib', 'inspect', | ||
'os2emxpath', 'posixpath', 'optpath', 'locale', 'calendar', | ||
'select', 'multiprocessing', 'ssl', | ||
'PyQt5.QtWebKit', 'PyQt5.QtNetwork'] | ||
|
||
setup( | ||
name = 'gtx_extract_nomipmap', | ||
version = version, | ||
description = 'Wii U GFD (GTX) extractor', | ||
options={ | ||
'build_exe': { | ||
'excludes': excludes, | ||
'build_exe': dir_, | ||
}, | ||
}, | ||
executables = [ | ||
Executable( | ||
'gtx_extract_nomipmap.py', | ||
), | ||
], | ||
) | ||
|
||
print('>> Attempting to copy required files...') | ||
shutil.copy('COPYING', dir_) | ||
shutil.copy('README.md', dir_) | ||
print('>> Files copied!') | ||
|
||
print('>> GTX Extractor has been frozen to %s !' % dir_) |