Author Topic: Change Log: cmd line for export  (Read 9186 times)

Offline J.

  • Multiple posting newcomer
  • *
  • Posts: 47
Change Log: cmd line for export
« on: May 10, 2014, 02:21:09 am »
Hi,

first of all I am a newbie to CB and to c++ ... and my first posting to this forum.

My question: What is the command line to export the file ChangeLog.txt? I want to plug this into the TortoiseSVN log. If interested I could post the Tools+ config for "embedding" TortoiseSVN.

Working on a Win machine which should not make any difference I presume.

Many thx for your help,
J.

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: Change Log: cmd line for export
« Reply #1 on: May 10, 2014, 12:25:59 pm »
"ChangeLog.txt" ??? what change log?

Offline J.

  • Multiple posting newcomer
  • *
  • Posts: 47
Re: Change Log: cmd line for export
« Reply #2 on: May 10, 2014, 01:28:19 pm »
logging changes in your code using the AutoVersioning Plugin. This does not mean the changes log of CB per se, of course.  ;)

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Change Log: cmd line for export
« Reply #3 on: May 10, 2014, 03:25:51 pm »
logging changes in your code using the AutoVersioning Plugin. This does not mean the changes log of CB per se, of course.  ;)

Did you read the link you posted?

All I know about the plugin is on the link you posted!

Did you try setting the location of the file using "Changes log" title, if NOT do so.

Now you should know where the file is located.

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline J.

  • Multiple posting newcomer
  • *
  • Posts: 47
Re: Change Log: cmd line for export
« Reply #4 on: May 10, 2014, 03:39:44 pm »
Sorry for the confusion. I think I should have been more precise:

The plugin Autoversioning allows to export the Changes log to the file ChangesLog.txt located in the project folder. This is simply done by clicking Project > Changes Log > Write.

Now is it possible to export the Changes Log in an automated manner, e.g. via cmd? Or is there another way to tell CB to do so? What I want to accomplish is to dump the Changes Log into a file which is used in a TortoiseSVN commit. The svn commit is done calling a Tools+ script.

Hope this makes my question clearer.

Many thanks for your help
/J.

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: Change Log: cmd line for export
« Reply #5 on: May 10, 2014, 03:58:29 pm »
you can make a squirrel script for this functionality...
read http://wiki.codeblocks.org/index.php?title=Scripting_commands (CallMenu) and her http://wiki.codeblocks.org/index.php?title=Scripting_Code::Blocks for more information.. at the beginning it is a bit difficult, but after a bit you will get into it... ;) if you have a question about scripting feel free to ask...

Offline J.

  • Multiple posting newcomer
  • *
  • Posts: 47
Re: Change Log: cmd line for export
« Reply #6 on: May 11, 2014, 09:18:46 am »
Thx, this is very helpful. I think I should call routine avChangesDlg::OnBtnWriteClick. How does this call work in squirrel given the wx arguments which are required?

Many thanks again for your support!

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: Change Log: cmd line for export
« Reply #7 on: May 11, 2014, 01:16:25 pm »
???

you want to make a script, what 1) exprots the changelog, and the calls tortoise?
i would make something like this:

Code
// Script plugins must extend cbScriptPlugin

class TestPlugin extends cbScriptPlugin
{
    // mandatory to setup the plugin's info
    constructor()
    {
        info = PluginInfo();
        info.name = _T("exportPlugin");
        info.title = _T("exportPlugin");
        info.version = _T("0.1a");
        info.license = _T("GPL");
    }

    // optional to create menubar items
    function GetMenu()
    {
        local entries = ::wxArrayString();
        entries.Add(_T("My Tools/Export"), 1);
        return entries;
    }

    // optional to create context menu entries
    function GetModuleMenu(who, data)
    {
        local entries = ::wxArrayString();
        return entries;
    }
   
    // optional to support ExecutePlugin(pluginNameString)
    function Execute()
    {
        ::ShowMessage(_T("Start export"));
        CallMenu(_("path to the menu entry for exporting the changelog"));
        Execute(_("The tortoirs command"))
        return 0;
    }
   
    // optional calback for menubar items clicking
    function OnMenuClicked(index)
    {
        if (index == 0)
            Execute();
    }

    // optional calback for context menu items clicking
    function OnModuleMenuClicked(index)
    {
    }
}

// this call actually registers the script plugin with Code::Blocks
RegisterPlugin(TestPlugin());

// if you want to call this plugin's Execute() function, use this in a script:
// ExecutePlugin(_T("TestPlugin"));

greetings

Offline J.

  • Multiple posting newcomer
  • *
  • Posts: 47
Re: Change Log: cmd line for export
« Reply #8 on: May 24, 2014, 04:32:29 pm »
Many thanks, but a bit easier: The temporary change log file (changelog.tmp) in the CB project folder can be used. There is no additional output required.

Sorry for the late reply. Unfortunately I was away from my desk because of a nasty virus (not one of those catching notebooks).

-J.

Offline LETARTARE

  • Lives here!
  • ****
  • Posts: 531
  • L'ami de l'homme.The friend of man.
    • LETARTARE
Re: Change Log: cmd line for export
« Reply #9 on: July 23, 2014, 02:12:20 pm »
@BlueHazzard
hello,
Quote
function Execute()
    {
        ::ShowMessage(_T("Start export"));
        CallMenu(_("path to the menu entry for exporting the changelog"));
        Execute(_("The tortoirs command"))
        return 0;
    }

Under 'Win32' this call is still not working (svn9778)  >:(

http://forums.codeblocks.org/index.php/topic,15539.0.html
http://forums.codeblocks.org/index.php/topic,16284.0.html
http://forums.codeblocks.org/index.php/topic,16352.0.html
http://forums.codeblocks.org/index.php/topic,16412.0.html

Do you have a solution ?

Thanks
CB-13483, plugins-sdk-2.25.0 : Collector-2.0.0, AddOnForQt-3.9.1
1-Win7 Business Pack1 64bits : wx-3.2.4, gcc-8.1.0,
2-OpenSuse::Leap-15.4-64bits : wx-3.2.4;gtk3, gcc-8.2.1,
=> !! The messages are translated by Deepl

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: Change Log: cmd line for export
« Reply #10 on: July 24, 2014, 10:48:47 pm »
Under 'Win32' this call is still not working (svn9778)  >:(


well, this was unexpected, i actually never tested it :P

Can you test if it is working on my sqrat port? I hope i will finally find the time in the next days to continue my work, and i will also investigate in this issue...

greetings

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: Change Log: cmd line for export
« Reply #11 on: July 28, 2014, 11:43:48 pm »
Hi!
i had a little time to debug this bug... It seems that the event system isn't finding the right event handler for the ID of any menu... So it seems that the event handler chain isn't made properly...
can please someone test if this bug is also under linux?
can please someone test if this bug is also in >wx2.8 (like 2.9 or 3.0) (i have don't have any HDD Space left, the new is right on his way, so i can't test this until next week)

greetings

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: Change Log: cmd line for export
« Reply #12 on: August 03, 2014, 11:35:53 pm »
Hi!
I fixed this bug in my sqrat port (at least for wx2.8 on Windows). I could not test it under linux, but it should work also there.

Here a "patch"
Code
src/sdk/scripting/bindings/sc_globals.cpp
@@ -164,7 +164,8 @@ namespace ScriptBindings
#if wxCHECK_VERSION(2, 9, 0)
mbar->GetEventHandler()->ProcessEvent(evt);
#else
- if ( !mbar->ProcessEvent(evt) )
+ if(!Manager::Get()->GetAppWindow()->ProcessEvent(evt))
+ //if ( !mbar->ProcessEvent(evt) )
{

(simply change the line 167 in file sdk/scripting/sc_globals.cpp from
Code
if ( !mbar->ProcessEvent(evt) )
to
Code
if(!Manager::Get()->GetAppWindow()->ProcessEvent(evt))
)

greetings and good night

Offline LETARTARE

  • Lives here!
  • ****
  • Posts: 531
  • L'ami de l'homme.The friend of man.
    • LETARTARE
Re: Change Log: cmd line for export
« Reply #13 on: August 04, 2014, 12:01:30 am »
Hello @BlueHazard
with which version of C :: B?
I just tested quickly with svn 8778 and the result is negative!
Code
///-----------------------------------------------------------------------------
/// ===>  no work on VISTA  pack2 !!! <====
///-----------------------------------------------------------------------------
///8- start building the project
local menu = _("/&Build/Build")
Mes = Lf + Tab + _T("--> ") + _("Execute menu entrie") + _T(" ")
Mes += Quote + _("Build->Build") + Quote
/// launches the menu
local id
// #if PATCH_CALLMENU
///------------- patch 'int CallMenu(const wxString& menuPath)' ------------
// id = CallMenu(menu)
///-------------------------------------------------------------------------
// #else
CallMenu(menu)
id = _T("??")
// #endif
/// display
Mes +=  _T(", ") + _("identifier")  + _T(" = ") + _T(id.tostring())
::print( Mes )



To morrow I take with basic test...
« Last Edit: August 04, 2014, 12:25:04 am by LETARTARE »
CB-13483, plugins-sdk-2.25.0 : Collector-2.0.0, AddOnForQt-3.9.1
1-Win7 Business Pack1 64bits : wx-3.2.4, gcc-8.1.0,
2-OpenSuse::Leap-15.4-64bits : wx-3.2.4;gtk3, gcc-8.2.1,
=> !! The messages are translated by Deepl

Offline LETARTARE

  • Lives here!
  • ****
  • Posts: 531
  • L'ami de l'homme.The friend of man.
    • LETARTARE
Re: Change Log: cmd line for export
« Reply #14 on: August 04, 2014, 10:13:06 am »
Administrators
I find that I pollute this post, because the original subject is different
You could also move (and those of BlueHazard on this) in
http://forums.codeblocks.org/index.php/topic,15539.0.html
What would be more logical.
Thanks you.
CB-13483, plugins-sdk-2.25.0 : Collector-2.0.0, AddOnForQt-3.9.1
1-Win7 Business Pack1 64bits : wx-3.2.4, gcc-8.1.0,
2-OpenSuse::Leap-15.4-64bits : wx-3.2.4;gtk3, gcc-8.2.1,
=> !! The messages are translated by Deepl