Skip to content

Commit 0f99244

Browse files
committed
fix get file path
1 parent 53598cf commit 0f99244

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

plugins/plugin_package/plugin_package.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
__docformat__ = 'restructuredtext'
1313

1414
import os
15+
import sys
1516
import cocos
1617
import subprocess
1718
from MultiLanguage import MultiLanguage
@@ -37,7 +38,11 @@ def _run_cmd(self, command, cwd=None):
3738
subprocess.call(command, shell=True, cwd=cwd)
3839

3940
def _get_sdkbox_path(self):
40-
path = os.path.dirname(os.path.realpath(__file__))
41+
path = ''
42+
if getattr(sys, 'frozen', None):
43+
path = os.path.realpath(os.path.dirname(sys.executable))
44+
else:
45+
path = os.path.realpath(os.path.dirname(__file__))
4146
return os.path.join(path, 'sdkbox')
4247

4348
def print_help(self):

plugins/plugin_package/sdkbox.pyc

251 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)