Skip to content

Commit

Permalink
Automate more of the build process
Browse files Browse the repository at this point in the history
  • Loading branch information
Berserker66 committed Sep 21, 2016
1 parent b6e5a20 commit 8558b88
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -235,3 +235,4 @@ desktop.ini
swap/
tImages.zip
upx.exe
*.back
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Current version : 18.4.0, for Terraria 1.3.3.1 on Windows and Linux.
Current version : 18.5.0, for Terraria 1.3.3.1 on Windows and Linux.

On the Terraria Forums:
[Link](http://forums.terraria.org/index.php?threads/omnitool-world-creation-mapping-backups-and-more.14664/)
Expand Down
2 changes: 1 addition & 1 deletion omnitool/shared.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

__all__ = ("__version__", "appdata", "cachepath", "cache", "lang", "theme")

__version__ = Version(180400)
__version__ = Version(180500)
appdata = user_config_dir('omnitool', "", roaming=True)
cachepath = os.path.join(appdata, "cache.dill")
##filled in by omnitool\__init__.py:
Expand Down
20 changes: 20 additions & 0 deletions release_prep.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
from omnitool.shared import __version__
import shutil

version = __version__.get_name()
print(version)
shutil.copy("README.md", "README.back")
with open("README.back") as inp:
lines = inp.readlines()
lines[0] = "Current version : {}, for Terraria 1.3.3.1 on Windows and Linux.\n".format(version)
with open("README.md", "w") as out:
out.writelines(lines)

innos = {"setup.iss", "setup64.iss"}
for setup in innos:
shutil.copy(setup, setup + ".back")
with open(setup) as inp:
lines = inp.readlines()
lines[4] = '#define MyAppVersion "{}"\n'.format(version)
with open(setup, "w") as out:
out.writelines(lines)
2 changes: 1 addition & 1 deletion setup.iss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

#define MyAppName "Omnitool"
#define MyAppVersion "18.4.0"
#define MyAppVersion "18.5.0"
#define MyAppPublisher "Fabian Dill"
#define MyAppURL "http://forums.terraria.org/index.php?threads/omnitool-world-creation-mapping-backups-and-more.14664/"
#define MyAppExeName "omnitool.exe"
Expand Down
2 changes: 1 addition & 1 deletion setup64.iss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

#define MyAppName "Omnitool"
#define MyAppVersion "18.4.0"
#define MyAppVersion "18.5.0"
#define MyAppPublisher "Fabian Dill"
#define MyAppURL "http://forums.terraria.org/index.php?threads/omnitool-world-creation-mapping-backups-and-more.14664/"
#define MyAppExeName "omnitool.exe"
Expand Down
3 changes: 3 additions & 0 deletions winbuild32+64-deploy.bat
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
py -3.4 release_prep.py
py -3.4 omnitool/database.py > omnitool/database.txt
py -3.4 omnitool/Resources/resourcepack.py
py -3.4-32 omnisetup.py build
py -3.4 omnisetup.py build
iscc setup.iss
iscc setup64.iss
@pause

0 comments on commit 8558b88

Please sign in to comment.