Skip to content

Commit

Permalink
Default to local server
Browse files Browse the repository at this point in the history
  • Loading branch information
ma1co committed Jun 8, 2017
1 parent f0ceb82 commit a4ed3bb
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 15 deletions.
6 changes: 1 addition & 5 deletions README.md
Expand Up @@ -24,14 +24,10 @@ Run `pmca-console` in the command line for more options. Usage:

pmca-console install -i

* Install an app on your camera (the app is uploaded and served from Google appengine):
* Install an app on your camera (the app is served from a local web server):

pmca-console install -f app.apk

* Install an app using a local web server:

pmca-console install -s "" -f app.apk

* Download apps from the official Sony app store (interactive):

pmca-console market
Expand Down
1 change: 0 additions & 1 deletion config.py
Expand Up @@ -4,5 +4,4 @@
githubAppListUser = 'ma1co'
githubAppListRepo = 'OpenMemories-AppList'

appengineServer = 'sony-pmca.appspot.com'
officialServer = 'www.playmemoriescameraapps.com'
5 changes: 2 additions & 3 deletions pmca-console.py
Expand Up @@ -2,7 +2,6 @@
"""A command line application to install apps on Android-enabled Sony cameras"""
import argparse

import config
from pmca.commands.market import *
from pmca.commands.usb import *
from pmca import spk
Expand All @@ -21,7 +20,7 @@ def main():
info = subparsers.add_parser('info', description='Display information about the camera connected via USB')
info.add_argument('-d', dest='driver', choices=['libusb', 'native'], help='specify the driver')
install = subparsers.add_parser('install', description='Installs an apk file on the camera connected via USB. The connection can be tested without specifying a file.')
install.add_argument('-s', dest='server', help='hostname for the remote server (set to empty to start a local server)', default=config.appengineServer)
install.add_argument('-s', dest='server', help='hostname for the remote server')
install.add_argument('-d', dest='driver', choices=['libusb', 'native'], help='specify the driver')
install.add_argument('-o', dest='outFile', type=argparse.FileType('w'), help='write the output to this file')
installMode = install.add_mutually_exclusive_group()
Expand All @@ -42,7 +41,7 @@ def main():

args = parser.parse_args()
if args.command == 'info':
infoCommand(config.appengineServer, args.driver)
infoCommand(None, args.driver)
elif args.command == 'install':
if args.appInteractive:
pkg = appSelectionCommand(args.server)
Expand Down
11 changes: 5 additions & 6 deletions pmca-gui.py
Expand Up @@ -4,7 +4,6 @@
import sys
import traceback

import config
from pmca.commands.usb import *
from pmca.ui import *

Expand Down Expand Up @@ -34,7 +33,7 @@ def doBefore(self):
def do(self, arg):
try:
print('')
return listApps(config.appengineServer)
return listApps()
except Exception:
traceback.print_exc()

Expand All @@ -52,7 +51,7 @@ def doBefore(self):
def do(self, arg):
try:
print('')
infoCommand(config.appengineServer)
infoCommand()
except Exception:
traceback.print_exc()

Expand All @@ -71,12 +70,12 @@ def do(self, args):
try:
print('')
if mode == self.ui.MODE_APP and app:
installCommand(config.appengineServer, None, None, app.package)
installCommand(None, None, None, app.package)
elif mode == self.ui.MODE_APK and apkFilename:
with open(apkFilename, 'rb') as f:
installCommand(config.appengineServer, None, f)
installCommand(None, None, f)
else:
installCommand(config.appengineServer)
installCommand()
except Exception:
traceback.print_exc()

Expand Down

0 comments on commit a4ed3bb

Please sign in to comment.