Skip to content

Commit a685711

Browse files
author
sreeder
committed
merging with mac
2 parents 8223532 + 1d4b67d commit a685711

File tree

11 files changed

+217
-30
lines changed

11 files changed

+217
-30
lines changed

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,9 @@ setup/Output/setup.exe
6060
.ipynb_checkpoints
6161
*.ipynb
6262

63+
#folders
64+
Temp
65+
*.app
66+
*.spec
67+
68+

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@ Recommended Release:
2424
Running From Source
2525
-------------------
2626

27-
+ [Matplotlib-1.3.1](https://github.com/matplotlib/matplotlib/releases/tag/v1.3.1)
28-
+ [Pandas-0.15.0](https://github.com/pydata/pandas/releases)
27+
+ [Matplotlib-1.4.3](https://github.com/matplotlib/matplotlib/releases/tag/v1.4.3)
28+
+ [Pandas-0.16.0](https://github.com/pydata/pandas/releases)
2929
+ [Pip](http://docs.python-guide.org/en/latest/starting/install/win.html)
3030
+ [PyMySQL] (https://github.com/petehunt/PyMySQL/)
3131
+ [Pyodbc-3.0.7](https://code.google.com/p/pyodbc/downloads/detail?name=pyodbc-3.0.7.win-amd64-py2.7.exe)
32-
+ [Python-2.7.8 x64/x32](http://www.python.org/download/releases/2.7.3/) (Python 3 version isn't available)
32+
+ [Python-2.7.9 x64/x32](http://www.python.org/download/releases/2.7.9/) (Python 3 version isn't available)
3333
+ [Psycopg2-2.4.6](http://initd.org/psycopg/docs/install.html)
34-
+ [Sqlalchemy-0.9.7] (http://pypi.python.org/pypi/SQLAlchemy/0.9.7)
34+
+ [Sqlalchemy-1.0.0] (http://pypi.python.org/pypi/SQLAlchemy/1.0.0)
3535
+ [wxpython-3.0.0](http://www.wxpython.org/download.php)
3636

3737
Install the following software/libraries.
@@ -49,7 +49,7 @@ if psycopg2 isn't found, download it manually and follow these [directions](http
4949

5050
Once you have downloaded the source code and all the dependencies installed, run the main application:
5151

52-
python odmtools/ODMToolsPython.py
52+
python ODMTools.py
5353

5454
Sponsors
5555
---------

make.py

Lines changed: 33 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
# Location of Windows files
2525
APP_FILE = os.path.join(BASE_DIR, "ODMTools.py")
2626
MAKE_FILE = os.path.realpath(__file__)
27-
VERSION_FILE = os.path.join(BASE_DIR, "version.txt")
27+
VERSION_FILE = os.path.join(SETUP_DIR, "version.txt")
2828

2929
# Location of Innosetup Installer
3030
INNO_SCRIPT = os.path.join(WIN_DIR, "odmtools_setup.iss")
@@ -111,6 +111,14 @@ def printInfo():
111111

112112
check_if_dirs_exist()
113113

114+
def obtain_exe_filename(console=False):
115+
if console:
116+
return "{app}_{version}_{os}_{arch}_{type}".format(app=data.app_name,
117+
version=data.version, os=sys.platform, arch='x86_64', type= "console")
118+
else:
119+
return "{app}_{version}_{os}_{arch}".format(app=data.app_name,
120+
version=data.version, os=sys.platform, arch='x86_64')
121+
114122
def delete_old_out_dir():
115123
loc_exists = os.path.exists(DIST_DIR)
116124
isFile = os.path.isfile(DIST_DIR)
@@ -125,16 +133,34 @@ def delete_old_out_dir():
125133
print "Nothing to remove"
126134

127135
def run_pyinstaller():
136+
"""
137+
Create a non-console version and a console version
138+
"""
139+
128140
try:
141+
## No console
142+
os.system('pyinstaller '
143+
'--clean '
144+
'-n %s ' % obtain_exe_filename() +
145+
'--distpath=%s ' % DIST_DIR +
146+
'--workpath=%s ' % WORK_DIR +
147+
'--specpath=%s ' % WIN_DIR +
148+
'--upx-dir=%s ' % BASE_DIR +
149+
'--icon=%s ' % WIN_ICON_FILE +
150+
'--version-file=%s ' % VERSION_FILE +
151+
'--windowed '
152+
'--noconfirm ' + APP_FILE)
153+
154+
## Console
129155
os.system('pyinstaller '
130156
'--clean '
131-
'--distpath=%s ' % WIN_DIR +
157+
'-n %s ' % obtain_exe_filename(console=True) +
158+
'--distpath=%s ' % DIST_DIR +
132159
'--workpath=%s ' % WORK_DIR +
133160
'--specpath=%s ' % WIN_DIR +
134161
'--upx-dir=%s ' % BASE_DIR +
135162
'--icon=%s ' % WIN_ICON_FILE +
136163
'--version-file=%s ' % VERSION_FILE +
137-
# '--windowed '
138164
'--noconfirm ' + APP_FILE)
139165

140166
return True
@@ -146,7 +172,7 @@ def mac_pyinstaller():
146172
try:
147173
os.system('pyinstaller '
148174
'--clean '
149-
'--distpath=%s ' % MAC_DIR +
175+
'--distpath=%s ' % DIST_DIR +
150176
'--workpath=%s ' % MAC_WORK_DIR +
151177
'--specpath=%s ' % MAC_DIR +
152178
'--upx-dir=%s ' % BASE_DIR +
@@ -183,9 +209,9 @@ def run_inno():
183209
os.system(INNO_EXECUTABLE + " " + INNO_SCRIPT)
184210

185211
def run_no_installer():
186-
# pass
187-
filename = "{app}_{version}_{os}_{arch}_{type}.zip".format(app=data.app_name,
188-
version=data.version, os=sys.platform, arch='x86_64', type="No_Install")
212+
# Need to finish, Not functional
213+
raise ("Not functional yet")
214+
filename = obtain_exe_filename()
189215

190216
zipdir(os.path.join('odmtools'), filename)
191217
move_to_dist(filename)

odmtools/controller/frmAbout.py

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,7 @@ def __init__(self, parent):
1414
info.Description = wordwrap(data.description, 350, ClientDC(parent))
1515
info.WebSite = data.website
1616
info.Developers = data.developers
17-
1817
info.License = wordwrap(data.license, 500, ClientDC(parent))
19-
2018
# Then we call wx.AboutBox giving it that info object
2119
AboutBox(info)
22-
23-
24-
#self.ShowModal()
25-
26-
27-
28-
licenseText = "This material is copyright (c) 2013 - 2015 Utah State University." \
29-
"\nIt is open and licensed under the New Berkeley Software Distribution (BSD) License. Full text of the license follows." \
30-
"\nCopyright (c) 2013, Utah State University. All rights reserved." \
31-
"\nRedistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:" \
32-
"\n Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer." \
33-
"\n Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution." \
34-
"\n Neither the name of Utah State University nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission." \
35-
"\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. "
36-
20+
#self.ShowModal()

odmtools/meta/__init__.py

Whitespace-only changes.

odmtools/meta/data.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
app_name = "ODMTools"
2+
version = "1.2.0_Beta"
3+
copyright = "Copyright (c) 2013 - 2015, Utah State University. All rights reserved."
4+
description = "ODMTools is a python application for managing observational data using the Observations Data Model. " \
5+
"ODMTools allows you to query, visualize, and edit data stored in an Observations Data Model (ODM) database." \
6+
" ODMTools was originally developed as part of the CUAHSI Hydrologic Information System."
7+
8+
developers = ["Jeffery S. Horsburgh", "Amber Spackman Jones",
9+
"Stephanie L. Reeder", "Jacob Meline", "James Patton"]
10+
11+
license = "This material is copyright (c) 2013 - 2015 Utah State University." \
12+
"\nIt is open and licensed under the New Berkeley Software Distribution (BSD) License. Full text of the license follows." \
13+
"\nCopyright (c) 2013, Utah State University. All rights reserved." \
14+
"\nRedistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:" \
15+
"\n Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer." \
16+
"\n Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution." \
17+
"\n Neither the name of Utah State University nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission." \
18+
"\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. "
19+
20+
21+
website = ("http://uchic.github.io/ODMToolsPython/", "ODMTools home page")
22+
39.2 MB
Binary file not shown.

setup/Windows/odmtools_console.iss

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
; Script generated by the Inno Setup Script Wizard.
2+
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
3+
4+
#define MyAppName "ODMTools"
5+
#define MyAppVersion "1.2.0_Beta"
6+
#define MyAppPublisher "ODM2"
7+
#define MyAppURL "https://github.com/ODM2/ODMToolsPython"
8+
#define MyAppExeName "ODMTools_1.2.0_Beta_win32_x86_64_console.exe"
9+
#define MyAppDir "C:\Users\jmeline_\Documents\GitHub\ODMToolsPython"
10+
11+
[Setup]
12+
; NOTE: The value of AppId uniquely identifies this application.
13+
; Do not use the same AppId value in installers for other applications.
14+
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
15+
AppId={{4E5EC22A-DDE2-40A1-BCF5-5595BE768847}
16+
AppName={#MyAppName}
17+
AppVersion={#MyAppVersion}
18+
;AppVerName={#MyAppName} {#MyAppVersion}
19+
AppPublisher={#MyAppPublisher}
20+
AppPublisherURL={#MyAppURL}
21+
AppSupportURL={#MyAppURL}
22+
AppUpdatesURL={#MyAppURL}
23+
DefaultDirName={pf}\{#MyAppName}
24+
DefaultGroupName={#MyAppName}
25+
LicenseFile={#MyAppDir}\LICENSE.txt
26+
OutputBaseFilename={#MyAppName}_{#MyAppVersion}_Console_Installer
27+
SetupIconFile={#MyAppDir}\odmtools\common\icons\ODMTools.ico
28+
Compression=lzma
29+
SolidCompression=yes
30+
OutputDir={#MyAppDir}\setup\Dist
31+
UsePreviousAppDir=no
32+
33+
[Languages]
34+
Name: "english"; MessagesFile: "compiler:Default.isl"
35+
36+
[Tasks]
37+
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
38+
39+
[Files]
40+
Source: "{#MyAppDir}\setup\Dist\ODMTools_1.2.0_Beta_win32_x86_64_console\ODMTools_1.2.0_Beta_win32_x86_64_console.exe"; DestDir: "{app}"; Flags: ignoreversion
41+
Source: "{#MyAppDir}\setup\Dist\ODMTools_1.2.0_Beta_win32_x86_64_console\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
42+
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
43+
44+
[Icons]
45+
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
46+
Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"
47+
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
48+
49+
[Run]
50+
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
51+

setup/Windows/odmtools_no_console.iss

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
; Script generated by the Inno Setup Script Wizard.
2+
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
3+
4+
#define MyAppName "ODMTools"
5+
#define MyAppVersion "1.2.0_Beta"
6+
#define MyAppPublisher "ODM2"
7+
#define MyAppURL "https://github.com/ODM2/ODMToolsPython"
8+
#define MyAppExeName "ODMTools_1.2.0_Beta_win32_x86_64.exe"
9+
#define MyAppDir "C:\Users\jmeline_\Documents\GitHub\ODMToolsPython"
10+
11+
[Setup]
12+
; NOTE: The value of AppId uniquely identifies this application.
13+
; Do not use the same AppId value in installers for other applications.
14+
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
15+
AppId={{2ABE254B-39DB-4EE2-AD7D-6BFBC7AA9182}
16+
AppName={#MyAppName}
17+
AppVersion={#MyAppVersion}
18+
;AppVerName={#MyAppName} {#MyAppVersion}
19+
AppPublisher={#MyAppPublisher}
20+
AppPublisherURL={#MyAppURL}
21+
AppSupportURL={#MyAppURL}
22+
AppUpdatesURL={#MyAppURL}
23+
DefaultDirName={pf}\{#MyAppName}
24+
DefaultGroupName={#MyAppName}
25+
LicenseFile={#MyAppDir}\LICENSE.txt
26+
OutputBaseFilename={#MyAppName}_{#MyAppVersion}_Installer
27+
SetupIconFile={#MyAppDir}\odmtools\common\icons\ODMTools.ico
28+
Compression=lzma
29+
SolidCompression=yes
30+
OutputDir={#MyAppDir}\setup\Dist
31+
UsePreviousAppDir=no
32+
33+
[Languages]
34+
Name: "english"; MessagesFile: "compiler:Default.isl"
35+
36+
[Tasks]
37+
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
38+
39+
[Files]
40+
Source: "{#MyAppDir}\setup\Dist\ODMTools_1.2.0_Beta_win32_x86_64\ODMTools_1.2.0_Beta_win32_x86_64.exe"; DestDir: "{app}"; Flags: ignoreversion
41+
Source: "{#MyAppDir}\setup\Dist\ODMTools_1.2.0_Beta_win32_x86_64\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
42+
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
43+
44+
[Icons]
45+
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
46+
Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"
47+
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
48+
49+
[Run]
50+
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
51+

setup/Windows/odmtools_setup.iss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ OutputBaseFilename={#MyAppName}_{#MyAppVersion}_Installer
2727
SetupIconFile={#MyAppDir}\odmtools\common\icons\ODMTools.ico
2828
Compression=lzma
2929
SolidCompression=yes
30-
OutputDir={#MyAppDir}\setup\Windows
30+
OutputDir={#MyAppDir}\setup\Dist
3131
UsePreviousAppDir=no
3232

3333
[Languages]

0 commit comments

Comments
 (0)