Skip to content

Commit 346f2b2

Browse files
author
yiguo
committed
change desktop bin output path
1 parent 7592ecb commit 346f2b2

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,4 @@ sub/
2929
test/
3030
config/
3131
.DS_Store
32-
route
33-
tun
32+
bin/

build/app/build.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@
33
import shutil
44
import subprocess
55

6-
from app.cmd import delete_file_if_exists, delete_dir_if_exists
6+
from app.cmd import (
7+
create_dir_if_not_exists,
8+
delete_file_if_exists,
9+
delete_dir_if_exists,
10+
)
711

812

913
class Builder(object):
@@ -103,9 +107,10 @@ def reset_package_name(self, file_name: str):
103107
with open(file_path, "w") as f:
104108
f.writelines(new_lines)
105109

106-
107110
def build_desktop_bin(self):
108-
output_file = os.path.join(self.lib_dir, self.bin_file)
111+
bin_dir = os.path.join(self.lib_dir, "bin")
112+
create_dir_if_not_exists(bin_dir)
113+
output_file = os.path.join(bin_dir, self.bin_file)
109114
run_env = os.environ.copy()
110115
run_env["CGO_ENABLED"] = "0"
111116

@@ -122,4 +127,4 @@ def build_desktop_bin(self):
122127
print(cmd)
123128
ret = subprocess.run(cmd, env=run_env)
124129
if ret.returncode != 0:
125-
raise Exception(f"build_desktop_bin failed")
130+
raise Exception(f"build_desktop_bin failed")

0 commit comments

Comments
 (0)