Skip to content

Commit

Permalink
On Mac, make an app bundle rather than a bare executable. (#54)
Browse files Browse the repository at this point in the history
  • Loading branch information
dri-richard committed Dec 9, 2023
1 parent 57994f7 commit 33c2cd0
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 2 deletions.
6 changes: 5 additions & 1 deletion Build/netImgui.sharpmake.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,11 @@ public override void ConfigureAll(Configuration conf, NetImguiTarget target)
conf.Options.Add(new Options.Vc.Linker.DisableSpecificWarnings("4099")); //Prevents: warning LNK4099: PDB '' was not found with 'glfw3_mtd.lib(context.c.obj)' or at ''; linking object as if no debug info
//---------------------------------------------

if (target.DevEnv != DevEnv.xcode4ios)
if (target.DevEnv == DevEnv.xcode4ios)
{
conf.Options.Add(new Sharpmake.Options.XCode.Compiler.InfoPListFile(NetImguiTarget.GetPath(@"/Code/ServerApp/info.plist")));
}
else
{
conf.EventPostBuild.Add("xcopy \"" + NetImguiTarget.GetPath(@"\Code\ServerApp\Background.png") + "\" \"" + conf.TargetPath + "\" /D /Y");
}
Expand Down
2 changes: 1 addition & 1 deletion Build/shared.sharpmake_mac.cs
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ public virtual void ConfigureAll(Configuration conf, NetImguiTarget target)
conf.TargetPath = NetImguiTarget.GetPath( mIsExe ? @"/_Bin/[target.DevEnv]_[target.Compiler]_[target.Platform]"
: @"\_generated/Libs\[target.DevEnv]_[target.Compiler]_[target.Platform]");
conf.IntermediatePath = NetImguiTarget.GetPath(@"/_intermediate\[target.DevEnv]_[target.Compiler]_[target.Platform]_[target.Optimization]/[project.Name]");
conf.Output = mIsExe ? Project.Configuration.OutputType.Exe : Project.Configuration.OutputType.Lib;
conf.Output = mIsExe ? Project.Configuration.OutputType.IosApp : Project.Configuration.OutputType.Lib;

conf.IncludePaths.Add(NetImguiTarget.GetPath(ProjectImgui.sDefaultPath) + @"\backends");

Expand Down
24 changes: 24 additions & 0 deletions Code/ServerApp/info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIdentifier</key>
<string>com.yourcompany.${PRODUCT_NAME:rfc1034identifier}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>NSPrincipalClass</key>
<string></string>
</dict>
</plist>

0 comments on commit 33c2cd0

Please sign in to comment.