Skip to content

Commit

Permalink
[Misc] Installer paths
Browse files Browse the repository at this point in the history
  • Loading branch information
PeyTy committed Jul 2, 2023
1 parent 6816c78 commit 9ea9975
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 3 deletions.
2 changes: 1 addition & 1 deletion hexa.cmd
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
@echo off
node %~dp0hexa-node.js %*
node "%~dp0hexa-node.js" %*
2 changes: 2 additions & 0 deletions innoHexa.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@echo off
hexa-node "%~dp0hexa-node.js" %*
32 changes: 32 additions & 0 deletions tools/innoSetup/dateToVersion.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
const fs = require("fs")

let today = new Date()
let month = today.getMonth() + 1
let versionName = today.getFullYear() + '.' + month + '.' + today.getDate()

{
const path = 'hexa.json'
let file = fs.readFileSync(path).toString()

file = file
.split('\r\n')
.map(line => {
if (line.includes('"version"')) {
return '\t"version": "' + versionName + '",'
}

return line
})
.join('\r\n')

fs.writeFileSync(path, file)
}

{
const path = 'tools/innoSetup/installHexa.iss'
let file = fs.readFileSync(path).toString()

file = file.replaceAll('2023.01.01', versionName)

fs.writeFileSync(path, file)
}
4 changes: 2 additions & 2 deletions tools/innoSetup/installHexa.iss
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ DisableWelcomePage=no
DisableReadyPage=yes

[Files]
Source: "..\..\..\..\greentea-dev\Teapot\node-v18.1.0-win-x64\node.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\..\..\Teapot\node-v18.1.0-win-x64\node.exe"; DestName: "hexa-node.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\..\icon.ico"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\..\hexa.cmd"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\..\innoHexa.cmd"; DestDir: "{app}"; DestName: "hexa.cmd"; Flags: ignoreversion
Source: "..\..\hexa-node.js"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\..\repl.json"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\..\repl.hexa"; DestDir: "{app}"; Flags: ignoreversion
Expand Down

0 comments on commit 9ea9975

Please sign in to comment.