Skip to content

Commit

Permalink
1.6.4.5 - Fix "run on boot" links that were broken by testnet changes…
Browse files Browse the repository at this point in the history
… and other minor "run on boot" corrections. Closes #65.
  • Loading branch information
nlg-buildbot committed Oct 11, 2017
1 parent d0a4361 commit cd58843
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 8 deletions.
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ AC_PREREQ([2.60])
define(_CLIENT_VERSION_MAJOR, 1)
define(_CLIENT_VERSION_MINOR, 6)
define(_CLIENT_VERSION_REVISION, 4)
define(_CLIENT_VERSION_BUILD, 4)
define(_CLIENT_VERSION_BUILD, 5)
define(_CLIENT_VERSION_IS_RELEASE, false)
define(_COPYRIGHT_YEAR, 2016)
define(_COPYRIGHT_HOLDERS,[The %s developers])
Expand Down
2 changes: 1 addition & 1 deletion src/clientversion.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#define CLIENT_VERSION_MAJOR 1
#define CLIENT_VERSION_MINOR 6
#define CLIENT_VERSION_REVISION 4
#define CLIENT_VERSION_BUILD 4
#define CLIENT_VERSION_BUILD 5

//! Set to true for release, false for prerelease or test build
#define CLIENT_VERSION_IS_RELEASE false
Expand Down
22 changes: 16 additions & 6 deletions src/qt/guiutil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -568,10 +568,10 @@ boost::filesystem::path static StartupShortcutPath()
{
std::string chain = ChainNameFromCommandLine();
if (chain == CBaseChainParams::MAIN)
return GetSpecialFolderPath(CSIDL_STARTUP) / "Bitcoin.lnk";
return GetSpecialFolderPath(CSIDL_STARTUP) / "Gulden.lnk";
if (chain == CBaseChainParams::TESTNET) // Remove this special case when CBaseChainParams::TESTNET = "testnet4"
return GetSpecialFolderPath(CSIDL_STARTUP) / "Bitcoin (testnet).lnk";
return GetSpecialFolderPath(CSIDL_STARTUP) / strprintf("Bitcoin (%s).lnk", chain);
return GetSpecialFolderPath(CSIDL_STARTUP) / "Gulden (testnet).lnk";
return GetSpecialFolderPath(CSIDL_STARTUP) / strprintf("Gulden (%s).lnk", chain);
}

bool GetStartOnSystemStartup()
Expand Down Expand Up @@ -600,7 +600,12 @@ bool SetStartOnSystemStartup(bool fAutoStart)

QString strArgs = "-min";

strArgs += QString::fromStdString(strprintf(" -testnet=%d -regtest=%d", IsArgSet("-testnet"), GetBoolArg("-regtest", false)));
if (IsArgSet("-testnet")) {
strArgs += QString::fromStdString(strprintf(" -testnet=%s", GetArg("-testnet", "")));
}
if (IsArgSet("-regtest")) {
strArgs += QString::fromStdString(strprintf(" -regtest=%s", GetBoolArg("-regtest", false)));
}

#ifdef UNICODE
boost::scoped_array<TCHAR> args(new TCHAR[strArgs.length() + 1]);
Expand Down Expand Up @@ -660,7 +665,7 @@ boost::filesystem::path static GetAutostartFilePath()
std::string chain = ChainNameFromCommandLine();
if (chain == CBaseChainParams::MAIN)
return GetAutostartDir() / "Gulden.desktop";
return GetAutostartDir() / strprintf("bitcoin-%s.lnk", chain);
return GetAutostartDir() / strprintf("gulden-%s.lnk", chain);
}

bool GetStartOnSystemStartup()
Expand Down Expand Up @@ -703,7 +708,12 @@ bool SetStartOnSystemStartup(bool fAutoStart)
optionFile << "Name=Gulden\n";
else
optionFile << strprintf("Name=Gulden (%s)\n", chain);
optionFile << "Exec=" << pszExePath << strprintf(" -min -testnet=%d -regtest=%d\n", IsArgSet("-testnet"), GetBoolArg("-regtest", false));
optionFile << "Exec=" << pszExePath << "-min";
if (IsArgSet("-testnet")) {
optionFile << strprintf("-testnet=%s\n", GetArg("-testnet", ""));
} else if (IsArgSet("-regtest")) {
optionFile << strprintf("-regtest=%d\n", GetBoolArg("-regtest", false));
}
optionFile << "Terminal=false\n";
optionFile << "Hidden=false\n";
optionFile << "MimeType=x-scheme-handler/guldencoin:\n";
Expand Down

0 comments on commit cd58843

Please sign in to comment.