Editing CodeBlocks WxSmiths project - wxwidgets

I have an old project done in CodeBlocks WxSmiths. I copied it across to my new computer and now I cannot make any changes to the project! I can add items to a panel on the main frame (and the preview looks fine) but the changes are discarded when I compile and run the project. All I get is the old project executable without my new additions! (I did clean build as well). Or in other words a main frame cpp file and header file is not getting updated with the new changes I make to the form. The files are not read-only. Do anybody have any ideas as why this happens?

This most likely is the case when you have wxSmith files pointing to incorrect source files.
Open the project file (using your favorite editor) and check the Extensions xml tag:
<Extensions>
<code_completion />
<debugger />
<wxsmith version="1">
<gui name="wxWidgets" src="src/wxExampleApp.cpp" main="wxExample" init_handlers="necessary" language="CPP" />
<resources>
<wxPanel wxs="wxsmith/somePanel.wxs" src="src/somePanel.cpp" hdr="src/somePanel.h" name="windowTabPanel" language="CPP" />
</resources>
</wxsmith>
<envvars />
</Extensions>
Make sure that your src and hdr files point to the correct source files you have in your project.
Otherwise wxSmith won't be able to update those files based on the changes made from the RAD view.

Related

How Can We Determine Which App.Config File Is Loading in VSTO Outlook Add-In?

We have a very strange problem with our VSTO Add-In.
In our Add-In there are label controls that read label text values from an app.config file and display text from the configuration file to the user:
<!-- app.config -->
<configuration>
<configSections>
...
</configSections>
<!-- start applicationSettings -->
<applicationSettings>
<OurVSTOAddIn.MySettings>
<setting name="ackMsg" serializeAs="String">
<value>Some text here that we want to display and change</value>
</setting>
...
<OurVSTOAddIn.MySettings>
</applicationSettings>
</configuration>
'vb.net code
objCheckDialog.lblAttachmentsMsg.Text = My.Settings("attachmentsAckMsg").ToString()
objCheckDialog.lblAttachmentsMsg.Visible = True
We recently updated the app.config file to replace English display information with Kanjii for our end-users in Japan.
When we rebuilt the MSI and installed on our test machine, the add-in isn't displaying Kanjii (although it display correctly in development).
Now we're wondering if the configuration file in the installation directory is being read at all or if the information is cached or the add-in is reading from another file somewhere.
What's even more strange is that we've changed other values in our app.config file that are being used in code logic, and these seem to load properly.
We're currently using Procmon in an effort to find out how the config file is loaded, however, while filtering on the following:
Process Name contains Outlook
Path Contains "OurOutlookPlugInName"
This produces over 400 results but we don't see any file handling for our config file unless I debug the code in Visual Studio.
On our installation machine, we also removed the configuration file from the installation directory thinking this might be a clue as to whether the Add-In is reading the configuration file from the installation directory, but it had no effect, and the Add-In loaded normally displaying English instead of Kanjii again.
All of the configuration settins are at the Application Level.
Is there a way for us to tell where our Add-In is loading our configuration file from?
Have we done something incorrect in our MSI build that would prevent the updated configuration file from loading?
UPDATE:
I opened the dll file in the C:\Program Files (x86)\OurVSTOAddIn installation directory using Telerik JustDecompile to see if the configuration settings were written somewhere in the dll and I can see that under OurVSTOAddIn->My Settings there are definitely DefaultSettingValues there, as shown below:
This would make sense since these are Application Scoped Settings and this would prevent a user from changing config settings.
But I'm thinking if we use Application Scoped variables, each time we'll need to rebuild the msi for release, which doesn't make sense to me since the reason we want to use configuration settings for the project is to not need to rebuild for configuration changes.

MSBUILD Dynamically Create Config XML Dotfuscator

I am trying to obfuscate bunch of files in a directory and every build there are more and more files being generated. I would like to know if there is a way I can dynamically create the Dotfuscator configuration xml file using a MSBUILD task that will generate the xml file every time there is a new file added to the directory?
This might be a good time to use the Directory input. Rather than representing a single assembly (.exe or .dll), this type of Dotfuscator input captures all the assemblies in a directory. When the contents of the directory change, Dotfuscator's build will automatically pick up any new assemblies.
To make a Dotfuscator config file with a Directory input, open the GUI and add an input as you normally would (directions for Community Edition's GUI and for Professional Edition's standalone GUI), but instead of selecting a file from the Browse... dialog, just navigate to the directory and click "Open" while the "File name" is still listed as "Folder Select". Then, save your configuration.
From now on, whenever you run Dotfuscator (whether from the standalone GUI, the command line, the Visual Studio integration, or the MSBuild task), all assemblies in the directory will be processed as input.
Note: If you look at the config file itself, you might be surprised that it will still list individual assemblies:
<input>
<loadpaths />
<asmlist>
<package refid="19e1b0c5-7221-476f-af4b-bafef68edc95">
<file dir="C:\code\BasicTestApp\BasicTestApp\bin" name="Debug" />
<asmlist>
<inputassembly refid="a6da5d8d-c181-4103-840d-d8cc7c85937a">
<option>honoroas</option>
<option>stripoa</option>
<option>transformxaml</option>
<file dir="" name="BasicTestApp.exe" />
</inputassembly>
<inputassembly refid="df84dad0-fbe8-49ab-b8c8-9fb59e706785">
<option>honoroas</option>
<option>stripoa</option>
<option>library</option>
<option>transformxaml</option>
<file dir="" name="ClassLibrary.dll" />
</inputassembly>
</asmlist>
</package>
</asmlist>
</input>
Despite this layout, Dotfuscator will process all assemblies in the C:\code\BasicTestApp\BasicTestApp\bin\Debug directory when it runs a build based off this config file, not just those two listed.
The assembly elements in the config are just there so that you can still make rules against individual assemblies in the GUI (e.g., to make one assembly be in Library Mode).
The list represents the state of the directory when the GUI last modified the config.
Disclaimer: I work for the Dotfuscator team, and am answering this question as part of my job.
Additional note due to clarification in the comments: the directory package has a feature where you can exclude certain assemblies from obfuscation. These assemblies will be treated as a Package Artifact and just copied from input-to-output without modification. Any obfuscated assemblies that refer to these excluded assemblies will still be processed correctly.
To do this in the GUI, right-click on the assembly within the package, and select "Exclude assembly from package". Or, if you'd prefer to edit the config file, add the following <option> tag as a child of each relevant <inputassembly> tag:
<option>artifact</option>
The latest Dotfuscator version 4.41.1 has the latest flag
true
This will generate the Dotfuscator config file if the file is missing. Also you can add this to the csproj as documented in the latest getting started guide https://www.preemptive.com/dotfuscator/pro/userguide/en/getting_started_protect.html

JavaFX - (IntelliJ) FXML loader (NullPointerException: Location is required)

I get a NullPointerException for FXML loader when I execute the below in IntelliJ, but not in Eclipse IDE
Parent root = FXMLLoader.load(getClass().getResource("/view/MainView.fxml"));
Please note, the project is the same (not copy) opened in the 2 IDE's simultaneously, since it is the same project opened, the file / folder structure is the same. My search in this forum & on google for this specific issue so far has drawn blanks.
Seek guidance as to what settings I need to check / change in the IntelliJ to get it working?
Managed to resolve this finally.
I re-imported the project to IntelliJ as a Gradle project & added the steps in Gradle Build file as mentioned in the link earlier.
The same error occured to me. My project used to be a Maven project, but I tried to remove all of those components. It appears I didn't quite succeed in doing so.
I noticed that the fxml files were not properly copied into the target directory.
In .idea/compiler.xml I changed the following line:
<profile name="Maven default annotation processors profile" enabled="true">
to now read:
<profile name="Maven default annotation processors profile" enabled="false">
This fixed the problem and allowed the FXMLLoader to find the fxml file.

Rad file generated by eclipse

What is the use of this file in a RAD : org.eclipse.wst.common.component. The contents are like this:
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
<wb-module deploy-name="WebProj">
<wb-resource deploy-path="/" source-path="/src/java"/>
<wb-resource deploy-path="/" source-path="/test"/>
<wb-resource deploy-path="/" source-path="/test/conf"/>
<wb-resource deploy-path="/" source-path="/src/conf"/>
<property name="java-output-path" value="src/java"/>
</wb-module>
</project-modules>
In RAD,the builds are integrated with Eclipse and so there are all these oddball files that you may not recognize if you are not used to dealing with RAD/Websphere. It looks like this one configures the context root and what source directories to build out for the web app. In RAD, you're not supposed to edit these files directly--there is an (often obscure) UI for everything. There is also an equally obscure way to script everything in each UI, too.

How to add a file to MonoDevelop Packaging project

This seems like a simple question, but I can't find it documented anywhere.
I'd like to add a ReadMe.txt file to the zipped binary archive in my MonoDevelop Packaging project.
I tried this:
<Package name="Linux Binaries">
<Builder targetFile="..\script-keeper-bin-linux.zip" platform="Linux" configuration="Release" ctype="BinariesZipPackageBuilder">
<ChildEntries>
<SolutionItemReference path="..\Keeper.OfScripts\Keeper.OfScripts.csproj" />
<!-- ************************************** -->
<!-- This is where I tried to add the file. -->
<SolutionItemReference path="..\Keeper.OfScripts\ReadMe.txt" />
</ChildEntries>
<ExcludedFiles>
<File>Keeper.OfScripts,ProgramFiles,System.Web.Mvc.dll</File>
</ExcludedFiles>
<RootEntry path="..\Keeper.OfScripts.sln" id=":root:" />
</Builder>
</Package>
But nothing got added (the package did build correctly, but it omitted the ReadMe.txt file).
Is this is same syntax as an MSBuild file? Either way, I can't find anything that helps.
Thanks.
Update:
Well, I thought I set the build-action to Content and properties to Copy to Output Directory for ReadMe.txt, but I didn't. If you set those things, then the file will be included in your package.
Doing so also checks the Include in deploy box in the file's property window.
The way packaging projects work is somewhat strange. The format is not currently compatible with MSBuild, despite the file header. Essentially, a packaging project only includes projects - the list of included projects can be edited in the package options. The files that are included from each project are controlled using the property grid when the files are selected in the solution tree. When the packaging project is built, it can generate several different kinds of package, but they all have the same sources.