Author Topic: [bug] Path issues with editing Wizard Scripts in Xubuntu install  (Read 5267 times)

Offline Seronis

  • Almost regular
  • **
  • Posts: 197
I have C::B installed via apt-get in a mostly fresh install of Xubuntu 13.04. I have a locally compiled SFML library and have tested that both it and CB are working properly by starting with an Empty Project and doing a test build. After this I was gonna purge out all the wizards that I'll never use.

In the new project wizard when I right click on a project and choose the option to edit the wizard script, the script DOES successfully open but immediately switches to read only mode. A couple seconds later I get an error message stating that the file has been deleted or is no longer available and asks if I wish to close the window for it. The error message tells me that the path for the wizard script was supposedly at:

/home/[name]/.codeblocks/share/codeblocks/templates/wizard/sfml/[scriptname]

I personally expected the path listed to be

/usr/share/codeblocks/templates/wizard/sfml/[scriptname]

When double checking I found the files DO exist where I expected them to be, and empty folders exist where the error reported.

Offline Seronis

  • Almost regular
  • **
  • Posts: 197
Re: [bug] Path issues with editing Wizard Scripts in Xubuntu install
« Reply #1 on: May 07, 2013, 04:11:30 am »
This issue came up for me because the SFML wizard appears to be out of date and fails to compile. An updated main.cpp that compiles with SFML 2.0 is:

Code
#include <SFML/Graphics.hpp>

int main()
{
    // Create the main window
    sf::RenderWindow App(sf::VideoMode(800, 600), "SFML window");

    // Load a sprite to display
    sf::Texture Texture;
    if (!Texture.loadFromFile("cb.bmp"))
        return EXIT_FAILURE;
    sf::Sprite Sprite(Texture);

// Start the game loop
    while (App.isOpen())
    {
        // Process events
        sf::Event Event;
        while (App.pollEvent(Event))
        {
            // Close window : exit
            if (Event.type == sf::Event::Closed)
                App.close();
        }

        // Clear screen
        App.clear();

        // Draw the sprite
        App.draw(Sprite);

        // Update the window
        App.display();
    }

    return EXIT_SUCCESS;
}

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: [bug] Path issues with editing Wizard Scripts in Xubuntu install
« Reply #2 on: May 08, 2013, 06:07:56 am »
An updated main.cpp that compiles with SFML 2.0 is:
Did you search the forums before and saw this:
http://forums.codeblocks.org/index.php/topic,17871.0.html
?
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline Seronis

  • Almost regular
  • **
  • Posts: 197
Re: [bug] Path issues with editing Wizard Scripts in Xubuntu install
« Reply #3 on: May 09, 2013, 06:39:56 am »
That works beautifully too (with a tiny tweak since I dont have debug libs for sfml itself). Hopefully that wizard will replace the current one in the next release.

That doesnt address the bug though which is the path confusion on the part of CB itself. If CB access a copy of the script to exist at the given location that will override the default wizard then it needs to not only create the directories but to duplicate the script too. As it is, choosing to edit a wizard fails
« Last Edit: May 09, 2013, 06:43:14 am by Seronis »