mirror of
https://github.com/arsenetar/dupeguru-cocoa.git
synced 2024-12-21 10:59:03 +00:00
Add package.py
with other minor fixes
This commit is contained in:
parent
08eac3844e
commit
cdb14d7e5f
1
.gitignore
vendored
1
.gitignore
vendored
@ -10,6 +10,5 @@ __pycache__
|
||||
/cocoa/autogen
|
||||
/locale
|
||||
|
||||
/run.py
|
||||
/cocoa/*/Info.plist
|
||||
/cocoa/*/build
|
||||
|
5
Makefile
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
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
2
dupeguru
@ -1 +1 @@
|
||||
Subproject commit f51f94e03db3c36468bc40200679f098a0346a62
|
||||
Subproject commit 245ed0ddecd0fad4a8e8dab3be07d319c14b1514
|
26
package.py
Normal file
26
package.py
Normal 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()
|
@ -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…
Reference in New Issue
Block a user