mirror of
https://github.com/anope/anope.git
synced 2026-07-01 02:26:38 +02:00
Made Windows install.js correctly detect the Anope version and made version.cpp correctly generate version.h on Windows
This commit is contained in:
@@ -26,6 +26,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
fstream fd;
|
||||
|
||||
fd.clear();
|
||||
fd.open(argv[1], ios::in);
|
||||
if (!fd.is_open())
|
||||
{
|
||||
@@ -49,6 +50,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
fd.close();
|
||||
|
||||
fd.clear();
|
||||
fd.open(argv[2], ios::in);
|
||||
|
||||
string version_build = "#define VERSION_BUILD 1";
|
||||
@@ -84,6 +86,7 @@ int main(int argc, char *argv[])
|
||||
fd.close();
|
||||
}
|
||||
|
||||
fd.clear();
|
||||
fd.open(argv[2], ios::out);
|
||||
|
||||
if (!fd.is_open())
|
||||
|
||||
+2
-2
@@ -258,13 +258,13 @@ else
|
||||
// Functions
|
||||
|
||||
function FindAnopeVersion() {
|
||||
if (!fso.FileExists(ScriptPath + 'src\\version'))
|
||||
if (!fso.FileExists(ScriptPath + 'src\\version.sh'))
|
||||
{
|
||||
anopeVersion = 'Unknown';
|
||||
return;
|
||||
}
|
||||
|
||||
var versionLog = fso.OpenTextFile(ScriptPath + 'src\\version');
|
||||
var versionLog = fso.OpenTextFile(ScriptPath + 'src\\version.sh');
|
||||
while (!versionLog.atEndOfStream)
|
||||
{
|
||||
var versionLine = versionLog.readline();
|
||||
|
||||
Reference in New Issue
Block a user