Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 16 additions & 16 deletions librtt/Rtt_JavaHost.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#ifdef Rtt_WIN_ENV
#include "windows.h"
#include "shellapi.h" // ShellExecute()
#include "WinString.h"
#include "RttString.h"
#include "Resource.h" // error string ids
#ifdef Rtt_NO_GUI
#include "Rtt_WinConsolePlatform.h"
Expand Down Expand Up @@ -198,7 +198,7 @@ bool JavaHost::LoadJvm()
static HKEY GetVersionKey( LPCTSTR sKey )
{
HKEY hJreKey = NULL;
WinString strVersion;
RttString strVersion;
HKEY hJreVersionKey = NULL;

// Look for JRE/JDK registry entry
Expand Down Expand Up @@ -235,9 +235,9 @@ static HKEY GetVersionKey( LPCTSTR sKey )
// function is static member of JavaHost
bool JavaHost::LoadJvm()
{
WinString registryKeyPath;
WinString runtimeBinPath;
WinString runtimeLibraryPath;
RttString registryKeyPath;
RttString runtimeBinPath;
RttString runtimeLibraryPath;

TCHAR buf[MAX_PATH + 100];
TCHAR sMsg[MAX_PATH];
Expand Down Expand Up @@ -280,7 +280,7 @@ bool JavaHost::LoadJvm()
#endif // USE_JNI

// Look for JRE registry entry, return RuntimeLib
static bool JavaRegistryLookup( LPCTSTR sLocation, LPCTSTR sKey, WinString* pstrValue )
static bool JavaRegistryLookup( LPCTSTR sLocation, LPCTSTR sKey, RttString* pstrValue )
{
LONG lResult;
bool bResult = false;
Expand Down Expand Up @@ -337,11 +337,11 @@ static bool JavaRegistryLookup( LPCTSTR sLocation, LPCTSTR sKey, WinString* pstr
return bResult;
}

static bool CopyJavaRuntimeRegistryKeyPathTo(WinString* pPath)
static bool CopyJavaRuntimeRegistryKeyPathTo(RttString* pPath)
{
if (pPath)
{
WinString versionName;
RttString versionName;
if (JavaRegistryLookup(JRE_REGISTRY_LOCATION, JAVA_REGISTRY_VERSION, &versionName))
{
pPath->SetTCHAR(JRE_REGISTRY_LOCATION);
Expand All @@ -361,11 +361,11 @@ static bool CopyJavaRuntimeRegistryKeyPathTo(WinString* pPath)
return false;
}

static bool CopyJavaDevelopmentKitRegistryKeyPathTo(WinString* pPath)
static bool CopyJavaDevelopmentKitRegistryKeyPathTo(RttString* pPath)
{
if (pPath)
{
WinString versionName;
RttString versionName;
if (JavaRegistryLookup(JDK_REGISTRY_LOCATION, JAVA_REGISTRY_VERSION, &versionName))
{
pPath->SetTCHAR(JDK_REGISTRY_LOCATION);
Expand Down Expand Up @@ -416,7 +416,7 @@ const char *JavaHost::GetJdkPath()
{
// try to find bunled JRE
TCHAR buffer[MAX_PATH] = _T("");
WinString rootPath;
RttString rootPath;
GetFullPathName(_T("jre"), MAX_PATH, buffer, NULL);
if (buffer[0] && CheckDirExists(buffer)) {
rootPath.SetTCHAR(buffer);
Expand All @@ -440,8 +440,8 @@ const char *JavaHost::GetJdkPath()
return s_sJdkJavaHome;
}

WinString sRegistryKeyPath;
WinString sValue;
RttString sRegistryKeyPath;
RttString sValue;
if (CopyJavaDevelopmentKitRegistryKeyPathTo(&sRegistryKeyPath))
{
if (JavaRegistryLookup(sRegistryKeyPath.GetTCHAR(), JDK_REGISTRY_JAVAHOME, &sValue))
Expand All @@ -462,7 +462,7 @@ const char *JavaHost::GetJrePath()
{
// try to find bunled JRE
TCHAR buffer[MAX_PATH] = _T("");
WinString rootPath;
RttString rootPath;
GetFullPathName(_T("jre\\jre"), MAX_PATH, buffer, NULL);
if (buffer[0] && CheckDirExists(buffer)) {
rootPath.SetTCHAR(buffer);
Expand All @@ -486,8 +486,8 @@ const char *JavaHost::GetJrePath()
return s_sJreJavaHome;
}

WinString sRegistryKeyPath;
WinString sValue;
RttString sRegistryKeyPath;
RttString sValue;
if (CopyJavaRuntimeRegistryKeyPathTo(&sRegistryKeyPath))
{
if (JavaRegistryLookup(sRegistryKeyPath.GetTCHAR(), JDK_REGISTRY_JAVAHOME, &sValue))
Expand Down
4 changes: 2 additions & 2 deletions platform/android/Rtt_AndroidAppPackager.cpp
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

#if defined(Rtt_WIN_ENV) && !defined(Rtt_LINUX_ENV)
#include "stdafx.h"
#include "WinString.h"
#include "RttString.h"
#include "Interop/Ipc/CommandLine.h"
#if !defined( Rtt_NO_GUI )
#include "Simulator.h"
Expand Down Expand Up @@ -703,7 +703,7 @@ AndroidAppPackager::Prepackage( AppPackagerParams * params, const char * tmpDir
#else // Windows

#if !defined( Rtt_NO_GUI )
WinString cmdBufStr;
RttString cmdBufStr;
cmdBufStr.SetUTF8(cmdBuf);

std::wstring utf16CommandLine(cmdBufStr.GetUTF16());
Expand Down
18 changes: 9 additions & 9 deletions platform/shared/Rtt_PlatformAppPackager.cpp
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
# include "Core/Rtt_FileSystem.h"
# include "stdafx.h"
# include "Interop/Ipc/CommandLine.h"
# include "WinString.h"
# include "RttString.h"
# include <Shlobj.h>
#if !defined( Rtt_NO_GUI )
# include "Simulator.h"
Expand Down Expand Up @@ -276,7 +276,7 @@ PlatformAppPackager::mkdir( const char *sDir )
bool hasSucceeded = false;

#if defined(Rtt_WIN_ENV) && !defined(Rtt_LINUX_ENV)
WinString stringConverter;
RttString stringConverter;
stringConverter.SetUTF8( sDir );
int result = ::SHCreateDirectoryEx( NULL, stringConverter.GetTCHAR(), NULL );
if (ERROR_SUCCESS == result)
Expand Down Expand Up @@ -305,7 +305,7 @@ PlatformAppPackager::rmdir( const char *sDir )

#if defined(Rtt_WIN_ENV) && !defined(Rtt_LINUX_ENV)
// Convert the given directory path to UTF-16.
WinString directoryPath;
RttString directoryPath;
directoryPath.SetUTF8(sDir);

// Remove the read-only and hidden attributes from all files and subdirectories under the given directory.
Expand Down Expand Up @@ -403,10 +403,10 @@ PlatformAppPackager::Prepackage( AppPackagerParams * params, const char* tmpDir
}
free( cmd );
#elif defined(Rtt_WIN_ENV) && !defined(Rtt_LINUX_ENV)
WinString dstFileconverter;
RttString dstFileconverter;
dstFileconverter.SetUTF8( dstFile );

WinString tmpDirConverter;
RttString tmpDirConverter;
tmpDirConverter.SetUTF8( tmpDir );

CString cmdIssue;
Expand Down Expand Up @@ -473,7 +473,7 @@ IsDirectory( const char *path )
bool result = false;

#if defined(Rtt_WIN_ENV) && !defined(Rtt_LINUX_ENV)
WinString stringConverter;
RttString stringConverter;
stringConverter.SetUTF8( path );
result = ::PathIsDirectoryW( stringConverter.GetUTF16() ) ? true : false;
#else
Expand All @@ -498,7 +498,7 @@ CompileScriptsInDirectory( lua_State *L, AppPackagerParams& params, const char *

#if defined(Rtt_WIN_ENV) && !defined(Rtt_LINUX_ENV)
struct _stat statbuf;
WinString stringConverter;
RttString stringConverter;
stringConverter.SetUTF8( srcDir );
if (_tstat(stringConverter.GetTCHAR(), &statbuf) >= 0)
{
Expand Down Expand Up @@ -736,7 +736,7 @@ ReplaceMainLuaWithLiveDebug( lua_State *L, AppPackagerParams& params, const char
bool createConfig = true;
std::string configPath = std::string(params.GetSrcDir()) + LUA_DIRSEP + ".CoronaLiveBuild";
#if defined(Rtt_WIN_ENV) && !defined(Rtt_LINUX_ENV)
WinString transcodedConfigPath(configPath.c_str());
RttString transcodedConfigPath(configPath.c_str());
std::ifstream fsconfig(transcodedConfigPath.GetUTF16(), std::ios_base::binary);
#else
std::ifstream fsconfig(configPath);
Expand Down Expand Up @@ -1246,7 +1246,7 @@ PlatformAppPackager::CopyDirectoryTree( const PlatformAppPackager::CopyDirectory
(LPWSTR)&utf16Buffer, 0, nullptr);
if ( utf16Buffer )
{
WinString stringConverter;
RttString stringConverter;
stringConverter.SetUTF16( utf16Buffer );
message.append( "\r\n\r\nReason:\r\n " );
message.append( stringConverter.GetUTF8() );
Expand Down
10 changes: 10 additions & 0 deletions platform/windows/ALmixer.Library/ALmixer.Library.Win32.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,17 @@
<Project>{5c72a2ce-e118-4821-8e9f-9db393119fb8}</Project>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="..\packages\Microsoft.Web.WebView2.1.0.3912.50\build\native\Microsoft.Web.WebView2.targets" Condition="Exists('..\packages\Microsoft.Web.WebView2.1.0.3912.50\build\native\Microsoft.Web.WebView2.targets')" />
</ImportGroup>
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\Microsoft.Web.WebView2.1.0.3912.50\build\native\Microsoft.Web.WebView2.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Web.WebView2.1.0.3912.50\build\native\Microsoft.Web.WebView2.targets'))" />
</Target>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,7 @@
<UniqueIdentifier>{bbc425b8-f2d1-4061-8e52-c452cc713f6a}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
</Project>
4 changes: 4 additions & 0 deletions platform/windows/ALmixer.Library/packages.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.Web.WebView2" version="1.0.3912.50" targetFramework="native" />
</packages>
10 changes: 10 additions & 0 deletions platform/windows/Box2D.Library/Box2D.Library.Win32.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,9 @@
<ClCompile Include="..\..\..\external\Box2D\Box2D\Particle\b2VoronoiDiagram.cpp" />
<ClCompile Include="..\..\..\external\Box2D\Box2D\Rope\b2Rope.cpp" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectName>Box2D.Library.Win32</ProjectName>
<ProjectGuid>{EB74DA6F-6EBC-422E-8B7B-88A93AD5F8D6}</ProjectGuid>
Expand Down Expand Up @@ -221,5 +224,12 @@
</ItemDefinitionGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="..\packages\Microsoft.Web.WebView2.1.0.3912.50\build\native\Microsoft.Web.WebView2.targets" Condition="Exists('..\packages\Microsoft.Web.WebView2.1.0.3912.50\build\native\Microsoft.Web.WebView2.targets')" />
</ImportGroup>
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\Microsoft.Web.WebView2.1.0.3912.50\build\native\Microsoft.Web.WebView2.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Web.WebView2.1.0.3912.50\build\native\Microsoft.Web.WebView2.targets'))" />
</Target>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -367,4 +367,7 @@
<Filter>Rope</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
</Project>
4 changes: 4 additions & 0 deletions platform/windows/Box2D.Library/packages.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.Web.WebView2" version="1.0.3912.50" targetFramework="native" />
</packages>
14 changes: 12 additions & 2 deletions platform/windows/Corona.Archiver/Corona.Archiver.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='PreRelease|Win32'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\Corona.Native.Library.Win32\WinFile.cpp" />
<ClCompile Include="..\Corona.Native.Library.Win32\WinString.cpp" />
<ClCompile Include="..\Corona.Native.Library.Win32\RttString.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\..\librtt\Core\Rtt_Allocator.h" />
Expand All @@ -48,7 +48,10 @@
<ClInclude Include="..\..\..\librtt\Rtt_LuaFile.h" />
<ClInclude Include="..\..\..\tools\car\Rtt_Car.h" />
<ClInclude Include="..\Corona.Native.Library.Win32\WinFile.h" />
<ClInclude Include="..\Corona.Native.Library.Win32\WinString.h" />
<ClInclude Include="..\Corona.Native.Library.Win32\RttString.h" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectName>Corona.Archiver</ProjectName>
Expand Down Expand Up @@ -183,5 +186,12 @@
</ItemDefinitionGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="..\packages\Microsoft.Web.WebView2.1.0.3912.50\build\native\Microsoft.Web.WebView2.targets" Condition="Exists('..\packages\Microsoft.Web.WebView2.1.0.3912.50\build\native\Microsoft.Web.WebView2.targets')" />
</ImportGroup>
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\Microsoft.Web.WebView2.1.0.3912.50\build\native\Microsoft.Web.WebView2.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Web.WebView2.1.0.3912.50\build\native\Microsoft.Web.WebView2.targets'))" />
</Target>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<ClCompile Include="..\..\..\librtt\Core\Rtt_FileSystem.cpp">
<Filter>librtt\Core</Filter>
</ClCompile>
<ClCompile Include="..\Corona.Native.Library.Win32\WinString.cpp">
<ClCompile Include="..\Corona.Native.Library.Win32\RttString.cpp">
<Filter>platform\windows\Corona.Native.Library.Win32</Filter>
</ClCompile>
<ClCompile Include="..\Corona.Native.Library.Win32\WinFile.cpp">
Expand Down Expand Up @@ -82,7 +82,7 @@
<ClInclude Include="..\Corona.Native.Library.Win32\WinFile.h">
<Filter>platform\windows\Corona.Native.Library.Win32</Filter>
</ClInclude>
<ClInclude Include="..\Corona.Native.Library.Win32\WinString.h">
<ClInclude Include="..\Corona.Native.Library.Win32\RttString.h">
<Filter>platform\windows\Corona.Native.Library.Win32</Filter>
</ClInclude>
</ItemGroup>
Expand All @@ -109,4 +109,7 @@
<UniqueIdentifier>{c5d253c3-0d92-45fe-be6e-9e982a436fe2}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
</Project>
4 changes: 4 additions & 0 deletions platform/windows/Corona.Archiver/packages.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.Web.WebView2" version="1.0.3912.50" targetFramework="native" />
</packages>
10 changes: 10 additions & 0 deletions platform/windows/Corona.Debugger/Corona.Debugger.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@
<ItemGroup>
<LuaToCpp Include="..\..\..\external\remdebug-1.0\src\controller.lua" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{3F8DDAA9-2A84-4CEE-BAC0-A6A17A7A78EB}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
Expand Down Expand Up @@ -181,5 +184,12 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="..\Build.Tools\LuaToCppTask.targets" />
<Import Project="..\packages\Microsoft.Web.WebView2.1.0.3912.50\build\native\Microsoft.Web.WebView2.targets" Condition="Exists('..\packages\Microsoft.Web.WebView2.1.0.3912.50\build\native\Microsoft.Web.WebView2.targets')" />
</ImportGroup>
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\Microsoft.Web.WebView2.1.0.3912.50\build\native\Microsoft.Web.WebView2.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Web.WebView2.1.0.3912.50\build\native\Microsoft.Web.WebView2.targets'))" />
</Target>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,7 @@
<Filter>external\remdebug-1.0\src</Filter>
</LuaToCpp>
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
</Project>
4 changes: 4 additions & 0 deletions platform/windows/Corona.Debugger/packages.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.Web.WebView2" version="1.0.3912.50" targetFramework="native" />
</packages>
Loading