Skip to content

Commit fbbc0e7

Browse files
authored
Vscode updates for frontend (#439)
1 parent 6f63e5a commit fbbc0e7

3 files changed

Lines changed: 31 additions & 12 deletions

File tree

frontend/app.js

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1005,13 +1005,16 @@ function enableAdvancedMode(isAdvanced) {
10051005
$('#templateSection').show();
10061006
$('#templateSectionMulti').show();
10071007
} else {
1008-
$('#platformsDropdown').addClass("disabled");
1008+
$('#platformsDropdown').removeClass("disabled");
10091009
$('#platformsDropdown').dropdown('set exactly', defaultSettings.defaultPlatform);
10101010
$('#sourceExtraSection').hide();
1011-
$('#templateSection').hide();
1012-
$('#templateSectionMulti').hide();
1013-
$('#templateDropdown').dropdown('set exactly', '');
1014-
$('#templateDropdownMulti').dropdown('set exactly', '');
1011+
// $('#templateSection').hide();
1012+
// $('#templateSectionMulti').hide();
1013+
// $('#templateDropdown').dropdown('set exactly', '');
1014+
// $('#templateDropdownMulti').dropdown('set exactly', '');
1015+
$('#templateSection').show();
1016+
$('#templateSectionMulti').show();
1017+
10151018

10161019
$("body").removeClass('advanced');
10171020
$('a.updateMultiMenuOption').hide();

frontend/index.js

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ try {
7777
if (os.cpus()[0].model.indexOf('ARMv6') == 0) {
7878
myPlatform = 'linuxarmv6l';
7979
} else {
80-
myPlatform = 'linuxarmv7l';
80+
myPlatform = 'linuxaarch64';
8181
}
8282
} else if (process.arch === 'x64') {
8383
myPlatform = 'linux64';
@@ -130,9 +130,10 @@ const platforms = {
130130
"msys2": "Windows (msys2/mingw)",
131131
"ios": "iOS (Xcode)",
132132
"android": "Android (Android Studio)",
133-
"linux64": "Linux 64-bit (qtCreator)",
134-
"linuxarmv6l": "Linux ARMv6 (Makefiles)",
135-
"linuxarmv7l": "Linux ARMv7 (Makefiles)"
133+
"linux64": "Linux 64 (VS Code/Make)",
134+
"linuxarmv6l": "Arm 32 (VS Code/Make)",
135+
"linuxaarch64": "Arm 64 (VS Code/Make)",
136+
"vscode": "VS Code"
136137
};
137138

138139
const bUseMoniker = settings["useDictionaryNameGenerator"];
@@ -1101,13 +1102,23 @@ ipcMain.on('launchProjectinIDE', (event, arg) => {
11011102
console.log( osxPath );
11021103
osxPath = "\"" + osxPath + "\"";
11031104

1105+
exec('open ' + osxPath, (error, stdout, stderr) => {
1106+
return;
1107+
});
1108+
}
1109+
} else if( hostplatform == 'osx' && arg.platform == 'vscode'){
1110+
if(hostplatform == 'osx'){
1111+
let osxPath = path.join(fullPath, projectName + '.code-workspace');
1112+
console.log( osxPath );
1113+
osxPath = "\"" + osxPath + "\"";
1114+
11041115
exec('open ' + osxPath, (error, stdout, stderr) => {
11051116
return;
11061117
});
11071118
}
11081119
} else if( arg.platform == 'linux' || arg.platform == 'linux64' ){
11091120
if(hostplatform == 'linux'){
1110-
let linuxPath = path.join(fullPath, projectName + '.qbs');
1121+
let linuxPath = path.join(fullPath, projectName + '.code-workspace');
11111122
linuxPath = linuxPath.replace(/ /g, '\\ ');
11121123
console.log( linuxPath );
11131124
exec('xdg-open ' + linuxPath, (error, stdout, stderr) => {
@@ -1126,6 +1137,11 @@ ipcMain.on('launchProjectinIDE', (event, arg) => {
11261137
});
11271138
} else if( hostplatform == 'windows'){
11281139
let windowsPath = path.join(fullPath, projectName + '.sln');
1140+
1141+
if(arg.platform == 'vscode' ){
1142+
windowsPath = path.join(fullPath, projectName + '.code-workspace');
1143+
}
1144+
11291145
console.log( windowsPath );
11301146
windowsPath = "\"" + windowsPath + "\"";
11311147
exec('start ' + "\"\"" + " " + windowsPath, (error, stdout, stderr) => {

frontend/settings.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
2-
"advancedMode": false,
2+
"advancedMode": true,
33
"defaultOfPath": "../",
44
"defaultPlatform": "osx",
55
"defaultRelativeProjectPath": "apps/myApps",
66
"showConsole": false,
77
"showDeveloperTools": false,
88
"useDictionaryNameGenerator": true
9-
}
9+
}

0 commit comments

Comments
 (0)