mirror of
https://github.com/izzy2lost/shipdev.git
synced 2026-03-26 16:50:51 -07:00
Add staging uwp build files
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
<?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"
|
||||
xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
|
||||
xmlns:uap3="http://schemas.microsoft.com/appx/manifest/uap/windows10/3"
|
||||
xmlns:uap4="http://schemas.microsoft.com/appx/manifest/uap/windows10/4"
|
||||
xmlns:iot="http://schemas.microsoft.com/appx/manifest/iot/windows10"
|
||||
xmlns:uap2="http://schemas.microsoft.com/appx/manifest/uap/windows10/2"
|
||||
xmlns:uap6="http://schemas.microsoft.com/appx/manifest/uap/windows10/6"
|
||||
IgnorableNamespaces="uap mp uap3 uap4 iot uap2 uap6">
|
||||
|
||||
<Identity
|
||||
Name="0587b567-7771-46ca-a4e2-0ec8ef4343c0"
|
||||
Publisher="CN=datboi"
|
||||
Version="1.0.0.0" />
|
||||
|
||||
<mp:PhoneIdentity PhoneProductId="0587b567-7771-46ca-a4e2-0ec8ef4343c0" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>
|
||||
|
||||
<Properties>
|
||||
<DisplayName>soh_uwp</DisplayName>
|
||||
<PublisherDisplayName>danwo</PublisherDisplayName>
|
||||
<Logo>Assets\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"
|
||||
Executable="$targetnametoken$.exe" EntryPoint="soh_uwp.App">
|
||||
<uap:VisualElements
|
||||
DisplayName="soh_uwp"
|
||||
Square150x150Logo="Assets\Square150x150Logo.png"
|
||||
Square44x44Logo="Assets\Square44x44Logo.png"
|
||||
Description="soh_uwp"
|
||||
BackgroundColor="transparent">
|
||||
<uap:DefaultTile Wide310x150Logo="Assets\Wide310x150Logo.png"/>
|
||||
<uap:SplashScreen Image="Assets\SplashScreen.png" />
|
||||
</uap:VisualElements>
|
||||
</Application>
|
||||
</Applications>
|
||||
|
||||
<Capabilities>
|
||||
<rescap:Capability Name="runFullTrust"/>
|
||||
<rescap:Capability Name="broadFileSystemAccess" />
|
||||
<rescap:Capability Name="expandedResources" />
|
||||
<Capability Name="internetClient" />
|
||||
<uap:Capability Name="removableStorage"/>
|
||||
</Capabilities>
|
||||
</Package>
|
||||
@@ -0,0 +1,94 @@
|
||||
/*
|
||||
SDL_winrt_main_NonXAML.cpp, placed in the public domain by David Ludwig 3/13/14
|
||||
*/
|
||||
|
||||
/* At least one file in any SDL/WinRT app appears to require compilation
|
||||
with C++/CX, otherwise a Windows Metadata file won't get created, and
|
||||
an APPX0702 build error can appear shortly after linking.
|
||||
|
||||
The following set of preprocessor code forces this file to be compiled
|
||||
as C++/CX, which appears to cause Visual C++ 2012's build tools to
|
||||
create this .winmd file, and will help allow builds of SDL/WinRT apps
|
||||
to proceed without error.
|
||||
|
||||
If other files in an app's project enable C++/CX compilation, then it might
|
||||
be possible for SDL_winrt_main_NonXAML.cpp to be compiled without /ZW,
|
||||
for Visual C++'s build tools to create a winmd file, and for the app to
|
||||
build without APPX0702 errors. In this case, if
|
||||
SDL_WINRT_METADATA_FILE_AVAILABLE is defined as a C/C++ macro, then
|
||||
the #error (to force C++/CX compilation) will be disabled.
|
||||
|
||||
Please note that /ZW can be specified on a file-by-file basis. To do this,
|
||||
right click on the file in Visual C++, click Properties, then change the
|
||||
setting through the dialog that comes up.
|
||||
*/
|
||||
|
||||
/* Prevent MSVC++ from warning about threading models when defining our
|
||||
custom WinMain. The threading model will instead be set via a direct
|
||||
call to Windows::Foundation::Initialize (rather than via an attributed
|
||||
function).
|
||||
|
||||
To note, this warning (C4447) does not seem to come up unless this file
|
||||
is compiled with C++/CX enabled (via the /ZW compiler flag).
|
||||
*/
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(disable : 4447)
|
||||
#endif
|
||||
|
||||
/* Make sure the function to initialize the Windows Runtime gets linked in. */
|
||||
#ifdef _MSC_VER
|
||||
#pragma comment(lib, "runtimeobject.lib")
|
||||
#endif
|
||||
|
||||
#include <Windows.h>
|
||||
#include <winrt/Windows.Foundation.h>
|
||||
#include <winrt/Windows.Foundation.Collections.h>
|
||||
#include <winrt/Windows.ApplicationModel.Activation.h>
|
||||
#include <winrt/Windows.ApplicationModel.Core.h>
|
||||
#include <winrt/Windows.UI.Core.h>
|
||||
#include <winrt/Windows.UI.Composition.h>
|
||||
#include <winrt/Windows.UI.Input.h>
|
||||
#include <winrt/Windows.UI.ViewManagement.Core.h>
|
||||
#include <winrt/Windows.Graphics.Display.Core.h>
|
||||
#include <winrt/Windows.Gaming.Input.h>
|
||||
#include <winrt/Windows.Storage.h>
|
||||
#include <winrt/Windows.System.h>
|
||||
|
||||
using namespace winrt::Windows;
|
||||
using namespace winrt::Windows::ApplicationModel::Core;
|
||||
using namespace winrt::Windows::Graphics::Display::Core;
|
||||
using namespace winrt::Windows::Foundation::Numerics;
|
||||
using namespace winrt::Windows::UI;
|
||||
using namespace winrt::Windows::UI::Core;
|
||||
using namespace winrt::Windows::UI::Composition;
|
||||
using namespace winrt::Windows::Storage;
|
||||
|
||||
#include "../libultraship/src/graphic/Fast3D/wininfo.h"
|
||||
|
||||
#include "SDL2/SDL.h"
|
||||
void* WinInfo::getCurrentWindow() {
|
||||
void* ptr = nullptr;
|
||||
while (ptr == nullptr) {
|
||||
ptr = winrt::get_abi(CoreWindow::GetForCurrentThread());
|
||||
Sleep(10);
|
||||
}
|
||||
|
||||
return ptr;
|
||||
}
|
||||
|
||||
std::string WinInfo::getSavePath() {
|
||||
return winrt::to_string(ApplicationData::Current().LocalFolder().Path());
|
||||
}
|
||||
|
||||
int CALLBACK WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
|
||||
{
|
||||
char* args[] = {
|
||||
(char*) "example",
|
||||
NULL
|
||||
};
|
||||
|
||||
|
||||
winrt::init_apartment();
|
||||
return SDL_WinRTRunApp(SDL_main, args);
|
||||
winrt::uninit_apartment();
|
||||
}
|
||||
Reference in New Issue
Block a user