Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dbg #91

Merged
merged 1 commit into from
Oct 12, 2018
Merged

dbg #91

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion config/default.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name: Scratch2Catrobat Converter
short_name: S2CC
version: 0.9.1
build_name: Aegean cat
build_number: 937
build_number: 939


;-------------------------------------------------------------------------------
Expand Down
48 changes: 48 additions & 0 deletions run_dbg
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# ScratchToCatrobat: A tool for converting Scratch projects into Catrobat programs.
# Copyright (C) 2013-2017 The Catrobat Team
# (<http://developer.catrobat.org/credits>)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# An additional term exception under section 7 of the GNU Affero
# General Public License, version 3, is available at
# http://developer.catrobat.org/license_additional_term
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

from __future__ import print_function
import os
import platform
import subprocess
import sys
sys.path.append(os.path.join(os.path.realpath(os.path.dirname(__file__)), "src"))
from scratchtocatrobat.tools import helpers
from scratchtocatrobat.main import main

helpers.make_dir_if_not_exists(helpers.config.get("PATHS", ["data", "logging", "output", "web_output", "tmp"]))
[jython_home_dir, jython_exec_path, jython_path] = helpers.config.get("PATHS", ["jython_home", "jython_exec", "jython"])

if not os.path.isdir(jython_home_dir):
helpers.error("Invalid jython home path given. No valid directory. Please update 'jython_home' in the config file.")
if not os.path.isfile(jython_exec_path):
helpers.error("Jython script path '%s' must exist." % jython_exec_path.replace(".bat", "[.bat]"))

helpers.inject_git_commmit_hook()

env = os.environ
env['JYTHONPATH'] = jython_path if sys.platform != 'win32' else jython_path.replace(":", ";")

exec_args = [jython_exec_path, "-m", "scratchtocatrobat.main"] + sys.argv[1:]
sys.exit(main())