Skip to content

Commit

Permalink
And it AUTOCOMPILES! :o
Browse files Browse the repository at this point in the history
  • Loading branch information
TheAlternateDoctor committed Apr 12, 2022
1 parent d4d2c1e commit 86a7e82
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions extension.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,29 +44,42 @@ function activate(context) {

fs.access(tickompiler, fs.constants.F_OK, (err)=>{
if(err != null)
vscode.window.showInformationMessage("Tickompiler not found!")
vscode.window.showErrorMessage("Tickompiler not found!")
})
fs.access(base, fs.constants.F_OK, (err)=>{
if(err != null)
vscode.window.showInformationMessage("base.bin not found!")
vscode.window.showErrorMessage("base.bin not found!")
})
fs.access(citra, fs.constants.F_OK, (err)=>{
if(err != null)
vscode.window.showInformationMessage("Citra's folder does not exist!")
vscode.window.showErrorMessage("Citra's folder does not exist!")
})
// //We can execute the code now
let java =""
if(javaVer)
java = "java --add-opens java.base/java.lang=ALL-UNNAMED -jar "
else
java = "java -jar "
let command = java+tickompiler+' c "'+file+'" "'+current+delimiter+'bin'+delimiter+'"';
let bin = '"'+current+delimiter+'bin'+delimiter+'"'
let command = java+tickompiler+' c "'+file+'" "'+bin;
exec(command,
function (error, stdout, stderr) {
vscode.window.showInformationMessage(command);
console.log('stdout: ' + stdout);
console.log('stderr: ' + stderr);
if (error !== null) {
vscode.window.showErrorMessage("Couldn't compile!")
console.log(error);
}
});
command = java+tickompiler+' p '+bin+' '+base+' '+citra+delimiter+'sdmc'+delimiter+'rhmm'+delimiter+'C00.bin"'
exec(command,
function (error, stdout, stderr) {
vscode.window.showInformationMessage(command);
console.log('stdout: ' + stdout);
console.log('stderr: ' + stderr);
if (error !== null) {
vscode.window.showErrorMessage("Couldn't compile!")
console.log(error);
}
});
Expand Down

0 comments on commit 86a7e82

Please sign in to comment.