Skip to content

Commit

Permalink
hardcode temp dir to source folder (mandatory for webide editing) #68
Browse files Browse the repository at this point in the history
  • Loading branch information
pmp-p committed Aug 26, 2023
1 parent f316cdf commit e7899cf
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions pygbag/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,11 +188,12 @@ async def main_run(app_folder, mainscript, cdn=DEFAULT_CDN):
metavar="ADDRESS",
help="Specify alternate bind address [default: localhost]",
)
parser.add_argument(
"--directory",
default=build_dir.as_posix(),
help="Specify alternative directory [default:%s]" % build_dir,
)

# parser.add_argument(
# "--directory",
# default=build_dir.as_posix(),
# help="Specify alternative directory [default:%s]" % build_dir,
# )

parser.add_argument(
"--PYBUILD",
Expand Down Expand Up @@ -283,6 +284,15 @@ async def main_run(app_folder, mainscript, cdn=DEFAULT_CDN):

args = parser.parse_args()

# when in browser IDE everything should be done in allowed folder

# force build directory in sourcefolder
args.directory = build_dir.as_posix()

# force cache directory to be inside build folder
args.cache = cache_dir.as_posix()


app_name = app_folder.name.lower().replace(" ", ".")

archfile = build_dir.joinpath(f"{app_name}.apk")
Expand All @@ -302,6 +312,9 @@ async def main_run(app_folder, mainscript, cdn=DEFAULT_CDN):
# artefacts directory
build_dir={build_dir}
# cache directory
cache={cache_dir}
# the window title and icon name
app_name={app_name}
Expand Down

0 comments on commit e7899cf

Please sign in to comment.