first pass template files
@@ -55,7 +55,7 @@ class WindowsPlatform extends PlatformTarget {
|
||||
|
||||
if (project.targetFlags.exists ("uwp")) {
|
||||
|
||||
targetType = "js";
|
||||
targetType = "html5";
|
||||
|
||||
} else if (project.targetFlags.exists ("neko") || project.target != PlatformHelper.hostPlatform) {
|
||||
|
||||
@@ -75,12 +75,13 @@ class WindowsPlatform extends PlatformTarget {
|
||||
|
||||
}
|
||||
|
||||
targetDirectory = PathHelper.combine (project.app.path, project.config.getString ("windows.output-directory", "windows" + (is64 ? "64" : "") + "/" + targetType + "/" + buildType));
|
||||
targetDirectory = PathHelper.combine (project.app.path, project.config.getString ("windows.output-directory", targetType == "cpp" ? "windows" : targetType));
|
||||
|
||||
if (project.targetFlags.exists ("uwp")) {
|
||||
// openfl overrides this for some reason. ignore any garbage xml nonsense
|
||||
targetDirectory = PathHelper.combine (project.app.path, "windows" + (is64 ? "64" : "") + "/" + targetType + "/" + buildType);
|
||||
outputFile = targetDirectory + "/bin/" + project.app.file + ".js";
|
||||
outputFile = targetDirectory + "/bin/source/js/" + project.app.file + ".js";
|
||||
}
|
||||
|
||||
targetDirectory = StringTools.replace (targetDirectory, "arch64", is64 ? "64" : "");
|
||||
|
||||
applicationDirectory = targetDirectory + "/bin/";
|
||||
@@ -341,7 +342,11 @@ class WindowsPlatform extends PlatformTarget {
|
||||
|
||||
}
|
||||
|
||||
if (targetType == "nodejs") {
|
||||
if (project.targetFlags.exists ("uwp")) {
|
||||
|
||||
HTML5Helper.launch (project, targetDirectory + "/bin");
|
||||
|
||||
} else if (targetType == "nodejs") {
|
||||
|
||||
NodeJSHelper.run (project, targetDirectory + "/bin/ApplicationMain.js", arguments);
|
||||
|
||||
@@ -537,13 +542,13 @@ class WindowsPlatform extends PlatformTarget {
|
||||
|
||||
}
|
||||
|
||||
FileHelper.recursiveCopyTemplate (project.templatePaths, "html5/template", destination, context);
|
||||
FileHelper.recursiveCopyTemplate (project.templatePaths, "windows/template", destination, context);
|
||||
|
||||
if (project.app.main != null) {
|
||||
|
||||
FileHelper.recursiveCopyTemplate (project.templatePaths, "haxe", targetDirectory + "/haxe", context);
|
||||
FileHelper.recursiveCopyTemplate (project.templatePaths, "html5/haxe", targetDirectory + "/haxe", context, true, false);
|
||||
FileHelper.recursiveCopyTemplate (project.templatePaths, "html5/hxml", targetDirectory + "/haxe", context);
|
||||
FileHelper.recursiveCopyTemplate (project.templatePaths, "windows/haxe", targetDirectory + "/haxe", context, true, false);
|
||||
FileHelper.recursiveCopyTemplate (project.templatePaths, "windows/hxml", targetDirectory + "/haxe", context);
|
||||
|
||||
if (project.targetFlags.exists ("webgl")) {
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
<meta charset="utf-8">
|
||||
|
||||
<title>::APP_TITLE::</title>
|
||||
<title>::APP_TITLE:: FOR UWP</title>
|
||||
|
||||
<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">
|
||||
|
||||
5
templates/windows/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/windows/template/source/images/StoreLogo.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 3.1 KiB |
53
templates/windows/template/source/index.html
Normal file
@@ -0,0 +1,53 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>::APP_TITLE::</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="./::APP_FILE::.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>
|
||||
<div>Content goes here!</div>
|
||||
<script src="js/main.js"></script>
|
||||
|
||||
::foreach assets::::if (type == "font")::
|
||||
<span style="font-family: ::id::"> </span>::end::::end::
|
||||
|
||||
<div id="content"></div>
|
||||
|
||||
<script type="text/javascript">
|
||||
lime.embed ("::APP_FILE::", "content", ::WIN_WIDTH::, ::WIN_HEIGHT::);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
2
templates/windows/template/source/js/main.js
Normal file
@@ -0,0 +1,2 @@
|
||||
// Your code here!
|
||||
console.log('just a dumb test');
|
||||
52
templates/windows/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="1.0.0.0"
|
||||
Publisher="CN=Braden" />
|
||||
|
||||
<mp:PhoneIdentity PhoneProductId="e9d48192-1008-49be-8a59-932a3ef1a1ca" PhonePublisherId="00000000-0000-0000-0000-000000000000" />
|
||||
|
||||
<Properties>
|
||||
<DisplayName>::APP_TITLE::</DisplayName>
|
||||
<PublisherDisplayName>OpenFL</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="HelloJS"
|
||||
Description="HelloJS"
|
||||
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>
|
||||
89
templates/windows/template/source/uwp-project.jsproj
Normal file
@@ -0,0 +1,89 @@
|
||||
<?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>uwp-project_TemporaryKey.pfx</PackageCertificateKeyFile>
|
||||
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<AppxManifest Include="package.appxmanifest">
|
||||
<SubType>Designer</SubType>
|
||||
</AppxManifest>
|
||||
<Content Include="index.html" />
|
||||
<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" />
|
||||
|
||||
<None Include="uwp-project_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/windows/template/source/uwp-project_TemporaryKey.pfx
Normal file
48
templates/windows/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}") = "uwp-project", "source\uwp-project.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
|
||||