Skip to content

Commit

Permalink
Simulator: updating linux packagers (#305)
Browse files Browse the repository at this point in the history
  • Loading branch information
bakeinflash committed Nov 19, 2021
1 parent 9986dc0 commit 7e12e32
Show file tree
Hide file tree
Showing 11 changed files with 194 additions and 177 deletions.
3 changes: 1 addition & 2 deletions CMakeLists.txt
Expand Up @@ -4,8 +4,7 @@ project("Solar2D")

# Set a default build type if none was specified

#set(default_build_type "Release")
set(default_build_type "Debug")
set(default_build_type "Release")
if (NOT CMAKE_BUILD_TYPE)
message(STATUS "Setting build type to '${default_build_type}' as none was specified.")

Expand Down
108 changes: 64 additions & 44 deletions CMakeSettings.json
@@ -1,46 +1,66 @@
{
"configurations": [
{
"name": "x64-Debug",
"generator": "Ninja",
"configurationType": "Debug",
"inheritEnvironments": [ "msvc_x64_x64" ],
"buildRoot": "${projectDir}\\out\\build\\${name}",
"installRoot": "${projectDir}\\out\\install\\${name}",
"cmakeCommandArgs": "",
"buildCommandArgs": "",
"ctestCommandArgs": ""
},
{
"name": "Linux-GCC-Debug",
"generator": "Ninja",
"configurationType": "Debug",
"cmakeExecutable": "cmake",
"remoteCopySourcesExclusionList": [ ".vs", ".git", "out" ],
"cmakeCommandArgs": "",
"inheritEnvironments": [ "linux_x64" ],
"remoteMachineName": "1973820677;192.168.11.3 (username=vitaly, port=22, authentication=Password)",
"remoteCMakeListsRoot": "$HOME/.vs/${projectDirName}/${workspaceHash}/src",
"remoteBuildRoot": "$HOME/.vs/${projectDirName}/${workspaceHash}/out/build/${name}",
"remoteInstallRoot": "$HOME/.vs/${projectDirName}/${workspaceHash}/out/install/${name}",
"remoteCopySources": true,
"rsyncCommandArgs": "-a --delete --delete-excluded --include-from=platform/linux/CMakeRsyncLinuxLists.txt",
"remoteCopyBuildOutput": false,
"remoteCopySourcesMethod": "rsync",
"buildCommandArgs": "-j4"
},
{
"name": "WSL-GCC-Debug",
"generator": "Ninja",
"configurationType": "Debug",
"buildRoot": "${projectDir}\\out\\build\\${name}",
"installRoot": "${projectDir}\\out\\install\\${name}",
"cmakeExecutable": "cmake",
"cmakeCommandArgs": "",
"buildCommandArgs": "",
"ctestCommandArgs": "",
"inheritEnvironments": [ "linux_x64" ],
"wslPath": "${defaultWSLPath}"
}
]
"configurations": [
{
"name": "x64-Debug",
"generator": "Ninja",
"configurationType": "Debug",
"inheritEnvironments": [ "msvc_x64_x64" ],
"buildRoot": "${projectDir}\\out\\build\\${name}",
"installRoot": "${projectDir}\\out\\install\\${name}",
"cmakeCommandArgs": "",
"buildCommandArgs": "",
"ctestCommandArgs": ""
},
{
"name": "Linux-GCC-Debug",
"generator": "Ninja",
"configurationType": "Debug",
"cmakeExecutable": "cmake",
"remoteCopySourcesExclusionList": [ ".vs", ".git", "out" ],
"cmakeCommandArgs": "",
"inheritEnvironments": [ "linux_x64" ],
"remoteMachineName": "${defaultRemoteMachineName}",
"remoteCMakeListsRoot": "$HOME/.vs/${projectDirName}/${workspaceHash}/src",
"remoteBuildRoot": "$HOME/.vs/${projectDirName}/${workspaceHash}/out/build/${name}",
"remoteInstallRoot": "$HOME/.vs/${projectDirName}/${workspaceHash}/out/install/${name}",
"remoteCopySources": true,
"rsyncCommandArgs": "-a --delete --delete-excluded --include-from=platform/linux/CMakeRsyncLinuxLists.txt",
"remoteCopyBuildOutput": false,
"remoteCopySourcesMethod": "rsync",
"buildCommandArgs": "-j4"
},
{
"name": "WSL-GCC-Debug",
"generator": "Ninja",
"configurationType": "Debug",
"buildRoot": "${projectDir}\\out\\build\\${name}",
"installRoot": "${projectDir}\\out\\install\\${name}",
"cmakeExecutable": "cmake",
"cmakeCommandArgs": "",
"buildCommandArgs": "",
"ctestCommandArgs": "",
"inheritEnvironments": [ "linux_x64" ],
"wslPath": "${defaultWSLPath}"
},
{
"name": "Linux-GCC-Release",
"generator": "Ninja",
"configurationType": "Release",
"cmakeExecutable": "cmake",
"remoteCopySourcesExclusionList": [ ".vs", ".git", "out" ],
"cmakeCommandArgs": "",
"buildCommandArgs": "-j4",
"ctestCommandArgs": "",
"inheritEnvironments": [ "linux_x64" ],
"remoteMachineName": "${defaultRemoteMachineName}",
"remoteCMakeListsRoot": "$HOME/.vs/${projectDirName}/${workspaceHash}/src",
"remoteBuildRoot": "$HOME/.vs/${projectDirName}/${workspaceHash}/out/build/${name}",
"remoteInstallRoot": "$HOME/.vs/${projectDirName}/${workspaceHash}/out/install/${name}",
"remoteCopySources": true,
"rsyncCommandArgs": "-a --delete --delete-excluded --include-from=platform/linux/CMakeRsyncLinuxLists.txt",
"remoteCopyBuildOutput": false,
"remoteCopySourcesMethod": "rsync",
"variables": []
}
]
}
42 changes: 5 additions & 37 deletions platform/mac/LinuxAppBuildController.mm
Expand Up @@ -142,28 +142,6 @@ - (NSString*)appExtension

- (void)alertDidEnd:(NSAlert *)alert returnCode:(int)returnCode contextInfo:(void *)contextInfo
{
// if ( NSAlertThirdButtonReturn == returnCode )
// {
// NSString *dstApp = [self appPackagePath];
// NSString* appuploadertool = [sdkRoot stringByAppendingPathComponent:@"/Applications/Utilities/Application Loader.app"];
//
//
// NSFileManager* filemanager = [NSFileManager defaultManager];
//
// NSString* zipfile = nil;
//
// if( [filemanager fileExistsAtPath:dstApp] )
// {
// zipfile = [[dstApp stringByDeletingPathExtension] stringByAppendingPathExtension:@"zip"];
//
// if( ! [filemanager fileExistsAtPath:zipfile] )
// {
// zipfile = nil;
// }
// }
// [[NSWorkspace sharedWorkspace] openFile:zipfile withApplication:appuploadertool];
// }

[super alertDidEnd:alert returnCode:returnCode contextInfo:contextInfo];
}

Expand Down Expand Up @@ -297,22 +275,12 @@ - (IBAction)build:(id)sender
[appDelegate notifyWithTitle:@"Corona Simulator"
description:[NSString stringWithFormat:@"LINUX build of \"%@\" complete", self.appName]
iconData:nil];

NSString *message = [NSString stringWithFormat:@"Showing built LINUX app *%@* in Finder", self.appName];

[self showMessage:@"Build Complete" message:message helpURL:nil parentWindow:[self window]];

NSRunningApplication *app = [[NSRunningApplication runningApplicationsWithBundleIdentifier:@"com.coronalabs.CoronaLiveServer"] firstObject];
if(!app) {
NSString *liveServerPath = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"Corona Live Server.app"];
app = [[NSWorkspace sharedWorkspace] launchApplicationAtURL:[NSURL fileURLWithPath:liveServerPath] options:(NSWorkspaceLaunchAndHide|NSWorkspaceLaunchWithoutActivation) configuration:@{} error:nil];
}
NSString *dstHtmlPath = [self.dstPath stringByAppendingPathComponent:self.appName];
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
if(!app.finishedLaunching) {
while (![[[NSRunningApplication runningApplicationsWithBundleIdentifier:@"com.coronalabs.CoronaLiveServer"] firstObject] isFinishedLaunching]) {
[NSThread sleepForTimeInterval:0.01];
}
}

[[NSDistributedNotificationCenter defaultCenter] postNotificationName:@"linuxProjectBuilt" object:nil userInfo:@{@"root":dstHtmlPath} deliverImmediately:YES];
});
[[NSWorkspace sharedWorkspace] selectFile:[self appBundleFile] inFileViewerRootedAtPath:@""];

// Do nothing
[self logEvent:@"build-post-action" key:@"post-action" value:@"do-nothing"];
Expand Down
8 changes: 4 additions & 4 deletions platform/mac/ratatouille.xcodeproj/project.pbxproj
Expand Up @@ -1608,7 +1608,7 @@
F53594BE1B6185EA00C8CAAD /* Rtt_TextureResourceCanvasAdapter.h in Headers */ = {isa = PBXBuildFile; fileRef = F53594B61B6185EA00C8CAAD /* Rtt_TextureResourceCanvasAdapter.h */; };
F53C328C2404E2A300BC2BED /* CoronaBuilderPluginCollector.lua in Sources */ = {isa = PBXBuildFile; fileRef = F53C32832404E25600BC2BED /* CoronaBuilderPluginCollector.lua */; };
F53C328D2404E2AB00BC2BED /* CoronaBuilderPluginCollector.lua in Sources */ = {isa = PBXBuildFile; fileRef = F53C32832404E25600BC2BED /* CoronaBuilderPluginCollector.lua */; };
F545475321178F7400D5EDB7 /* linuxtemplate.tar.gz in Resources */ = {isa = PBXBuildFile; fileRef = F545474A21178F7400D5EDB7 /* linuxtemplate.tar.gz */; };
F545475321178F7400D5EDB7 /* linuxtemplate_x64.tgz in Resources */ = {isa = PBXBuildFile; fileRef = F545474A21178F7400D5EDB7 /* linuxtemplate_x64.tgz */; };
F54D1E121CA35968000B280E /* Rtt_AppleFont.mm in Sources */ = {isa = PBXBuildFile; fileRef = F54D1E111CA35968000B280E /* Rtt_AppleFont.mm */; };
F54D1E131CA35968000B280E /* Rtt_AppleFont.mm in Sources */ = {isa = PBXBuildFile; fileRef = F54D1E111CA35968000B280E /* Rtt_AppleFont.mm */; };
F54D8E2A1B4B29120063F98B /* ForceFeedback.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F54D8E291B4B29120063F98B /* ForceFeedback.framework */; };
Expand Down Expand Up @@ -3307,7 +3307,7 @@
F53594B51B6185EA00C8CAAD /* Rtt_TextureResourceCanvasAdapter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Rtt_TextureResourceCanvasAdapter.cpp; path = Display/Rtt_TextureResourceCanvasAdapter.cpp; sourceTree = "<group>"; };
F53594B61B6185EA00C8CAAD /* Rtt_TextureResourceCanvasAdapter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Rtt_TextureResourceCanvasAdapter.h; path = Display/Rtt_TextureResourceCanvasAdapter.h; sourceTree = "<group>"; };
F53C32832404E25600BC2BED /* CoronaBuilderPluginCollector.lua */ = {isa = PBXFileReference; lastKnownFileType = text; name = CoronaBuilderPluginCollector.lua; path = ../platform/resources/CoronaBuilderPluginCollector.lua; sourceTree = "<group>"; };
F545474A21178F7400D5EDB7 /* linuxtemplate.tar.gz */ = {isa = PBXFileReference; lastKnownFileType = archive.gzip; name = linuxtemplate.tar.gz; path = ../resources/linuxtemplate.tar.gz; sourceTree = "<group>"; };
F545474A21178F7400D5EDB7 /* linuxtemplate_x64.tgz */ = {isa = PBXFileReference; lastKnownFileType = file; name = linuxtemplate_x64.tgz; path = ../resources/linuxtemplate_x64.tgz; sourceTree = "<group>"; };
F54D1E111CA35968000B280E /* Rtt_AppleFont.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = Rtt_AppleFont.mm; path = ../apple/Rtt_AppleFont.mm; sourceTree = "<group>"; };
F54D8E291B4B29120063F98B /* ForceFeedback.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ForceFeedback.framework; path = System/Library/Frameworks/ForceFeedback.framework; sourceTree = SDKROOT; };
F55407F31C74ECDE007F53C9 /* Rtt_TextureResourceExternalAdapter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Rtt_TextureResourceExternalAdapter.cpp; path = Display/Rtt_TextureResourceExternalAdapter.cpp; sourceTree = "<group>"; };
Expand Down Expand Up @@ -4282,7 +4282,7 @@
F57469D6240291FA00CA5949 /* iostemplate */,
F5C39D7C23EBCC280058DD5E /* CoronaSimulator.entitlements */,
F500FB3F1FED5CE20050B28B /* webtemplate.zip */,
F545474A21178F7400D5EDB7 /* linuxtemplate.tar.gz */,
F545474A21178F7400D5EDB7 /* linuxtemplate_x64.tgz */,
F5A633E5216D74E10052364E /* raspbiantemplate.tar.gz */,
C2088D251D8A1B8300F2AD0B /* device-support */,
C220A3B31BFBED7F00161EC8 /* xcodesim_syslog.sh */,
Expand Down Expand Up @@ -6486,7 +6486,7 @@
00B73E2412B727240057F594 /* Password.xib in Resources */,
00B73E2512B727240057F594 /* Preferences.xib in Resources */,
00E14F6513428CBF0089C390 /* Localizable.strings in Resources */,
F545475321178F7400D5EDB7 /* linuxtemplate.tar.gz in Resources */,
F545475321178F7400D5EDB7 /* linuxtemplate_x64.tgz in Resources */,
C2C756D618CE49CF0018900A /* widget_theme_ios@2x.png in Resources */,
C2C756D718CE49CF0018900A /* widget_theme_onOff_mask.png in Resources */,
C21D9DBD1BF67C300042C5A9 /* android_syslog.sh in Resources */,
Expand Down

0 comments on commit 7e12e32

Please sign in to comment.