|
|
@ -599,7 +599,7 @@ TableViewLastColumnResizingFixer::TableViewLastColumnResizingFixer(QTableView* t
|
|
|
|
#ifdef WIN32
|
|
|
|
#ifdef WIN32
|
|
|
|
fs::path static StartupShortcutPath()
|
|
|
|
fs::path static StartupShortcutPath()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
std::string chain = ChainNameFromCommandLine();
|
|
|
|
std::string chain = gArgs.GetChainName();
|
|
|
|
if (chain == CBaseChainParams::MAIN)
|
|
|
|
if (chain == CBaseChainParams::MAIN)
|
|
|
|
return GetSpecialFolderPath(CSIDL_STARTUP) / "Bitcoin.lnk";
|
|
|
|
return GetSpecialFolderPath(CSIDL_STARTUP) / "Bitcoin.lnk";
|
|
|
|
if (chain == CBaseChainParams::TESTNET) // Remove this special case when CBaseChainParams::TESTNET = "testnet4"
|
|
|
|
if (chain == CBaseChainParams::TESTNET) // Remove this special case when CBaseChainParams::TESTNET = "testnet4"
|
|
|
@ -697,7 +697,7 @@ fs::path static GetAutostartDir()
|
|
|
|
|
|
|
|
|
|
|
|
fs::path static GetAutostartFilePath()
|
|
|
|
fs::path static GetAutostartFilePath()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
std::string chain = ChainNameFromCommandLine();
|
|
|
|
std::string chain = gArgs.GetChainName();
|
|
|
|
if (chain == CBaseChainParams::MAIN)
|
|
|
|
if (chain == CBaseChainParams::MAIN)
|
|
|
|
return GetAutostartDir() / "bitcoin.desktop";
|
|
|
|
return GetAutostartDir() / "bitcoin.desktop";
|
|
|
|
return GetAutostartDir() / strprintf("bitcoin-%s.lnk", chain);
|
|
|
|
return GetAutostartDir() / strprintf("bitcoin-%s.lnk", chain);
|
|
|
@ -739,7 +739,7 @@ bool SetStartOnSystemStartup(bool fAutoStart)
|
|
|
|
fs::ofstream optionFile(GetAutostartFilePath(), std::ios_base::out|std::ios_base::trunc);
|
|
|
|
fs::ofstream optionFile(GetAutostartFilePath(), std::ios_base::out|std::ios_base::trunc);
|
|
|
|
if (!optionFile.good())
|
|
|
|
if (!optionFile.good())
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
std::string chain = ChainNameFromCommandLine();
|
|
|
|
std::string chain = gArgs.GetChainName();
|
|
|
|
// Write a bitcoin.desktop file to the autostart directory:
|
|
|
|
// Write a bitcoin.desktop file to the autostart directory:
|
|
|
|
optionFile << "[Desktop Entry]\n";
|
|
|
|
optionFile << "[Desktop Entry]\n";
|
|
|
|
optionFile << "Type=Application\n";
|
|
|
|
optionFile << "Type=Application\n";
|
|
|
|