Browse Source

Add package.py

with other minor fixes
master
Virgil Dupras 4 years ago
parent
commit
cdb14d7e5f
6 changed files with 32 additions and 8 deletions
  1. +0
    -1
      .gitignore
  2. +4
    -1
      Makefile
  3. +0
    -4
      build.py
  4. +1
    -1
      dupeguru
  5. +26
    -0
      package.py
  6. +1
    -1
      run.py

+ 0
- 1
.gitignore View File

@@ -10,6 +10,5 @@ __pycache__
/cocoa/autogen
/locale

/run.py
/cocoa/*/Info.plist
/cocoa/*/build

+ 4
- 1
Makefile View File

@@ -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

+ 0
- 4
build.py View File

@@ -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")


+ 1
- 1
dupeguru

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

+ 26
- 0
package.py View File

@@ -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()

cocoa/run_template.py → run.py View File

@@ -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())

Loading…
Cancel
Save