Author Topic: 20.03 forgets settings when closed  (Read 3256 times)

Offline devdzt

  • Single posting newcomer
  • *
  • Posts: 4
20.03 forgets settings when closed
« on: July 09, 2020, 10:05:19 am »
been using 17.12 on windows 10 for a long time and still works fine but using 20.03 i have to set up my compilers every time i open codeblocks and it erases all the libraries under linker settings in the project build options but only for the general settings, libraries added under specific debug and release builds are still there. it also erases general include directories.
17.12 will do this only if i open the project in 20.03 then try to go back to 17.12 but 20.03 will do it everytime even if i dont open the project in the older version. seems like project file isnt being saved correctly or something.

not sure if this is just because i created the project a long time ago under a older version or what. i havent tried this with a project created initially with 20.03 but i think it wouldnt matter since the path under toolchain executables is erased without a project ever opened even though the entry for compilers i manually add are still there. also havent tried running codeblocks as admin but i think that would be weird since i never needed to do that with 17.12.

any suggestions to solve this without creating a new project in 20.03 and adding all my files and options would be nice, kind of doubt that would even work anyways, since i like the new dpi stuff because in 17.12 text looks super jagged when global windows scaling is increased.

edit: okay, i may have fixed it erasing the toolchain executable path by deleting the codeblocks folder under AppData/Roaming for my 17.12 install and deleting AppData folder in the 20.03 folder (i guess because i installed this version as portable), then setting up my compiler, saving everything then reopening codeblocks shows the path to compiler still there but the compiler flags section is completely blank now.
this still doesnt seem to fix issues with the project file itself. the first time i tried opening the project it seemed okay but after saving everything again and trying to reopen it didnt save the compiler for the project so would still need a solution for this unless it somehow fixes itself after setting everything up again.
i had a problem with compiler flags page being blank before in older versions that i solved by deleting AppData or some config file in there but i dont remember since that was so long ago and it only appeared now after just trying that.
« Last Edit: July 09, 2020, 10:36:30 am by devdzt »

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: 20.03 forgets settings when closed
« Reply #1 on: July 09, 2020, 10:54:40 am »
Can you give us the problematic project file?

Are you using the "save verything" button?

Can it be tat some anti virus is blocking codeblocks?

What is your compiler executable path?

What is the compiler name in the project file?

Offline devdzt

  • Single posting newcomer
  • *
  • Posts: 4
Re: 20.03 forgets settings when closed
« Reply #2 on: July 09, 2020, 11:34:42 am »
this is the project file that is used with 17.12 that has no problems (besides the blank compiler flags page now for some reason but think i can probably fix that if i find the old post i read before)
Code
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_project_file>
<FileVersion major="1" minor="6" />
<Project>
<Option title="MyProject" />
<Option pch_mode="2" />
<Option compiler="mingw-w64_810" />
<MakeCommands>
<Build command="" />
<CompileFile command="" />
<Clean command="" />
<DistClean command="" />
<AskRebuildNeeded command="" />
<SilentBuild command=" &gt; $(CMD_NULL)" />
</MakeCommands>
<Build>
<Target title="Debug">
<Option output="bin/Debug/MyProject" prefix_auto="1" extension_auto="1" />
<Option object_output="obj/Debug/" />
<Option type="1" />
<Option compiler="mingw-w64_810" />
<Compiler>
<Add option="-pg" />
<Add option="-g" />
<Add option="-DMYPROJECT_DEBUG" />
</Compiler>
<ResourceCompiler>
<Add option='MYPROJECT_BUILD_NAME=&quot;Debug&quot;' />
</ResourceCompiler>
<Linker>
<Add option="-pg -lgmon" />
<Add library="glewd" />
<Add library="SDL2maind" />
<Add library="SDL2d.dll" />
<Add library="SDL2_imaged" />
<Add library="MyDebugd" />
<Add library="MyCommond" />
<Add library="MyApplicationd" />
<Add library="MyThreadd" />
<Add library="MyNetworkd" />
<Add library="RectangleBinPackd" />
<Add library="freetyped.dll" />
<Add library="cppfsd.dll" />
<Add library="duktape-2.5.0d" />
<Add directory="lib/Debug" />
</Linker>
</Target>
<Target title="Release">
<Option output="bin/Release/MyProject" prefix_auto="1" extension_auto="1" />
<Option object_output="obj/Release/" />
<Option type="1" />
<Option compiler="mingw-w64_810" />
<Compiler>
<Add option="-O2" />
<Add option="-DMYPROJECT_RELEASE" />
</Compiler>
<Linker>
<Add option="-s" />
<Add library="glew" />
<Add library="SDL2main" />
<Add library="SDL2.dll" />
<Add library="SDL2_image" />
<Add library="MyDebug" />
<Add library="MyCommon" />
<Add library="MyApplication" />
<Add library="MyThread" />
<Add library="MyNetwork" />
<Add library="RectangleBinPack" />
<Add library="freetype.dll" />
<Add library="cppfs.dll" />
<Add library="duktape-2.5.0" />
<Add directory="lib/Release" />
</Linker>
</Target>
<Target title="ReleaseO3">
<Option output="bin/ReleaseO3/MyProject" prefix_auto="1" extension_auto="1" />
<Option object_output="obj/ReleaseO3/" />
<Option type="1" />
<Option compiler="mingw-w64_810" />
<Option use_console_runner="0" />
<Compiler>
<Add option="-O3" />
<Add option="-DMYPROJECT_RELEASE_O3" />
</Compiler>
<Linker>
<Add option="-s" />
<Add library="glew" />
<Add library="SDL2main" />
<Add library="SDL2.dll" />
<Add library="SDL2_image" />
<Add library="MyDebug" />
<Add library="MyCommon" />
<Add library="MyApplication" />
<Add library="MyThread" />
<Add library="MyNetwork" />
<Add library="RectangleBinPack" />
<Add library="freetype.dll" />
<Add library="cppfs.dll" />
<Add library="duktape-2.5.0" />
<Add directory="lib/ReleaseO3" />
</Linker>
</Target>
</Build>
<Compiler>
<Add option="-std=c++1z" />
<Add option="-DASIO_STANDALONE" />
<Add directory="include" />
<Add directory="include/freetype" />
</Compiler>
<Linker>
<Add library="mingw32" />
<Add library="opengl32" />
<Add library="ws2_32" />
<Add library="ssl.dll" />
<Add library="crypto.dll" />
<Add library="snappy" />
</Linker>
                /* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */
/* omitted alot of <Unit filename="some_path" /> entries */
                /* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */
<Extensions>
<DoxyBlocks>
<comment_style block="2" line="2" />
<doxyfile_project />
<doxyfile_build />
<doxyfile_warnings />
<doxyfile_output />
<doxyfile_dot />
<general />
</DoxyBlocks>
<lib_finder disable_auto="1" />
<code_completion />
<envvars />
<debugger />
</Extensions>
</Project>
</CodeBlocks_project_file>

yes i was using the "save everything" button, but ive tried doing saves individually and in different orders such as "save workspace" then "save project" and vice versa

i dont think so, just a firewall for monitoring and blocking internet traffic

the compiler executable path is "C:\Programs\mingw-w64\x86_64-8.1.0-win32-seh-rt_v6-rev0\mingw64\bin" which may be a little long but hasnt caused any problems in 17.12 or cmake

the compiler label in codeblocks is "mingw-w64 8.1.0" and written as "mingw-w64_810" as you can see in the project file but this isnt causing any problems in 17.12 either

Offline devdzt

  • Single posting newcomer
  • *
  • Posts: 4
Re: 20.03 forgets settings when closed
« Reply #3 on: July 09, 2020, 12:06:10 pm »
ok so i was just trying to open the project file i pasted here in 20.03 and saving it to see what kind of changes were made and there were no problems.
the thing i did different though was launch codeblocks directly with codeblocks.exe instead of CbLauncher.exe. when using CbLauncher.exe and opening the project i get the problems i was having before with the compiler not being set for the project and all the settings erased, at least the first time. i closed WITHOUT saving and tried opening the project again with CbLauncher.exe and it seems to remember everything now even though it was messed up right before that with CbLauncher.exe.

the project file looks identical except i guess i used a different label when setting up the compiler after i deleted the AppData folder. the compiler is now named "mingw-w64_8_1_0" in codeblocks and in the project file.
not sure if that is what made the difference or saving the project when i launched with codeblocks.exe

im assuming one executable uses "%USERPROFILE%/AppData" and the other uses the AppData folder in codeblocks folder, i was exclusively using CbLauncher.exe before though so im not sure why it wasnt saving.
« Last Edit: July 09, 2020, 12:18:26 pm by devdzt »

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: 20.03 forgets settings when closed
« Reply #4 on: July 09, 2020, 02:13:47 pm »
Quote
im assuming one executable uses "%USERPROFILE%/AppData" and the other uses the AppData folder in codeblocks folder, i was exclusively using CbLauncher.exe before though so im not sure why it wasnt saving.
exactly. The CbLauncher is meant to be used in a portable installation, and in normal cases codeblocks.exe should be used...

so the "problem" is solved?

Offline devdzt

  • Single posting newcomer
  • *
  • Posts: 4
Re: 20.03 forgets settings when closed
« Reply #5 on: July 09, 2020, 05:04:54 pm »
yea this does seem to be "solved" if it was ever actually a problem.