Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

iOS: resolving issue with CoronaBuilder #581

Merged
merged 1 commit into from
May 30, 2023
Merged
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
12 changes: 6 additions & 6 deletions platform/resources/iPhonePackageApp.lua
Original file line number Diff line number Diff line change
Expand Up @@ -962,6 +962,12 @@ local function packageApp( options )
end
end

--remove standard resources(Corona Resources Bundle) if users selects

if options.includeStandardResources == false then
runScript("rm -rf "..quoteString(makepath(appBundleFileUnquoted, "CoronaResources.bundle")))
end

-- bundle is now ready to be signed (don't sign if we don't have a signingIdentity, e.g. Xcode Simulator)
if options.signingIdentity then
-- codesign embedded frameworks before signing the .app
Expand Down Expand Up @@ -997,12 +1003,6 @@ local function packageApp( options )

runScript( "chmod 755 " .. appBundleFile )

--remove standard resources(Corona Resources Bundle) if users selects

if options.includeStandardResources == false then
runScript("rm -rf "..quoteString(makepath(appBundleFileUnquoted, "CoronaResources.bundle")))
end

-- If building with a distribution identity, create an IPA of the .app which can be used by Application Loader
local appBundleFileIPA = quoteString(makepath(options.dstDir, options.dstFile) .. ".ipa")
-- remove old IPA for extra cleanliness, even if we are not building a new IPA for distribution (it's stale so let's remove it)
Expand Down
2 changes: 1 addition & 1 deletion platform/shared/Rtt_PlatformAppPackager.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class AppPackagerParams
bool fIncludeFusePlugins;
bool fUsesMonetization;
bool fLiveBuild;
bool fIncludeStandardResources;
bool fIncludeStandardResources = true;
String fCoronaUser;

public:
Expand Down
11 changes: 9 additions & 2 deletions tools/CoronaBuilder/Rtt_AppPackagerAppleFactory.mm
Original file line number Diff line number Diff line change
Expand Up @@ -219,17 +219,24 @@
break;
}

if ( ! result )
{
fprintf( stderr, "ERROR: Unsupported platform: %s\n", TargetDevice::StringForPlatform( targetPlatform ) );
}

lua_getfield(L, index, "customTemplate" );
if(lua_type(L, -1) == LUA_TSTRING)
{
result->SetCustomTemplate(lua_tostring(L, -1));
}
lua_pop(L, 1);

if ( ! result )
lua_getfield(L, index, "includeStandardResources");
if(lua_type(L, -1) == LUA_TBOOLEAN)
{
fprintf( stderr, "ERROR: Unsupported platform: %s\n", TargetDevice::StringForPlatform( targetPlatform ) );
result->SetIncludeStandardResources(lua_toboolean(L, -1));
}
lua_pop(L, 1);

return result;
}
Expand Down
2 changes: 1 addition & 1 deletion tools/CoronaBuilder/Rtt_AppPackagerLinuxFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ namespace Rtt
}

bool includeStandardResources = true;
lua_getfield(L, index, "includeWidgetResources");
lua_getfield(L, index, "includeStandardResources");
if(lua_type(L, -1) == LUA_TBOOLEAN)
{
includeStandardResources = lua_toboolean(L, -1);
Expand Down