Skip to content

Commit 8045389

Browse files
author
None
committed
Mac App判断是否存在
1 parent fd348d1 commit 8045389

6 files changed

Lines changed: 34 additions & 14 deletions

File tree

‎Assembly-CSharp-Editor.csproj‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,10 @@
241241
<Reference Include="UnityEditor.iOS.Extensions.Common">
242242
<HintPath>/Applications/Unity/PlaybackEngines/iOSSupport/UnityEditor.iOS.Extensions.Common.dll</HintPath>
243243
</Reference>
244+
</ItemGroup>
245+
<ItemGroup>
246+
<ProjectReference Include="Assembly-CSharp.csproj">
247+
<Project>{C9FDEFFB-4FAB-3868-9F69-14816408FD50}</Project> <Name>Assembly-CSharp</Name> </ProjectReference>
244248
</ItemGroup>
245249
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
246250
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.

‎Assets/Main.unity‎

5.01 KB
Binary file not shown.
1.51 KB
Binary file not shown.

‎AutoBuild/.idea/workspace.xml‎

Lines changed: 18 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎AutoBuild/autobuild.py‎

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ def UnityAndroidProjToApk():
282282

283283
return True
284284

285-
#生成MACK的APP
285+
#生成MAC的APP
286286
def UnityMacProjToApp():
287287
global MacAppName
288288

@@ -310,12 +310,12 @@ def UnityMacProjToApp():
310310
process = subprocess.Popen(cmd, shell=True)
311311
montior.follow(process, 2)
312312

313-
'''
314-
macApp = "%s/%s" % (GetMacExportProjPath(), MacAppName)
315-
if (not os.path.exists(macApp)):
313+
macApp = "%s/%s.app" % (GetMacExportProjPath(), MacAppName)
314+
#print macApp
315+
if (not os.access(macApp, os.F_OK)):
316316
print "\n生成App失败~~!!!\n"
317317
return False
318-
'''
318+
319319
return True
320320

321321
#导出WINDOWS的EXE
@@ -453,6 +453,10 @@ def UnityToExe():
453453
os.system("Unity.exe -quit -batchmode -nographics -projectPath %s -executeMethod AssetBundleBuild.Cmd_Win" % projPath)
454454
return True
455455

456+
#检查是否有UNITY进程,如果有提示杀死
457+
def CheckUnityAppRun():
458+
return
459+
456460
# 主函数
457461
def Main():
458462

@@ -461,6 +465,8 @@ def Main():
461465
if (IsWindowsPlatform()):
462466
print "打包前请确认设置好Unity.exe环境变量"
463467

468+
CheckUnityAppRun()
469+
464470
LoadVersionInfo()
465471
UserInputVersion()
466472
SaveVersionInfo()

‎UnityResourceMgr.userprefs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<MonoDevelop.Ide.Workspace ActiveConfiguration="Debug" PreferredExecutionTarget="Unity.Instance.Unity Editor" />
33
<MonoDevelop.Ide.Workbench ActiveDocument="Assets/Editor/ABBuild.cs">
44
<Files>
5-
<File FileName="Assets/Editor/ABBuild.cs" Line="4229" Column="40" />
5+
<File FileName="Assets/Editor/ABBuild.cs" Line="2233" Column="2" />
66
</Files>
77
</MonoDevelop.Ide.Workbench>
88
<MonoDevelop.Ide.DebuggingService.Breakpoints>

0 commit comments

Comments
 (0)