Skip to content

Commit

Permalink
Mark need republish when clean cache is clicked.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jia Liu committed May 13, 2013
1 parent d018c97 commit 05c0368
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 6 additions & 1 deletion CocosBuilder/ccBuilder/CCBPublisher.m
Original file line number Diff line number Diff line change
Expand Up @@ -821,7 +821,6 @@ - (BOOL) publishAllToDirectory:(NSString*)dir
{
NSFileManager *fm = [NSFileManager defaultManager];
[fm removeItemAtPath:dir error:NULL];
projectSettings.needRepublish = NO;
}

// Setup paths for automatically generated sprite sheets
Expand Down Expand Up @@ -1096,6 +1095,12 @@ - (BOOL) publish_
}
}

// Once published, set needRepublish back to NO
if (projectSettings.needRepublish)
{
projectSettings.needRepublish = NO;
[projectSettings store];
}
return YES;
}

Expand Down
2 changes: 2 additions & 0 deletions CocosBuilder/ccBuilder/CocosBuilderAppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -2281,6 +2281,8 @@ - (IBAction)menuPublishProjectAndRunInBrowser:(id)sender

- (IBAction) menuCleanCacheDirectories:(id)sender
{
projectSettings.needRepublish = YES;
[projectSettings store];
[CCBPublisher cleanAllCacheDirectories];
}

Expand Down

0 comments on commit 05c0368

Please sign in to comment.