pyscripter 694 Posted December 15, 2022 Project Magician by @Uwe Raabe is such a great idea, but somehow every time I decide to use it, I end up regretting it. This time the issue relates to custom manifest files. My project had one, but after activating Project Magician, saving and building my project this custom manifest file was not included. My application was released with a wrong manifest file. I went to Project Options, set it again, save my project, close, open again, the setting disappeared. What am I doing wrong? Delphi does not allow me to set the custom manifest for all configurations. It has to be set for each configuration individually. Share this post Link to post
MarkShark 27 Posted December 15, 2022 I use Project Magician, but I don't use custom manifests, so this may or may not be helpful! In the help file it mentions that the child configurations cleaning setting "Application Settings" affects Icons, Manifest File, Output Settings and Appearance, and so that setting is probably what's clearing the child settings in this case. You can clear that setting to see if it helps. What I'd love is for Uwe to open source the tool, but it's definitely been useful to me "as is". I use addition custom .optset files to set version info and such but doing so is undocumented at best. 1 Share this post Link to post
Uwe Raabe 2064 Posted December 15, 2022 Correct! That is the setting that allows to set the custom manifest for all configurations. 1 Share this post Link to post
pyscripter 694 Posted December 15, 2022 (edited) 57 minutes ago, Uwe Raabe said: Correct! That is the setting that allows to set the custom manifest for all configurations. In Project Magician options "Clear Application Settings" is set on by default. But I still cannot set Manifest options for all configurations. How do I do that? Update: RTDS "All application settings in child configurations are removed and the base settings put in charge again. This effects the Icons, Manifest File, Output Settings and Appearance. Application settings are always platform based and thus the settings in the platform base configuration are the ones to be kept." I need to set them for each platform. Edited December 15, 2022 by pyscripter Share this post Link to post
Uwe Raabe 2064 Posted December 15, 2022 Which platforms are in that project? Background: There already is some special handling with Version Info on Windows-only and mixed platform projects. Perhaps that needs to be done for some application settings, too. Share this post Link to post
pyscripter 694 Posted December 15, 2022 (edited) 20 minutes ago, Uwe Raabe said: Which platforms are in that project? Win32 and Win64. The problem was that the following was in the project file: <PropertyGroup Condition="'$(Cfg_2)'!=''"> <DCC_Define>DEBUG;$(DCC_Define)</DCC_Define> <Manifest_File>$(BDS)\bin\default_app.manifest</Manifest_File> </PropertyGroup> which was overriding the platform settings. I don't know how this got into the project file. Project Magician was not cleaning it and this was overriding the platform settings. After deleting the Manifest line in the above, things seem to work as expected. One more question. I have a build event defined for all configurations. Delphi keeps one replicating that for every configuration: <PropertyGroup Condition="'$(Config)'=='Debug' And '$(Platform)'=='Win32'"> <PreBuildEvent/> <PreBuildEventIgnoreExitCode>False</PreBuildEventIgnoreExitCode> <PreLinkEvent/> <PreLinkEventIgnoreExitCode>False</PreLinkEventIgnoreExitCode> <PostBuildEvent>copy "$(BDS)\Redist\$(Platform)\WebView2Loader.dll" $(OUTPUTDIR) </PostBuildEvent> <PostBuildEventIgnoreExitCode>False</PostBuildEventIgnoreExitCode> </PropertyGroup> The above is replicated for all configurations. Even when I manually delete the above from the project file manually, Delphi recreates it. Any idea why? Could that be cleaned up? Edited December 15, 2022 by pyscripter Share this post Link to post
programmerdelphi2k 237 Posted December 15, 2022 just unchecking "Inherit" (on Event) does not works? Share this post Link to post
Uwe Raabe 2064 Posted December 15, 2022 27 minutes ago, pyscripter said: I don't know how this got into the project file. Project Magician was not cleaning it and this was overriding the platform settings OK, I will try to reproduce. Which Delphi version are we talking about? Share this post Link to post
pyscripter 694 Posted December 15, 2022 6 minutes ago, Uwe Raabe said: OK, I will try to reproduce. Which Delphi version are we talking about? Alexandria with patches. Share this post Link to post
pyscripter 694 Posted December 15, 2022 10 minutes ago, programmerdelphi2k said: just unchecking "Inherit" (on Event) does not works? If you uncheck the event inherit in derived configurations, then you would need to define it again. The question is why Delphi replicates an event defined for All Configurations for each configuration and how you can prevent that. Share this post Link to post
programmerdelphi2k 237 Posted December 15, 2022 in my test I have just one definition "inherited" (to Debug, but dont to Release)... but my definition is in "All configuration option on tree" just one setup is defined on DPROJ = "release"!!! but dont "debug" <PropertyGroup Condition="'$(Base_Win32)'!=''"> <DCC_UsePackage>vclwinx;DataSnapServer;bdertl;fmx;emshosting;vclie;DbxCommonDriver;bindengine;IndyIPCommon;VCLRESTComponents;DBXMSSQLDriver;FireDACCommonODBC;emsclient;FireDACCommonDriver;appanalytics;IndyProtocols;vclx;IndyIPClient;dbxcds;vcledge;bindcompvclwinx;FmxTeeUI;emsedge;bindcompfmx;DBXFirebirdDriver;inetdb;ibmonitor;FireDACSqliteDriver;DbxClientDriver;FireDACASADriver;Tee;soapmidas;vclactnband;TeeUI;fmxFireDAC;dbexpress;FireDACInfxDriver;DBXMySQLDriver;VclSmp;inet;DataSnapCommon;vcltouch;fmxase;DBXOdbcDriver;dbrtl;FireDACDBXDriver;FireDACOracleDriver;fmxdae;TeeDB;FireDACMSAccDriver;CustomIPTransport;FireDACMSSQLDriver;AzureCloud;DataSnapIndy10ServerTransport;DataSnapConnectors;vcldsnap;DBXInterBaseDriver;FireDACMongoDBDriver;IndySystem;FireDACTDataDriver;vcldb;ibxbindings;inetdbbde;vclFireDAC;office2K;bindcomp;FireDACCommon;DataSnapServerMidas;FireDACODBCDriver;emsserverresource;IndyCore;RESTBackendComponents;bindcompdbx;rtl;FireDACMySQLDriver;FireDACADSDriver;RESTComponents;DBXSqliteDriver;vcl;IndyIPServer;dsnapxml;dsnapcon;DataSnapClient;DataSnapProviderClient;adortl;DBXSybaseASEDriver;DBXDb2Driver;vclimg;DataSnapFireDAC;emsclientfiredac;FireDACPgDriver;FireDAC;FireDACDSDriver;inetdbxpress;xmlrtl;tethering;ibxpress;bindcompvcl;dsnap;CloudService;DBXSybaseASADriver;DBXOracleDriver;FireDACDb2Driver;DBXInformixDriver;vclib;fmxobj;bindcompvclsmp;DataSnapNativeClient;FMXTee;DatasnapConnectorsFreePascal;soaprtl;vcldbx;soapserver;FireDACIBDriver;$(DCC_UsePackage)</DCC_UsePackage> <DCC_Namespace>Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)</DCC_Namespace> <BT_BuildType>Debug</BT_BuildType> <VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo> <VerInfo_Locale>1033</VerInfo_Locale> <Manifest_File>$(BDS)\bin\default_app.manifest</Manifest_File> <PostBuildEvent><![CDATA[MyForm.exe]]></PostBuildEvent> <AppDPIAwarenessMode>none</AppDPIAwarenessMode> </PropertyGroup> ... </ProjectExtensions> <Import Project="$(BDS)\Bin\CodeGear.Delphi.Targets" Condition="Exists('$(BDS)\Bin\CodeGear.Delphi.Targets')"/> <Import Project="$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj" Condition="Exists('$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj')"/> <Import Project="$(MSBuildProjectName).deployproj" Condition="Exists('$(MSBuildProjectName).deployproj')"/> <PropertyGroup Condition="'$(Config)'=='Release' And '$(Platform)'=='Win32'"> <PreBuildEvent/> <PreBuildEventIgnoreExitCode>False</PreBuildEventIgnoreExitCode> <PreLinkEvent/> <PreLinkEventIgnoreExitCode>False</PreLinkEventIgnoreExitCode> <PostBuildEvent>MyForm.exe</PostBuildEvent> <PostBuildEventIgnoreExitCode>False</PostBuildEventIgnoreExitCode> </PropertyGroup> </Project> Share this post Link to post
programmerdelphi2k 237 Posted December 15, 2022 having "Debug + Release" inheriting... <PropertyGroup Condition="'$(Config)'=='Debug' And '$(Platform)'=='Win32'"> <PreBuildEvent/> <PreBuildEventIgnoreExitCode>False</PreBuildEventIgnoreExitCode> <PreLinkEvent/> <PreLinkEventIgnoreExitCode>False</PreLinkEventIgnoreExitCode> <PostBuildEvent>MyForm.exe</PostBuildEvent> <PostBuildEventIgnoreExitCode>False</PostBuildEventIgnoreExitCode> </PropertyGroup> <PropertyGroup Condition="'$(Config)'=='Release' And '$(Platform)'=='Win32'"> <PreBuildEvent/> <PreBuildEventIgnoreExitCode>False</PreBuildEventIgnoreExitCode> <PreLinkEvent/> <PreLinkEventIgnoreExitCode>False</PreLinkEventIgnoreExitCode> <PostBuildEvent>MyForm.exe</PostBuildEvent> <PostBuildEventIgnoreExitCode>False</PostBuildEventIgnoreExitCode> </PropertyGroup> </Project> Share this post Link to post
programmerdelphi2k 237 Posted December 15, 2022 many platforms: win/lin/and/mac many mode! 32/64 Share this post Link to post
vfbb 285 Posted December 15, 2022 @Uwe Raabe I also wanted to suggest adding a flag to remove the jars. If I remove the android jars from a dproj, I can use the same dproj in any version of Delphi (the IDE will set the default jars when open it). But if I don't remove it, I have to do a 'Revert To Defaults' when I open the project (and an amateur programmer doesn't even know this, will compile and see an error and give up). The solution would be: either add a flag to remove them or check if the list of jars is the defaults of some version of RAD Studio and if it will remove it automatically. Share this post Link to post