def action(): cset('action', input( '''欢迎使用Drunk Cordova打包工具\n\n请选择您要执行的操作\n 1:创建发行版包 2:创建调试包 0:不创建\n 您要执行的是[1]:''', {1, 2, 0}, 1, '')) # 记录要执行的操作
def frontend(): cset('frontend_action', input('''\n请选择前端项目打包方式\n 1:打包为生产版 2:打包为开发环境版 0:不打包\n 您要打包为[2]:''', {0, 1, 2}, 2)) # 记录是打生产版包还是开发测试版 cset( 'is_export_distribute', 0 if config['frontend_action'] == 2 else input( '是否导出到发行目录(1/0)[1]:', {0, 1}, 1))
def platform(): import platform as pf if 'Windows' in pf.uname(): return cset('platform', 1) # 如果是Windows平台, 则无需选择, 只能打包Android应用 cset('platform', input('''\n请选择应用平台\n 1:安卓 2:苹果 3:全部\n 您要打包[3]:''', {1, 2, 3}, 3)) # 记录要打包的平台