Skip to content

Commit 868c3e6

Browse files
author
Stephanie Reeder
committed
update make file to work with mac
1 parent 05227a4 commit 868c3e6

File tree

5 files changed

+47
-51
lines changed

5 files changed

+47
-51
lines changed

ODMTools.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,16 @@
1717
from odmtools.common.logger import LoggerTool
1818
from multiprocessing import cpu_count, freeze_support
1919
from odmtools.odmdata import MemoryDatabase
20+
21+
import pyodbc
22+
import pymysql
23+
import psycopg2
24+
2025
tool = LoggerTool()
2126
logger = tool.setupLogger(__name__, __name__ + '.log', 'w', logging.DEBUG)
2227
wx.Log.SetLogLevel(0)
2328

29+
2430
class MyApp(wx.App):
2531
"""
2632
A Simple App class, modified to hold the processes and task queues

doc/developer_docs/source/build/executable.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ Installing using pyinstaller
3939
git clone https://github.com/pyinstaller/pyinstaller.git
4040

4141

42+
4243
Install pywin32 if you are using Python 2.6+
4344

4445
Install pywin32 from `here <http://sourceforge.net/projects/pywin32/>`_

setup.py

Lines changed: 0 additions & 36 deletions
This file was deleted.

setup/Mac/ODMTools.packproj

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
<key>Mode</key>
2929
<integer>1</integer>
3030
<key>Path</key>
31-
<string>/Volumes/stephanie/Releases/License.txt</string>
31+
<string>/Users/stephanie/DEV/ODMToolsPython/LICENSE.txt</string>
3232
<key>Path Type</key>
3333
<integer>1</integer>
3434
</dict>
@@ -52,7 +52,7 @@
5252
<key>Mode</key>
5353
<integer>1</integer>
5454
<key>Path</key>
55-
<string>/Volumes/stephanie/Releases/Welcome.rtf</string>
55+
<string>/Users/stephanie/DEV/ODMToolsPython/LICENSE.txt</string>
5656
<key>Path Type</key>
5757
<integer>1</integer>
5858
</dict>
@@ -61,14 +61,30 @@
6161
<key>Files</key>
6262
<dict>
6363
<key>Compress</key>
64-
<false/>
64+
<true/>
6565
<key>Hierarchy</key>
6666
<dict>
6767
<key>Children</key>
6868
<array>
6969
<dict>
7070
<key>Children</key>
7171
<array>
72+
<dict>
73+
<key>Children</key>
74+
<array/>
75+
<key>GID</key>
76+
<integer>80</integer>
77+
<key>Path</key>
78+
<string>/Users/stephanie/DEV/ODMToolsPython/setup/Mac/ODMTools.app</string>
79+
<key>Path Type</key>
80+
<integer>1</integer>
81+
<key>Privileges</key>
82+
<integer>493</integer>
83+
<key>Type</key>
84+
<integer>3</integer>
85+
<key>UID</key>
86+
<integer>0</integer>
87+
</dict>
7288
<dict>
7389
<key>Children</key>
7490
<array/>
@@ -550,9 +566,9 @@
550566
<key>IFPkgDescriptionDescription</key>
551567
<string></string>
552568
<key>IFPkgDescriptionTitle</key>
553-
<string>ODMTools_v1.3.0-beta_setup</string>
569+
<string>ODMTools_v1.2.0-beta_setup</string>
554570
<key>IFPkgDescriptionVersion</key>
555-
<string>1.3.0 Beta</string>
571+
<string>1.2.0 Beta</string>
556572
</dict>
557573
</dict>
558574
<key>Display Information</key>
@@ -568,14 +584,14 @@
568584
<key>CFBundleName</key>
569585
<string>ODMTools</string>
570586
<key>CFBundleShortVersionString</key>
571-
<string>1.3.0</string>
587+
<string>1.4.0</string>
572588
</dict>
573589
<key>Options</key>
574590
<dict>
575591
<key>IFPkgFlagAllowBackRev</key>
576592
<false/>
577593
<key>IFPkgFlagAuthorizationAction</key>
578-
<integer>1</integer>
594+
<integer>0</integer>
579595
<key>IFPkgFlagFollowLinks</key>
580596
<false/>
581597
<key>IFPkgFlagIsRequired</key>
@@ -596,7 +612,7 @@
596612
<key>IFMajorVersion</key>
597613
<integer>1</integer>
598614
<key>IFMinorVersion</key>
599-
<integer>3</integer>
615+
<integer>4</integer>
600616
</dict>
601617
</dict>
602618
</dict>

setup/make.py

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,16 @@
33

44
WIN_DIR = os.path.join(BASE_DIR, "Windows")
55
MAC_DIR = os.path.join(BASE_DIR, "Mac")
6+
7+
MAC_WORK_DIR = os.path.join(MAC_DIR, "Temp")
68
WORK_DIR = os.path.join(WIN_DIR, "Temp")
79

810
ICON_DIR = os.path.join("..", 'odmtools', 'common', "icons")
911
WIN_ICON_FILE = os.path.join(ICON_DIR, "ODMTools.ico")
1012
MAC_ICON_FILE = os.path.join(ICON_DIR, "ODMTools.icns")
11-
EXE_DIR = os.path.join(WIN_DIR, "ODMTools")
1213

14+
EXE_DIR = os.path.join(WIN_DIR, "ODMTools")
15+
APP_DIR = os.path.join(MAC_DIR, "ODMTools.app")
1316
# Location of Windows files
1417
APP_FILE = os.path.join("..", "ODMTools.py")
1518
VERSION_FILE = os.path.join(BASE_DIR, "version.txt")
@@ -18,7 +21,7 @@
1821
INNO_SCRIPT = os.path.join(WIN_DIR, "odmtools_setup.iss")
1922
INNO_EXECUTABLE = '"C:\\Program Files (x86)\\Inno Setup 5\\ISCC.exe"'
2023
ICE_SCRIPT = os.path.join(MAC_DIR, "ODMTools.packproj")
21-
ICE_EXECUTABLE =''
24+
ICE_EXECUTABLE ='freeze'
2225

2326
print (BASE_DIR)
2427

@@ -79,14 +82,19 @@ def mac_pyinstaller():
7982
os.system('pyinstaller '
8083
'--clean '
8184
'--distpath=%s ' % MAC_DIR +
82-
'--workpath=%s ' % WORK_DIR +
83-
'--specpath=%s ' % WIN_DIR +
85+
'--workpath=%s ' % MAC_WORK_DIR +
86+
'--specpath=%s ' % MAC_DIR +
8487
'--upx-dir=%s ' % BASE_DIR +
85-
'--icon_file=%s ' % MAC_ICON_FILE +
88+
'--icon=%s ' % MAC_ICON_FILE +
8689
'--version-file=%s ' % VERSION_FILE +
87-
# '--windowed '
90+
'--windowed '
91+
#'--onefile '
92+
#'--hidden-import="libwx_osx_cocoau-3.0.0.0.0.dylib" '
8893
'--noconfirm ' + APP_FILE)
8994

95+
96+
os.system("cp /anaconda/envs/odmtools/lib/libwx_osx_cocoau-3.0.0.0.0.dylib %s" % os.path.join(APP_DIR, "Contents/MacOS/"))
97+
#copy "libwx_osx_cocoau-3.0.0.0.0.dylib"
9098
return True
9199
except Exception as e:
92100
print (e)
@@ -97,7 +105,8 @@ def run_inno():
97105
os.system(INNO_EXECUTABLE + " " + INNO_SCRIPT)
98106

99107
def run_iceberg():
100-
pass
108+
os.system(ICE_EXECUTABLE + " "+ ICE_SCRIPT)
109+
101110

102111
def main():
103112
delete_old_out_dir()

0 commit comments

Comments
 (0)