浏览代码

Add package.py

with other minor fixes
master
Virgil Dupras 4 年前
父节点
当前提交
cdb14d7e5f
  1. 1
      .gitignore
  2. 5
      Makefile
  3. 4
      build.py
  4. 2
      dupeguru
  5. 26
      package.py
  6. 2
      run.py

1
.gitignore

@ -10,6 +10,5 @@ __pycache__
/cocoa/autogen
/locale
/run.py
/cocoa/*/Info.plist
/cocoa/*/build

5
Makefile

@ -34,4 +34,7 @@ env : | $(submodules_target) reqs
build:
./env/bin/python build.py
.PHONY : reqs build all
run:
./env/bin/python run.py
.PHONY : reqs build run all

4
build.py

@ -152,10 +152,6 @@ def build_cocoa(dev):
resources = [image_path, 'cocoa/dsa_pub.pem', 'build/dg_cocoa.py', 'build/help']
app.copy_resources(*resources, use_symlinks=dev)
app.copy_frameworks('build/Python')
print("Creating the run.py file")
tmpl = open('cocoa/run_template.py', 'rt').read()
run_contents = tmpl.replace('{{app_path}}', app.dest)
open('run.py', 'wt').write(run_contents)
def build_help():
print("Generating Help")

2
dupeguru

@ -1 +1 @@
Subproject commit f51f94e03db3c36468bc40200679f098a0346a62
Subproject commit 245ed0ddecd0fad4a8e8dab3be07d319c14b1514

26
package.py

@ -0,0 +1,26 @@
# Copyright 2017 Virgil Dupras
#
# This software is licensed under the "GPLv3" License as described in the "LICENSE" file,
# which should be included with this package. The terms are also available at
# http://www.gnu.org/licenses/gpl-3.0.html
from argparse import ArgumentParser
from hscommon.build import setup_package_argparser, package_cocoa_app_in_dmg
def parse_args():
parser = ArgumentParser()
setup_package_argparser(parser)
return parser.parse_args()
def package_cocoa(args):
app_path = 'build/dupeGuru.app'
package_cocoa_app_in_dmg(app_path, '.', args)
def main():
args = parse_args()
print("Packaging dupeGuru with UI cocoa")
package_cocoa(args)
if __name__ == '__main__':
main()

2
cocoa/run_template.py → run.py

@ -4,7 +4,7 @@ import sys
import os
def main():
return os.system('open "{{app_path}}"')
return os.system('open "build/dupeGuru.app"')
if __name__ == '__main__':
sys.exit(main())
正在加载...
取消
保存