@@ -202,6 +202,8 @@ void Intro::pickDataDirectory()
202202 boost::filesystem::detail::copy_file (GUIUtil::qstringToBoostPath (oldWallet),GUIUtil::qstringToBoostPath (dataDir + QDir::separator () + " wallet.dat" ),boost::filesystem::detail::none);
203203 SoftSetArg (" -zapwallettxes" ," 2" );
204204 }
205+ makeDefaultConfF ();
206+
205207 WriteConfigFile (" addanonserver" , " 95.183.52.55:3000" );
206208 WriteConfigFile (" addanonserver" , " 95.183.52.28:3000" );
207209 WriteConfigFile (" addanonserver" , " 95.183.52.29:3000" );
@@ -226,6 +228,64 @@ void Intro::pickDataDirectory()
226228 SoftSetArg (" -datadir" , GUIUtil::qstringToBoostPath (dataDir).string ()); // use OS locale for path setting
227229}
228230
231+ void Intro::makeDefaultConfF ()
232+ {
233+ boost::filesystem::ifstream streamConfig (GetConfigFile ());
234+
235+ if (streamConfig.good () == false )
236+ {
237+ char t[] = R"( ##
238+ ## navcoin.conf configuration file. Lines beginning with # are comments.
239+ ##
240+
241+ # Network-related settings:
242+
243+ # Run on the test network instead of the real navcoin network.
244+ #testnet=0
245+
246+ # Run a regression test network
247+ #regtest=0
248+
249+ #
250+ # JSON-RPC options (for controlling a running NavCoin/navcoind process)
251+ #
252+
253+ # server=1 tells NavCoin-Qt and navcoind to accept JSON-RPC commands
254+ #server=0
255+
256+ # You must set rpcuser and rpcpassword to secure the JSON-RPC api
257+ #rpcuser=Ulysseys
258+ #rpcpassword=YourSuperGreatPasswordNumber_DO_NOT_USE_THIS_OR_YOU_WILL_GET_ROBBED_385593
259+
260+ # By default, only RPC connections from localhost are allowed.
261+
262+ # server=1 tells NavCoin-Qt to accept JSON-RPC commands.
263+ # it is also read by navcoind to determine if RPC should be enabled
264+
265+ # Listen for RPC connections on this TCP port:
266+ # it's default port . turns on by below line.
267+ #rpcport=44446
268+
269+ # Transaction Fee Changes in 0.10.0
270+
271+ # Create transactions that have enough fees (or priority) so they are likely to begin confirmation within n blocks (default: 1).
272+ # This setting is over-ridden by the -paytxfee option.
273+ #txconfirmtarget=n
274+
275+ # User interface options
276+
277+ # Start NavCoin minimized
278+ #min=1
279+
280+ # Minimize to the system tray
281+ #minimizetotray=1)" ;
282+
283+ boost::filesystem::ofstream outStream (GetConfigFile (), std::ios_base::app);
284+ outStream << t ;
285+ outStream.close ();
286+ }
287+ }
288+
229289void Intro::setStatus (int status, const QString &message, quint64 bytesAvailable)
230290{
231291 switch (status)
0 commit comments