diff --git a/lime/project/ProjectXMLParser.hx b/lime/project/ProjectXMLParser.hx index cf1cc2e2f..f4692150e 100644 --- a/lime/project/ProjectXMLParser.hx +++ b/lime/project/ProjectXMLParser.hx @@ -124,7 +124,7 @@ class ProjectXMLParser extends HXProject { defines.set ("targetType", "js"); defines.set ("html5", "1"); - + } else if (platformType == DESKTOP && target != PlatformHelper.hostPlatform) { defines.set ("native", "1"); diff --git a/lime/tools/platforms/WindowsPlatform.hx b/lime/tools/platforms/WindowsPlatform.hx index 616a88a06..7f03972cd 100644 --- a/lime/tools/platforms/WindowsPlatform.hx +++ b/lime/tools/platforms/WindowsPlatform.hx @@ -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"; + targetDirectory = PathHelper.combine (project.app.path, "windows" + (is64 ? "64" : "") + "/" + targetType + "/" + buildType); + outputFile = targetDirectory + "/bin/source/js/" + project.app.file + ".js"; } + targetDirectory = StringTools.replace (targetDirectory, "arch64", is64 ? "64" : ""); applicationDirectory = targetDirectory + "/bin/"; @@ -100,7 +101,7 @@ class WindowsPlatform extends PlatformTarget { if (project.targetFlags.exists ("uwp")) { ModuleHelper.buildModules (project, targetDirectory + "/obj", targetDirectory + "/bin"); - + if (project.app.main != null) { ProcessHelper.runCommand ("", "haxe", [ hxml ] ); @@ -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")) { diff --git a/templates/windows/template/index.html b/templates/windows/template/index.html index d1fd983be..0abc7a778 100644 --- a/templates/windows/template/index.html +++ b/templates/windows/template/index.html @@ -4,7 +4,7 @@ - ::APP_TITLE:: + ::APP_TITLE:: FOR UWP diff --git a/templates/windows/template/source/css/default.css b/templates/windows/template/source/css/default.css new file mode 100644 index 000000000..7508dfca5 --- /dev/null +++ b/templates/windows/template/source/css/default.css @@ -0,0 +1,5 @@ +body { + /* Uncomment this to enable scrolling and zooming + touch-action: manipulation; + */ +} diff --git a/templates/windows/template/source/images/LockScreenLogo.scale-200.png b/templates/windows/template/source/images/LockScreenLogo.scale-200.png new file mode 100644 index 000000000..735f57adb Binary files /dev/null and b/templates/windows/template/source/images/LockScreenLogo.scale-200.png differ diff --git a/templates/windows/template/source/images/SplashScreen.scale-200.png b/templates/windows/template/source/images/SplashScreen.scale-200.png new file mode 100644 index 000000000..023e7f1fe Binary files /dev/null and b/templates/windows/template/source/images/SplashScreen.scale-200.png differ diff --git a/templates/windows/template/source/images/Square150x150Logo.scale-200.png b/templates/windows/template/source/images/Square150x150Logo.scale-200.png new file mode 100644 index 000000000..af49fec1a Binary files /dev/null and b/templates/windows/template/source/images/Square150x150Logo.scale-200.png differ diff --git a/templates/windows/template/source/images/Square44x44Logo.scale-200.png b/templates/windows/template/source/images/Square44x44Logo.scale-200.png new file mode 100644 index 000000000..ce342a2ec Binary files /dev/null and b/templates/windows/template/source/images/Square44x44Logo.scale-200.png differ diff --git a/templates/windows/template/source/images/Square44x44Logo.targetsize-24_altform-unplated.png b/templates/windows/template/source/images/Square44x44Logo.targetsize-24_altform-unplated.png new file mode 100644 index 000000000..f6c02ce97 Binary files /dev/null and b/templates/windows/template/source/images/Square44x44Logo.targetsize-24_altform-unplated.png differ diff --git a/templates/windows/template/source/images/StoreLogo.png b/templates/windows/template/source/images/StoreLogo.png new file mode 100644 index 000000000..7385b56c0 Binary files /dev/null and b/templates/windows/template/source/images/StoreLogo.png differ diff --git a/templates/windows/template/source/images/Wide310x150Logo.scale-200.png b/templates/windows/template/source/images/Wide310x150Logo.scale-200.png new file mode 100644 index 000000000..288995b39 Binary files /dev/null and b/templates/windows/template/source/images/Wide310x150Logo.scale-200.png differ diff --git a/templates/windows/template/source/index.html b/templates/windows/template/source/index.html new file mode 100644 index 000000000..e9a90c500 --- /dev/null +++ b/templates/windows/template/source/index.html @@ -0,0 +1,53 @@ + + + + + ::APP_TITLE:: + + + + ::if favicons::::foreach (favicons):: + ::end::::end:: + + ::if linkedLibraries::::foreach (linkedLibraries):: + ::end::::end:: + + + + + + + +
Content goes here!
+ + + ::foreach assets::::if (type == "font"):: + ::end::::end:: + +
+ + + + diff --git a/templates/windows/template/source/js/main.js b/templates/windows/template/source/js/main.js new file mode 100644 index 000000000..bf3961724 --- /dev/null +++ b/templates/windows/template/source/js/main.js @@ -0,0 +1,2 @@ +// Your code here! +console.log('just a dumb test'); \ No newline at end of file diff --git a/templates/windows/template/source/package.appxmanifest b/templates/windows/template/source/package.appxmanifest new file mode 100644 index 000000000..752086dc4 --- /dev/null +++ b/templates/windows/template/source/package.appxmanifest @@ -0,0 +1,52 @@ + + + + + + + + + ::APP_TITLE:: + OpenFL + images\storelogo.png + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/templates/windows/template/source/uwp-project.jsproj b/templates/windows/template/source/uwp-project.jsproj new file mode 100644 index 000000000..cba1932fd --- /dev/null +++ b/templates/windows/template/source/uwp-project.jsproj @@ -0,0 +1,89 @@ + + + + + Debug + AnyCPU + + + Debug + ARM + + + Debug + x64 + + + Debug + x86 + + + Release + AnyCPU + + + Release + ARM + true + + + Release + x64 + true + + + Release + x86 + true + + + + e9d48192-1008-49be-8a59-932a3ef1a1ca + + + + 14.0 + + + + + UAP + 10.0.15063.0 + 10.0.10586.0 + $(VersionNumberMajor).$(VersionNumberMinor) + en-US + + uwp-project_TemporaryKey.pfx + + + + + Designer + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/templates/windows/template/source/uwp-project_TemporaryKey.pfx b/templates/windows/template/source/uwp-project_TemporaryKey.pfx new file mode 100644 index 000000000..677fc3538 Binary files /dev/null and b/templates/windows/template/source/uwp-project_TemporaryKey.pfx differ diff --git a/templates/windows/template/uwp-project.sln b/templates/windows/template/uwp-project.sln new file mode 100644 index 000000000..d337d3e39 --- /dev/null +++ b/templates/windows/template/uwp-project.sln @@ -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