Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

Restart 'Code::Block'

(1/2) > >>

LETARTARE:
I found in 'cb13604' several configuration options that require a reboot.
These are
1- 'Settings->Environment...->General settings' : 2   
   - 'Allow only one running instance (will take place after restart)' 
   - 'Interprocess communication (will take place after restart)'

2- 'Settings->Environment...->View' : 1   
   - 'Internationalization (will take place after restart)'

3 'Settings->Scripting...' : any change

4- in the 'ToDo' plugin from 'settings.xrc'
     - 'Include the Todo list in the messages pane (will take place after restart)'

It would then be useful to automatically restart after user approval

My first concern was to create a 'Files->Quit (Ctrl-Q)' type menu button: 'Files->Restart (Ctrl-R)'.
To do this, modify 'src|resources|main_menu.xrc' by adding the following after the 'Quit' button

Then set up the various elements to execute the methode :

--- Code: ---'void MainFrame::OnFileRestart(cb_unused wxCommandEvent& event)'
--- End code ---
which will close the application and restart it.

Here's a first patch to make it happen

I'll provide the automatic restart soon.

ollydbg:
When restart the C::B, I think you need to "remember" the environment or the command line options.

For example, when you start C::B by the "CbLauncher.exe", is has some special command line options, and the codeblocks.exe is a child process of the cblauncher.exe process.

I'm not sure how to handle those.

LETARTARE:
@ollydbg : thanks
Yes, you're right. I've never used this launch.
So I'm waiting for other opinions that can explain.

The proposed solution is based on a traditional launch with or without console mode ('CB' option on construction):
- by command without argument
- from a system-generated icon or manually

LETARTARE:
@ollydbg
Can you tell me how to launch 'code::blocks' with 'cblauncher' ?
If we use a launch script, this could solve the problem. In any case, the script would have to be rerun ...

stahta01:
Link found using search and wiki https://forums.codeblocks.org/index.php/topic,10360.0.html
I have never used the util.

Navigation

[0] Message Index

[#] Next page

Go to full version