Initial merge of WinJS UWP support
9
templates/winjs/hxml/debug.hxml
Normal file
@@ -0,0 +1,9 @@
|
||||
-main ApplicationMain ::HAXE_FLAGS::
|
||||
-js ::OUTPUT_FILE::
|
||||
-cp ::OUTPUT_DIR::/haxe
|
||||
-D html5
|
||||
-D html
|
||||
-D windows
|
||||
-D winjs
|
||||
-D uwp
|
||||
-debug
|
||||
11
templates/winjs/hxml/final.hxml
Normal file
@@ -0,0 +1,11 @@
|
||||
-main ApplicationMain ::HAXE_FLAGS::
|
||||
-js ::OUTPUT_FILE::
|
||||
-cp ::OUTPUT_DIR::/haxe
|
||||
-D html5
|
||||
-D html
|
||||
-D windows
|
||||
-D winjs
|
||||
-D uwp
|
||||
-D final
|
||||
-D js-flatten
|
||||
-dce full
|
||||
8
templates/winjs/hxml/release.hxml
Normal file
@@ -0,0 +1,8 @@
|
||||
-main ApplicationMain ::HAXE_FLAGS::
|
||||
-js ::OUTPUT_FILE::
|
||||
-cp ::OUTPUT_DIR::/haxe
|
||||
-D html5
|
||||
-D html
|
||||
-D windows
|
||||
-D winjs
|
||||
-D uwp
|
||||
6
templates/winjs/template/PowerShell_Set_Unrestricted.reg
Normal file
@@ -0,0 +1,6 @@
|
||||
Windows Registry Editor Version 5.00
|
||||
|
||||
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\1\ShellIds\Microsoft.PowerShell]
|
||||
"Path"="C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe"
|
||||
"ExecutionPolicy"="Unrestricted"
|
||||
|
||||
5
templates/winjs/template/source/css/default.css
Normal file
@@ -0,0 +1,5 @@
|
||||
body {
|
||||
/* Uncomment this to enable scrolling and zooming
|
||||
touch-action: manipulation;
|
||||
*/
|
||||
}
|
||||
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 7.5 KiB |
|
After Width: | Height: | Size: 2.9 KiB |
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
BIN
templates/winjs/template/source/images/StoreLogo.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 3.1 KiB |
52
templates/winjs/template/source/index.html
Normal file
@@ -0,0 +1,52 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>::APP_TITLE:: - ::guid::</title>
|
||||
<link href="css/default.css" rel="stylesheet" />
|
||||
<meta id="viewport" name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
::if favicons::::foreach (favicons)::
|
||||
<link rel="::__current__.rel::" type="::__current__.type::" href="::__current__.href::">::end::::end::
|
||||
|
||||
::if linkedLibraries::::foreach (linkedLibraries)::
|
||||
<script type="text/javascript" src="::__current__::"></script>::end::::end::
|
||||
<script type="text/javascript" src="./js/::APP_FILE::.js"></script>
|
||||
<script src="lib/winjs-4.0.1/js/base.js"></script>
|
||||
<script src="lib/winjs-4.0.1/js/ui.js"></script>
|
||||
<script>
|
||||
window.addEventListener ("touchmove", function (event) { event.preventDefault (); }, false);
|
||||
if (typeof window.devicePixelRatio != 'undefined' && window.devicePixelRatio > 2) {
|
||||
var meta = document.getElementById ("viewport");
|
||||
meta.setAttribute ('content', 'width=device-width, initial-scale=' + (2 / window.devicePixelRatio) + ', user-scalable=no');
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
html,body { margin: 0; padding: 0; height: 100%; overflow: hidden; }
|
||||
#content { background: #000000; width: ::if (WIN_RESIZABLE)::100%::elseif (WIN_WIDTH > 0)::::WIN_WIDTH::px::else::100%::end::; height: ::if (WIN_RESIZABLE)::100%::elseif (WIN_WIDTH > 0)::::WIN_HEIGHT::px::else::100%::end::; }
|
||||
::foreach assets::::if (type == "font")::
|
||||
@font-face {
|
||||
font-family: '::fontName::';
|
||||
src: url('::targetPath::.eot');
|
||||
src: url('::targetPath::.eot?#iefix') format('embedded-opentype'),
|
||||
url('::targetPath::.svg#my-font-family') format('svg'),
|
||||
url('::targetPath::.woff') format('woff'),
|
||||
url('::targetPath::.ttf') format('truetype');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}::end::::end::
|
||||
</style>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<script src="js/main.js"></script>
|
||||
|
||||
::foreach assets::::if (type == "font")::
|
||||
<span style="font-family: ::id::"> </span>::end::::end::
|
||||
|
||||
<div id="content"></div>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
73
templates/winjs/template/source/js/main.js
Normal file
@@ -0,0 +1,73 @@
|
||||
// For an introduction to the Blank template, see the following documentation:
|
||||
// https://go.microsoft.com/fwlink/?LinkId=232509
|
||||
|
||||
(function () {
|
||||
"use strict";
|
||||
|
||||
if(typeof Windows !== "undefined") {
|
||||
initUWP();
|
||||
} else {
|
||||
lime.embed ("::APP_FILE::", "content", ::WIN_WIDTH::, ::WIN_HEIGHT::);
|
||||
}
|
||||
|
||||
|
||||
function initUWP() {
|
||||
var app = WinJS.Application;
|
||||
var activation = Windows.ApplicationModel.Activation;
|
||||
var isFirstActivation = true;
|
||||
|
||||
app.onactivated = function (args) {
|
||||
if (args.detail.kind === activation.ActivationKind.voiceCommand) {
|
||||
// TODO: Handle relevant ActivationKinds. For example, if your app can be started by voice commands,
|
||||
// this is a good place to decide whether to populate an input field or choose a different initial view.
|
||||
}
|
||||
else if (args.detail.kind === activation.ActivationKind.launch) {
|
||||
// A Launch activation happens when the user launches your app via the tile
|
||||
// or invokes a toast notification by clicking or tapping on the body.
|
||||
if (args.detail.arguments) {
|
||||
// TODO: If the app supports toasts, use this value from the toast payload to determine where in the app
|
||||
// to take the user in response to them invoking a toast notification.
|
||||
}
|
||||
else if (args.detail.previousExecutionState === activation.ApplicationExecutionState.terminated) {
|
||||
// TODO: This application had been suspended and was then terminated to reclaim memory.
|
||||
// To create a smooth user experience, restore application state here so that it looks like the app never stopped running.
|
||||
// Note: You may want to record the time when the app was last suspended and only restore state if they've returned after a short period.
|
||||
}
|
||||
}
|
||||
|
||||
if (!args.detail.prelaunchActivated) {
|
||||
// TODO: If prelaunchActivated were true, it would mean the app was prelaunched in the background as an optimization.
|
||||
// In that case it would be suspended shortly thereafter.
|
||||
// Any long-running operations (like expensive network or disk I/O) or changes to user state which occur at launch
|
||||
// should be done here (to avoid doing them in the prelaunch case).
|
||||
// Alternatively, this work can be done in a resume or visibilitychanged handler.
|
||||
}
|
||||
|
||||
if (isFirstActivation) {
|
||||
// TODO: The app was activated and had not been running. Do general startup initialization here.
|
||||
Debug.writeln("app.onactivated isFirstActivation");
|
||||
lime.embed ("::APP_FILE::", "content", ::WIN_WIDTH::, ::WIN_HEIGHT::);
|
||||
document.addEventListener("visibilitychange", onVisibilityChanged);
|
||||
args.setPromise(WinJS.UI.processAll());
|
||||
}
|
||||
|
||||
isFirstActivation = false;
|
||||
};
|
||||
|
||||
function onVisibilityChanged(args) {
|
||||
if (!document.hidden) {
|
||||
// TODO: The app just became visible. This may be a good time to refresh the view.
|
||||
}
|
||||
}
|
||||
|
||||
app.oncheckpoint = function (args) {
|
||||
// TODO: This application is about to be suspended. Save any state that needs to persist across suspensions here.
|
||||
// You might use the WinJS.Application.sessionState object, which is automatically saved and restored across suspension.
|
||||
// If you need to complete an asynchronous operation before your application is suspended, call args.setPromise().
|
||||
};
|
||||
|
||||
app.start();
|
||||
}
|
||||
|
||||
|
||||
})();
|
||||
7304
templates/winjs/template/source/lib/winjs-4.0.1/css/ui-dark.css
Normal file
7304
templates/winjs/template/source/lib/winjs-4.0.1/css/ui-light.css
Normal file
26523
templates/winjs/template/source/lib/winjs-4.0.1/js/base.js
Normal file
54913
templates/winjs/template/source/lib/winjs-4.0.1/js/ui.js
Normal file
52
templates/winjs/template/source/package.appxmanifest
Normal file
@@ -0,0 +1,52 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Package
|
||||
xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
|
||||
xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest"
|
||||
xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
|
||||
IgnorableNamespaces="uap mp">
|
||||
|
||||
<Identity
|
||||
Name="e9d48192-1008-49be-8a59-932a3ef1a1ca"
|
||||
Version="::APP_VERSION::.::APP_BUILD_NUMBER::"
|
||||
Publisher="CN=Braden" />
|
||||
|
||||
<mp:PhoneIdentity PhoneProductId="e9d48192-1008-49be-8a59-932a3ef1a1ca" PhonePublisherId="00000000-0000-0000-0000-000000000000" />
|
||||
|
||||
<Properties>
|
||||
<DisplayName>::APP_TITLE::</DisplayName>
|
||||
<PublisherDisplayName>::APP_COMPANY::</PublisherDisplayName>
|
||||
<Logo>images\storelogo.png</Logo>
|
||||
</Properties>
|
||||
|
||||
<Dependencies>
|
||||
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.0.0" MaxVersionTested="10.0.0.0" />
|
||||
</Dependencies>
|
||||
|
||||
<Resources>
|
||||
<Resource Language="x-generate" />
|
||||
</Resources>
|
||||
|
||||
<Applications>
|
||||
<Application
|
||||
Id="App"
|
||||
StartPage="index.html">
|
||||
|
||||
<uap:VisualElements
|
||||
DisplayName="::APP_TITLE::"
|
||||
Description="::APP_DESCRIPTION::"
|
||||
BackgroundColor="transparent"
|
||||
Square150x150Logo="images\Square150x150Logo.png"
|
||||
Square44x44Logo="images\Square44x44Logo.png">
|
||||
|
||||
<uap:DefaultTile Wide310x150Logo="images\Wide310x150Logo.png" />
|
||||
<uap:SplashScreen Image="images\splashscreen.png" />
|
||||
|
||||
</uap:VisualElements>
|
||||
</Application>
|
||||
</Applications>
|
||||
|
||||
<Capabilities>
|
||||
<Capability Name="internetClient" />
|
||||
</Capabilities>
|
||||
|
||||
</Package>
|
||||
100
templates/winjs/template/source/uwp-project.jsproj
Normal file
@@ -0,0 +1,100 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|AnyCPU">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>AnyCPU</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|ARM">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>ARM</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x86">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x86</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|AnyCPU">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>AnyCPU</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|ARM">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>ARM</Platform>
|
||||
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x86">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x86</Platform>
|
||||
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>e9d48192-1008-49be-8a59-932a3ef1a1ca</ProjectGuid>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup Condition="'$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' < '14.0'">
|
||||
<VisualStudioVersion>14.0</VisualStudioVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\$(WMSJSProjectDirectory)\Microsoft.VisualStudio.$(WMSJSProject).Default.props" />
|
||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\$(WMSJSProjectDirectory)\Microsoft.VisualStudio.$(WMSJSProject).props" />
|
||||
<PropertyGroup>
|
||||
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
|
||||
<TargetPlatformVersion>10.0.15063.0</TargetPlatformVersion>
|
||||
<TargetPlatformMinVersion>10.0.10586.0</TargetPlatformMinVersion>
|
||||
<MinimumVisualStudioVersion>$(VersionNumberMajor).$(VersionNumberMinor)</MinimumVisualStudioVersion>
|
||||
<DefaultLanguage>en-US</DefaultLanguage>
|
||||
|
||||
<PackageCertificateKeyFile>::APP_FILE::_TemporaryKey.pfx</PackageCertificateKeyFile>
|
||||
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<AppxManifest Include="package.appxmanifest">
|
||||
<SubType>Designer</SubType>
|
||||
</AppxManifest>
|
||||
<Content Include="index.html" />
|
||||
<Content Include="*.js" />
|
||||
<Content Include="images\**\*.*" />
|
||||
<Content Include="js\**\*.*" />
|
||||
<Content Include="fonts\**\*.*" />
|
||||
<Content Include="sounds\**\*.*" />
|
||||
<Content Include="images\LockScreenLogo.scale-200.png" />
|
||||
<Content Include="images\SplashScreen.scale-200.png" />
|
||||
<Content Include="images\Square150x150Logo.scale-200.png" />
|
||||
<Content Include="images\Square44x44Logo.scale-200.png" />
|
||||
<Content Include="images\Square44x44Logo.targetsize-24_altform-unplated.png" />
|
||||
<Content Include="images\StoreLogo.png" />
|
||||
<Content Include="images\Wide310x150Logo.scale-200.png" />
|
||||
<Content Include="js\main.js" />
|
||||
<Content Include="css\default.css" />
|
||||
<Content Include="lib\winjs-4.0.1\js\base.js" />
|
||||
<Content Include="lib\winjs-4.0.1\js\ui.js" />
|
||||
<Content Include="lib\winjs-4.0.1\css\ui-light.css" />
|
||||
<Content Include="lib\winjs-4.0.1\css\ui-dark.css" />
|
||||
<Content Include="lib\winjs-4.0.1\fonts\Symbols.ttf" />
|
||||
|
||||
<None Include="::APP_FILE::_TemporaryKey.pfx" />
|
||||
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\$(WMSJSProjectDirectory)\Microsoft.VisualStudio.$(WMSJSProject).targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below then uncomment
|
||||
that target and the DisableFastUpToDateCheck PropertyGroup.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
|
||||
<PropertyGroup>
|
||||
<DisableFastUpToDateCheck>true</DisableFastUpToDateCheck>
|
||||
</PropertyGroup>
|
||||
-->
|
||||
</Project>
|
||||
BIN
templates/winjs/template/source/uwp-project_TemporaryKey.pfx
Normal file
48
templates/winjs/template/uwp-project.sln
Normal file
@@ -0,0 +1,48 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 15
|
||||
VisualStudioVersion = 15.0.26430.16
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{262852C6-CD72-467D-83FE-5EEB1973A190}") = "::APP_FILE::", "source\::APP_FILE::.jsproj", "{E9D48192-1008-49BE-8A59-932A3EF1A1CA}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Debug|ARM = Debug|ARM
|
||||
Debug|x64 = Debug|x64
|
||||
Debug|x86 = Debug|x86
|
||||
Release|Any CPU = Release|Any CPU
|
||||
Release|ARM = Release|ARM
|
||||
Release|x64 = Release|x64
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{E9D48192-1008-49BE-8A59-932A3EF1A1CA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{E9D48192-1008-49BE-8A59-932A3EF1A1CA}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{E9D48192-1008-49BE-8A59-932A3EF1A1CA}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
|
||||
{E9D48192-1008-49BE-8A59-932A3EF1A1CA}.Debug|ARM.ActiveCfg = Debug|ARM
|
||||
{E9D48192-1008-49BE-8A59-932A3EF1A1CA}.Debug|ARM.Build.0 = Debug|ARM
|
||||
{E9D48192-1008-49BE-8A59-932A3EF1A1CA}.Debug|ARM.Deploy.0 = Debug|ARM
|
||||
{E9D48192-1008-49BE-8A59-932A3EF1A1CA}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{E9D48192-1008-49BE-8A59-932A3EF1A1CA}.Debug|x64.Build.0 = Debug|x64
|
||||
{E9D48192-1008-49BE-8A59-932A3EF1A1CA}.Debug|x64.Deploy.0 = Debug|x64
|
||||
{E9D48192-1008-49BE-8A59-932A3EF1A1CA}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{E9D48192-1008-49BE-8A59-932A3EF1A1CA}.Debug|x86.Build.0 = Debug|x86
|
||||
{E9D48192-1008-49BE-8A59-932A3EF1A1CA}.Debug|x86.Deploy.0 = Debug|x86
|
||||
{E9D48192-1008-49BE-8A59-932A3EF1A1CA}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{E9D48192-1008-49BE-8A59-932A3EF1A1CA}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{E9D48192-1008-49BE-8A59-932A3EF1A1CA}.Release|Any CPU.Deploy.0 = Release|Any CPU
|
||||
{E9D48192-1008-49BE-8A59-932A3EF1A1CA}.Release|ARM.ActiveCfg = Release|ARM
|
||||
{E9D48192-1008-49BE-8A59-932A3EF1A1CA}.Release|ARM.Build.0 = Release|ARM
|
||||
{E9D48192-1008-49BE-8A59-932A3EF1A1CA}.Release|ARM.Deploy.0 = Release|ARM
|
||||
{E9D48192-1008-49BE-8A59-932A3EF1A1CA}.Release|x64.ActiveCfg = Release|x64
|
||||
{E9D48192-1008-49BE-8A59-932A3EF1A1CA}.Release|x64.Build.0 = Release|x64
|
||||
{E9D48192-1008-49BE-8A59-932A3EF1A1CA}.Release|x64.Deploy.0 = Release|x64
|
||||
{E9D48192-1008-49BE-8A59-932A3EF1A1CA}.Release|x86.ActiveCfg = Release|x86
|
||||
{E9D48192-1008-49BE-8A59-932A3EF1A1CA}.Release|x86.Build.0 = Release|x86
|
||||
{E9D48192-1008-49BE-8A59-932A3EF1A1CA}.Release|x86.Deploy.0 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||