custom splashscreen not showing with ionic and phonegap build (3.5.0) - splash-screen

I'm referring to phonegap doc here:
http://docs.build.phonegap.com/en_US/configuring_icons_and_splash.md.html
yet can't have the splashscreen to show after building ( build via phonegap build service, not locally )
relevant ( I suppose ) config.xml lines:
<gap:plugin name="org.apache.cordova.splashscreen" />
<gap:splash src="splash.png" />
<preference name="webviewbounce" value="false"/>
<preference name="UIWebViewBounce" value="false"/>
<preference name="DisallowOverscroll" value="true"/>
<preference name="BackupWebStorage" value="none"/>
<preference name="SplashScreen" value="screen" />
<preference name="SplashScreenDelay" value="3000" />
splash.png is in the root, as is config.xml, is a 480x800 PNG (32-bit color)
I'm building with phonegap 3.5.0 selected; pulling from the git for the ionic project ( so no local 'platforms' dir in the way, since it's in ionic .gitignore.
I also tried the
<gap:splash src="res/screen/android/screen-ldpi-portrait.png" gap:platform="android" gap:qualifier="port-ldpi" />
options to no result ('res/screen... dirs also starting from the root where config resides')
I have made no specific splash show/hide code in the app, is this mandatory ? I just want the splash to show for a fixed bunch of seconds...

My advice is twofold:
First, use PGB 3.6.3. Not only is 3.5 outdated, it also has a security flaw in Android that means apps will be removed from the Past Store.
Second (re: your problem). Go back to basics - follow the PGB docs on splash screens in the simplest way possible.
I don't know what the issue, it looks OK to me, but there are a few preferences you have that I don't use and it works fine for me. I'd expand more but I'm on a mobile. I'll check it out in detail later.

Related

How adapt extension to Visual Studio 2019?

I read that adapting of extension for VS 2019 is quite easy - https://devblogs.microsoft.com/visualstudio/visual-studio-extensions-and-version-ranges-demystified/#.
But I got an error if I do all the actions from the post:
It's not possible to install because there is no following links:
Microsoft.VisualStudio.Component.CoreEditor.
The author of the post shows the exactly same row when he adapts his extensions:
<Prerequisite Id="Microsoft.VisualStudio.Component.CoreEditor" Version="[15.0,)" />
So it seems that this prerequisite was not a problem for him.
My updated extension.vsixmanifest is:
<?xml version="1.0" encoding="utf-8"?>
<PackageManifest Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011">
<Metadata>
<Identity Id="PowerQuerySDK.Microsoft.30831070-f420-4649-a031-6f679996b182" Version="1.0.0.20" Language="en-US" Publisher="Microsoft" />
<DisplayName>Power Query SDK</DisplayName>
<Description xml:space="preserve">A Power Query language service for Visual Studio</Description>
<License>Microsoft Power Query SDK - Pre-Release or Evaluation Use Terms.rtf</License>
<Icon>dataconnector_128.png</Icon>
<PreviewImage>EATIcon.ico</PreviewImage>
</Metadata>
<Installation>
<InstallationTarget Id="Microsoft.VisualStudio.Community" Version="[14.0,17.0)" />
<InstallationTarget Version="[14.0,17.0)" Id="Microsoft.VisualStudio.Pro" />
<InstallationTarget Version="[14.0,17.0)" Id="Microsoft.VisualStudio.Enterprise" />
</Installation>
<Dependencies>
<Dependency Id="Microsoft.Framework.NDP" DisplayName="Microsoft .NET Framework" Version="[4.5,)" />
</Dependencies>
<Assets>
<Asset Type="Microsoft.VisualStudio.ProjectTemplate" Path="ProjectTemplates" />
<Asset Type="Microsoft.VisualStudio.ItemTemplate" Path="ProjectTemplates" />
<Asset Type="Microsoft.VisualStudio.VsPackage" Path="Dependencies\Microsoft.Mashup.Tools.VisualStudio.pkgdef" />
<Asset Type="Microsoft.VisualStudio.MefComponent" Path="Dependencies\Microsoft.Mashup.Tools.VisualStudio.dll" />
</Assets>
<Prerequisites>
<Prerequisite Id="Microsoft.VisualStudio.Component.CoreEditor" Version="[15.0,)" />
</Prerequisites>
</PackageManifest>
Please could you say what may be the workaround for the problem?
I found the solution for the problem. It is in catalog.json file inside PowerQuerySdk.vsix file. You should change part of the file from:
"Microsoft.VisualStudio.Component.CoreEditor":"[15.0,16.0)"}
to:
"Microsoft.VisualStudio.Component.CoreEditor":"[15.0,17.0)"}
.
I didn't suspect that the mention of CoreEditor may be in this file. But obviously you should change the version of MSBuild to 17, just as you should do in extension.vsixmanifest, as it is described in the post of Mads Kristensen above.
Up to now all works fine for me :-).
I also ran into this issue while porting a Visual Studio Extension forward from 2017 to 2019.
The change was 2-fold:
Firstly updating the 'Installation Target' range in the 'vsixmanifest' file.
Secondly, updating the Prerequisite 'Microsoft.VisualStudio.Component.CoreEditor'
Below is an example of the Manifest file I changed.
Pull Request
Mads Kristensen's original Blog Post on forward porting Visual Studio Extensions from VS 2017 to VS 2019.

Impersonating different users during install in WiX setup

I've just created a WiX v3.5 installer to install my Web application to IIS7. I have custom actions to allow the user to choose which website and app pool they want and to name the Virtual directory via the dialogs.
But now I've come to authentication and I'm stumped. I am trying to enable impersonation and allow the user to enter their impersonation login and password. I had this working fine in my Visual Studion 2010 setup projects so now I need to replicate the same in WiX.
Aparently this can be done via an appcmd as per this question: Is setting "ASP.NET Impersonation" possible using WiX 3.x with IISExtension? but I can't seem to get this working. Can i add this in my product.wxs and wrap it in a custom action? Any ideas anyone? Any help would be appreciated?
appcmd set config /commit:WEBROOT/section:identity /impersonate:true
Hi I managed to get this working myself , so if anyone else is having the same issue , i fixed this by modifying my web.config during my install:
To do this i added the following code to my product.wsx to edit my web.config , using properties which i assigned to text boxes in a new dialog to allow the user to enter the impersonation username and password on install :
<Component Id="Web.config" Guid="2ED81B77-F153-4003-9006-4770D789D4B6">
<File Id="Web.config" Name="Web.config" Source="$(var.SolutionDir)MyWebApp\Web.config" DiskId="1" KeyPath="yes" />
<util:XmlFile Id="system.webidentity" File="[INSTALLLOCATION]Web.config" Action="createElement" ElementPath="/configuration/system.web" Name="identity" Sequence="1" />
<util:XmlFile Id="system.webIdentityAttribute" Action="setValue" File="[INSTALLLOCATION]Web.config" ElementPath="/configuration/system.web/identity" Name="impersonate" Value="true" Sequence="2" />
<util:XmlFile Id="system.webIdentityAttribute2" Action="setValue" File="[INSTALLLOCATION]Web.config" ElementPath="/configuration/system.web/identity" Name="password" Value="[IMPERSONATIONUSERPASSWORD]" Sequence="3" />
<util:XmlFile Id="system.webIdentityAttribute3" Action="setValue" File="[INSTALLLOCATION]Web.config" ElementPath="/configuration/system.web/identity" Name="userName" Value="[IMPERSONATIONUSER]" Sequence="4" />
Note if you are adding your files automatically to your Wix project using msbuild and heat , you'll have to ensure you arent copying your web.config here , or if you are , remove my web.config your Target settings. Otherwise you'll get duplication errors .
<Target Name="BeforeBuild">
<MSBuild Projects="%(ProjectReference.FullPath)" Targets="Package" Properties="Configuration=$(Configuration);Platform=AnyCPU" Condition="'%(ProjectReference.PackageThisProject)'=='True'" />
<Delete Files="%(ProjectReference.RootDir)%(ProjectReference.Directory)obj\$(Configuration)\Package\PackageTmp\web.config">
</Delete>
<PropertyGroup>
<LinkerBaseInputPaths>%(ProjectReference.RootDir)%(ProjectReference.Directory)obj\$(Configuration)\Package\PackageTmp\</LinkerBaseInputPaths>
</PropertyGroup>
<HeatDirectory OutputFile="%(ProjectReference.Filename).wxs" Directory="%(ProjectReference.RootDir)%(ProjectReference.Directory)obj\$(Configuration)\Package\PackageTmp\" DirectoryRefId="INSTALLLOCATION" ComponentGroupName="%(ProjectReference.Filename)_Project" SuppressCom="true" SuppressFragments="true" SuppressRegistry="true" SuppressRootDirectory="true" AutoGenerateGuids="false" GenerateGuidsNow="true" ToolPath="$(WixToolPath)" Condition="'%(ProjectReference.PackageThisProject)'=='True'" /> </Target>

Flex 4.5.1 runtime ReferenceError: Error #1065: Variable ... is not defined

Ok, I need some help on this one. I upgraded from Flash Builder 4 to Flash Builder 4.5 and have switched my project to the 4.5.1 sdk. I use an ant script to build my project, so I modified it to use the appropriate flexTasks.jar, mxmlc, etc...
Now, if I start out with a blank bin-debug folder, then build and run the app everything works fine. However, if I then make a code change and build (without deleting the bin-debug) then run the app I get a runtime error:
ReferenceError: Error #1065: Variable ... is not defined.
at flash.display::MovieClip/nextFrame()
at mx.managers::SystemManager/deferredNextFrame()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\managers\SystemManager.as:284]
at mx.managers::SystemManager/preloader_preloaderDocFrameReadyHandler()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\managers\SystemManager.as:2633]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.preloaders::Preloader/timerHandler()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\preloaders\Preloader.as:515]
at flash.utils::Timer/_timerDispatch()
at flash.utils::Timer/tick()
Again, if I delete the bin-debug folder and compile again it runs with no problems.
The variable it complains about is always a Class variable that points to an image file used as an icon. The code I use to create the var:
[Embed(source="/assets/icons/close-32x32.png")]
public var closeIcon:Class;
The file exists, and I verified that when it gives that error the file is in the bin-debug/assets/icons folder and the src/assets/icons/ folder.
After the error is thrown, if I hit the continue button in Flash Builder it then throws the same error again on the next Class variable pointing to an image file.
Any ideas? The delete/recompile takes several minutes, so obviously this is driving me mad.
Edit: Ant task that compiles in debug mode:
<target name="compile-debug">
<echo>Compile MXML</echo>
<mxmlc
file="${SRC_DIR}/${MAIN_SOURCE_FILE}"
debug="true"
optimize="false"
output="${DEBUG_DIR}/${APP_ROOT_FILE}"
append="true"
actionscript-file-encoding="UTF-8"
keep-generated-actionscript="false"
link-report="MyReport.xml"
maxmemory="2048m"
incremental="true">
<!-- Get default compiler options. -->
<load-config filename="${FLEX_HOME}/frameworks/flex-config.xml"/>
<load-config filename="${FLEX_HOME}/frameworks/air-config.xml"/>
<!-- List of path elements that form the roots of ActionScript class hierarchies. -->
<source-path path-element="${FLEX_HOME}/frameworks"/>
<!-- Include Themes -->
<!-- NOTE: Spark theme required -->
<theme dir="${FLEX_HOME}/frameworks/themes/Spark/">
<include name="spark.css" />
</theme>
<theme dir="${FLEX_HOME}/samples/themes/spark_graphite/">
<include name="spark_graphite.css" />
</theme>
<!-- List of SWC files or directories that contain SWC files. -->
<compiler.library-path dir="${FLEX_HOME}/frameworks" append="true">
<include name="libs" />
<include name="../bundles/{locale}" />
</compiler.library-path>
<!-- uncomment if you have external libs (swc files) -->
<library-path dir="${LIB_DIR}/riaspace/" append="true">
<include name="*.swc" />
</library-path>
<library-path dir="${LIB_DIR}/AlivePDF/" append="true">
<include name="*.swc" />
</library-path>
<library-path dir="${LIB_DIR}/coltware/" append="true">
<include name="*.swc" />
</library-path>
</mxmlc>
</target>
Where FLEX_HOME = < path to flash builder >/sdks/4.5.1
The answer is buried in the middle of Maxim's post that he referenced in a comment above:
--> Try turning off incremental compilation.
I had the same issue here with a simple mimeType='application/octet-stream' embed, and when reading Maxim's text this jumped out because I'd recently changed my custom build tools to use inremental compilation: "Embed sometimes fails during incremental compilation"
The result of this failure is that the .swf contains something like this:
<DefineBinaryData id='1' length='1024' />
which looks like it's empty, instead of this (from the working file):
<DefineBitsLossless2 id='1' encoding='base64'>
(.. in my case, 1024 bytes of base64-encoded data)
</DefineBitsLossless2>
(This solved it for me, so a big thank-you to Maxim. I hope it solves it for you too.)
I had the same problem, so I "Clean"ed the project and then re ran. It worked.
I have Flash Builder 4.7 and am using sdk 4.5.1A.
I was using Flash Player debugger version 15 before Christmas of 2014 and everything was working. I had Firefox set up as the default browser. However, in 2015, Adobe has a new player so I upgraded to version 16 and that's when I got the same problem. After much struggle, I found that the problem had to do with the new version of Firefox Flash player debugger. I had to switch the default browser to Internet Explorer and installed the Internet Explorer Flash player debugger. Prior to debugging, I had to clean and update first. Then everything worked again!

How do I enable Directory Browsing for an virtual web directory using wix?

I want to enable "Directory Browsing" for the for the following virtual web directory using WIX.
<iis:WebVirtualDir Id="LogsVirDir" Alias="Logs" Directory="ESGLOGFILES" />
How do I accomplish this using WIX?
Wouldn't a simpler solution be to use the web.config system.webserver property like :
<directoryBrowse enabled="true"/>
Based on my research Wix currently does not have any capability to enable Directory Browsing using the standard set of actions. The one way I have found to do this is using a combination of Wix Custom Actions and IIS's Appcmd.exe. Note this command will create a web.config file if one does not exist.
<CustomAction Id="EnableDirectoryBrowsing"
Execute="deferred"
ExeCommand='[WindowsFolder]system32\inetsrv\APPCMD.EXE set config "ESG Website/logs" /section:directoryBrowse /enabled:true'
Directory="TARGETDIR"
Return="check"
Impersonate="no"/>
<InstallExecuteSequence>
<Custom Action="EnableDirectoryBrowsing" Before="InstallFinalize">Not Installed</Custom>
</InstallExecuteSequence>
Im using wix v3.8
try adding ConfigurableDirectory in your Feature
ex: <Feature Id='TestName' Title='Test Web' ConfigurableDirectory='INSTALLDIR' Level='1'>
Use the following code
<Control Id="Browse" Type="PushButton" X="304" Y="210" Width="56" Height="17" Text="!(loc.CustomizeDlgBrowse)">
<Publish Event="SelectionBrowse" Value="BrowseDlg">1</Publish>
</Control>
Take the value of this in the variable you want and use it.

Flash Builder (Flex) ANT build and Debug

I'm trying to use ANT with Flash Builder 4 to compile and debug.
The compiling is the easy part but having trouble to get the debugger to work.
I want to use ANT to Debug SWF file inside Flash Builder, so that breakpoints, console traces and everything works as it should.
My script so far. Builds The *.as to *.swf and moves from bin-debug to deploy folder. How can I start a Flash Builder Debugger for the created SWF?
<target name="Compile level 1">
<antcall target="compile flex file">
<param name="file" value="GameOffice"/>
</antcall>
<antcall target="open player">
<param name="file" value="GameOffice.swf"/>
</antcall>
</target>
<target name="compile flex file">
<mxmlc file="${SRC_DIR}/${file}.as" output="${BUILD_DIR}/${file}.swf"
actionscript-file-encoding="UTF-8"
keep-generated-actionscript="true"
incremental="true"
static-link-runtime-shared-libraries="true"
show-actionscript-warnings="true"
failonerror="true"
debug="true"
optimize="false">
<load-config filename="${FLEX_HOME}/frameworks/flex-config.xml" />
<source-path path-element="${FLEX_HOME}/frameworks" />
<compiler.include-libraries dir="${basedir}/libs" append="true">
<include name="HelloThereLibGames.swc" />
<include name="HelloThereLibStructure.swc" />
<include name="HelloThereLibUtils.swc" />
</compiler.include-libraries>
<metadata description="Hello There Production">
<contributor name="Fredrick Bäcker" />
</metadata>
</mxmlc>
<copy todir="${DEPLOY_DIR}" file="${BUILD_DIR}/${file}.swf"/>
</target>
I did a 1 try one hit on google: http://blogs.4point.com/armaghan.chaudhary/2009/04/remote-debugging-using-flex-builder-ide.html
I do not get why you would want to build with ant inside flashbuilder. Seems like crossing the stream for water?
IMHO automated build scripts belong in CI environments like hudson. I consider it doing myself a favor, letting my development environment handle the fuzz of local builds and debugging.
Anyways, best of luck
Assuming you are working off a local web server, you can simply open the debug socket in Flash Builder by setting your debug launch config to a blank html page (eg. about:blank) and then opening your browser to your localhost (or whatever url you've set up).
In this case you would run the build with ant, hit debug to open the socket, then switch over to your web browser and load localhost.
I realise this answer is probably a little late, but better late than never!
Is pretty simple really when you know how. I did a blog entry on it a while back that should show you how:
http://blog.tiltdigital.com/flex/running-flash-builder-4-in-debug-mode-from-apache-ant/
Basically you just need to add an Ant Builder to Flash Builder 'Builders' properties in your project properties. You can then use that to compile/debug using your build script as you'd normally do using the Flash Builder Compiler/Debugger.

Resources