Skip to content

Commit 2480da8

Browse files
committed
[FIX] vscode: move binaries path
1 parent 3d60d3d commit 2480da8

File tree

2 files changed

+22
-28
lines changed

2 files changed

+22
-28
lines changed

vscode/client/extension.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -301,11 +301,11 @@ async function initLanguageServerClient(context: ExtensionContext, outputChannel
301301
const pythonPath = await getPythonPath(context);
302302

303303
global.SERVER_PID = 0;
304-
let serverPath = "./win/odoo_ls_server.exe";
304+
let serverPath = "./win_odoo_ls_server.exe";
305305
if (process.platform === 'darwin') {
306-
serverPath = "./macos/odoo_ls_server"
306+
serverPath = "./macos_odoo_ls_server"
307307
} else if (process.platform !== 'win32') {
308-
serverPath = "./linux/odoo_ls_server"
308+
serverPath = "./linux_odoo_ls_server"
309309
}
310310

311311
if (context.extensionMode === ExtensionMode.Development) {
@@ -833,8 +833,8 @@ export async function activate(context: ExtensionContext): Promise<void> {
833833
}
834834
}
835835
catch (error) {
836-
global.LSCLIENT.error(error);
837836
displayCrashMessage(context, error, global.SERVER_PID, 'odoo.activate');
837+
global.LSCLIENT.error(error);
838838
}
839839
}
840840

vscode/noxfile.py

Lines changed: 18 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -70,22 +70,19 @@ def build_package(session: nox.Session) -> None:
7070
copy_dir(session, "../server/typeshed", "typeshed")
7171
copy_dir(session, "../server/additional_stubs", "additional_stubs")
7272
if (os.name == 'posix' and 'microsoft' not in platform.uname()[2].lower()) or Path("../server/target/release/odoo_ls_server").is_file():
73-
session.run("mkdir", "linux", external=True)
74-
session.run("cp", "../server/target/release/odoo_ls_server", "linux/odoo_ls_server", external=True)
73+
session.run("cp", "../server/target/release/odoo_ls_server", "linux_odoo_ls_server", external=True)
7574
if (os.name =='nt' or 'microsoft' in platform.uname()[2].lower()) or Path("../server/target/release/odoo_ls_server.exe").is_file():
76-
session.run("mkdir", "win", external=True)
77-
session.run("cp", "../server/target/release/odoo_ls_server.exe", "win/odoo_ls_server.exe", external=True)
75+
session.run("cp", "../server/target/release/odoo_ls_server.exe", "win_odoo_ls_server.exe", external=True)
7876
if (os.name =='posix' and 'Darwin' in platform.uname()[0].lower()) or Path("../server/target/release/odoo_ls_server").is_file():
79-
session.run("mkdir", "macos", external=True)
80-
session.run("cp", "../server/target/release/mac_odoo_ls_server", "macos/odoo_ls_server", external=True)
77+
session.run("cp", "../server/target/release/mac_odoo_ls_server", "macos_odoo_ls_server", external=True)
8178
session.run("cp", "../CHANGELOG.md", "CHANGELOG.md", external=True)
8279
session.run("vsce", "package", external=True)
83-
if (os.name == 'posix' and 'microsoft' not in platform.uname()[2].lower()) or Path("linux").is_dir():
84-
session.run("rm", "-r", "linux", external=True)
85-
if (os.name =='nt' or 'microsoft' in platform.uname()[2].lower()) or Path("win").is_dir():
86-
session.run("rm", "-r", "win", external=True)
87-
if (os.name =='posix' and 'Darwin' in platform.uname()[0].lower()) or Path("macos").is_dir():
88-
session.run("rm", "-r", "macos", external=True)
80+
if (os.name == 'posix' and 'microsoft' not in platform.uname()[2].lower()) or Path("linux_odoo_ls_server").is_file():
81+
session.run("rm", "-r", "linux_odoo_ls_server", external=True)
82+
if (os.name =='nt' or 'microsoft' in platform.uname()[2].lower()) or Path("win_odoo_ls_server.exe").is_file():
83+
session.run("rm", "-r", "win_odoo_ls_server.exe", external=True)
84+
if (os.name =='posix' and 'Darwin' in platform.uname()[0].lower()) or Path("macos_odoo_ls_server").is_file():
85+
session.run("rm", "-r", "macos_odoo_ls_server", external=True)
8986
session.run("rm", "-r", "typeshed", external=True)
9087
session.run("rm", "-r", "additional_stubs", external=True)
9188
session.run("rm", "CHANGELOG.md", external=True)
@@ -98,22 +95,19 @@ def build_package_prerelease(session: nox.Session) -> None:
9895
copy_dir(session, "../server/typeshed", "typeshed")
9996
copy_dir(session, "../server/additional_stubs", "additional_stubs")
10097
if (os.name == 'posix' and 'microsoft' not in platform.uname()[2].lower()) or Path("../server/target/release/odoo_ls_server").is_file():
101-
session.run("mkdir", "linux", external=True)
102-
session.run("cp", "../server/target/release/odoo_ls_server", "linux/odoo_ls_server", external=True)
98+
session.run("cp", "../server/target/release/odoo_ls_server", "linux_odoo_ls_server", external=True)
10399
if (os.name =='nt' or 'microsoft' in platform.uname()[2].lower()) or Path("../server/target/release/odoo_ls_server.exe").is_file():
104-
session.run("mkdir", "win", external=True)
105-
session.run("cp", "../server/target/release/odoo_ls_server.exe", "win/odoo_ls_server.exe", external=True)
100+
session.run("cp", "../server/target/release/odoo_ls_server.exe", "win_odoo_ls_server.exe", external=True)
106101
if (os.name =='posix' and 'Darwin' in platform.uname()[0].lower()) or Path("../server/target/release/odoo_ls_server").is_file():
107-
session.run("mkdir", "macos", external=True)
108-
session.run("cp", "../server/target/release/mac_odoo_ls_server", "macos/odoo_ls_server", external=True)
102+
session.run("cp", "../server/target/release/mac_odoo_ls_server", "macos_odoo_ls_server", external=True)
109103
session.run("cp", "../CHANGELOG.md", "CHANGELOG.md", external=True)
110104
session.run("vsce", "package", "--pre-release", external=True)
111-
if (os.name == 'posix' and 'microsoft' not in platform.uname()[2].lower()) or Path("linux").is_dir():
112-
session.run("rm", "-r", "linux", external=True)
113-
if (os.name =='nt' or 'microsoft' in platform.uname()[2].lower()) or Path("win").is_dir():
114-
session.run("rm", "-r", "win", external=True)
115-
if (os.name =='posix' and 'Darwin' in platform.uname()[0].lower()) or Path("macos").is_dir():
116-
session.run("rm", "-r", "macos", external=True)
105+
if (os.name == 'posix' and 'microsoft' not in platform.uname()[2].lower()) or Path("linux_odoo_ls_server").is_file():
106+
session.run("rm", "-r", "linux_odoo_ls_server", external=True)
107+
if (os.name =='nt' or 'microsoft' in platform.uname()[2].lower()) or Path("win_odoo_ls_server.exe").is_file():
108+
session.run("rm", "-r", "win_odoo_ls_server.exe", external=True)
109+
if (os.name =='posix' and 'Darwin' in platform.uname()[0].lower()) or Path("macos_odoo_ls_server").is_file():
110+
session.run("rm", "-r", "macos_odoo_ls_server", external=True)
117111
session.run("rm", "-r", "typeshed", external=True)
118112
session.run("rm", "-r", "additional_stubs", external=True)
119113
session.run("rm", "CHANGELOG.md", external=True)

0 commit comments

Comments
 (0)