mirror of
https://github.com/arsenetar/dupeguru.git
synced 2026-01-23 15:11:39 +00:00
pe cocoa: adapted to the latest structural updates.
--HG-- extra : convert_revision : svn%3Ac306627e-7827-47d3-bdf0-9a457c9553a1/trunk%404
This commit is contained in:
@@ -1,2 +0,0 @@
|
||||
#!/bin/bash
|
||||
python setup.py py2app
|
||||
@@ -1,13 +1,15 @@
|
||||
#!/usr/bin/env python
|
||||
import objc
|
||||
from AppKit import *
|
||||
from PyObjCTools import NibClassBuilder
|
||||
|
||||
NibClassBuilder.extractClasses("MainMenu", bundle=NSBundle.mainBundle())
|
||||
|
||||
from dupeguru import app_pe_cocoa, scanner
|
||||
|
||||
class PyApp(NibClassBuilder.AutoBaseClass):
|
||||
# Fix py2app imports which chokes on relative imports
|
||||
from dupeguru import app, app_cocoa, data, directories, engine, export, ignore, results, scanner
|
||||
from dupeguru.picture import block, cache, matchbase
|
||||
from hsfs import auto, manual, stats, tree, utils
|
||||
|
||||
class PyApp(NSObject):
|
||||
pass #fake class
|
||||
|
||||
class PyDupeGuru(PyApp):
|
||||
|
||||
18
pe/cocoa/py/gen.py
Normal file
18
pe/cocoa/py/gen.py
Normal file
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import os
|
||||
import os.path as op
|
||||
import shutil
|
||||
|
||||
from hsutil.build import print_and_do
|
||||
|
||||
os.chdir('dupeguru')
|
||||
print_and_do('python gen.py')
|
||||
os.chdir('..')
|
||||
|
||||
if op.exists('build'):
|
||||
shutil.rmtree('build')
|
||||
if op.exists('dist'):
|
||||
shutil.rmtree('dist')
|
||||
|
||||
print_and_do('python -u setup.py py2app')
|
||||
@@ -1,11 +1,14 @@
|
||||
#!/usr/bin/env python
|
||||
from setuptools import setup
|
||||
|
||||
from hs.build import set_buildenv
|
||||
from distutils.core import setup
|
||||
import py2app
|
||||
|
||||
set_buildenv()
|
||||
from hsutil.build import move_testdata_out, put_testdata_back
|
||||
|
||||
setup(
|
||||
plugin=['dg_cocoa.py'],
|
||||
setup_requires=['py2app'],
|
||||
)
|
||||
move_log = move_testdata_out()
|
||||
try:
|
||||
setup(
|
||||
plugin = ['dg_cocoa.py'],
|
||||
)
|
||||
finally:
|
||||
put_testdata_back(move_log)
|
||||
|
||||
Reference in New Issue
Block a user