This repository has been archived by the owner on Mar 18, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
84 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions
11
installer/mac/Install Legacy Support.app/Contents/Info.plist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>CFBundleExecutable</key> | ||
<string>install.sh</string> | ||
<key>CFBundleIconFile</key> | ||
<string>Icon</string> | ||
</dict> | ||
</plist> | ||
|
19 changes: 19 additions & 0 deletions
19
installer/mac/Install Legacy Support.app/Contents/MacOS/install.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/bash | ||
CURRENT_DIR=$(dirname "$0") | ||
DEST_DIR="$HOME/.CocosCreator/packages/" | ||
|
||
mkdir -p -v $DEST_DIR | ||
cd $DEST_DIR | ||
|
||
cd "$CURRENT_DIR/../Resources/dists/" | ||
cp -Rf . "$DEST_DIR" | ||
|
||
cd "$CURRENT_DIR/../Resources" | ||
ICON_PATH="$(pwd)/Icon.icns" | ||
|
||
MESSGE="Install Completed. Enjoy It!\n\nHow to use:\n 1. Launch Creator, open your Creator project\n 2. Choose menu 'Project -> Legacy Support -> Setup Target Project\n 3. Copy support library and Build\n\nMore information please check\nhttps://github.com/cocos-creator/creator-lua" | ||
TITLE="Install Creator Legacy Support" | ||
|
||
CMD="tell app \"System Events\" to display dialog \"$MESSGE\" buttons \"OK\" with icon POSIX file \"$ICON_PATH\" with title \"$TITLE\"" | ||
osascript -e "$CMD" | ||
|
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"title": "Install Creator Legacy Support VERSION", | ||
"icon": "../assets/Icon.icns", | ||
"icon-size": 256, | ||
"window": { | ||
"size": { | ||
"width": 480, | ||
"height": 400 | ||
} | ||
}, | ||
"contents": [ | ||
{ | ||
"x": 240, | ||
"y": 160, | ||
"type": "file", | ||
"path": "Install Legacy Support.app" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/bin/bash | ||
CURRENT_DIR=$(cd "$(dirname $0)" && pwd) | ||
|
||
PACKAGE_NAME="creator-legacy-support" | ||
APP_NAME="Install Legacy Support" | ||
APP_DIR="$CURRENT_DIR/$APP_NAME.app" | ||
DISTS_DIR="$APP_DIR/Contents/Resources/dists/$PACKAGE_NAME" | ||
PACKAGE_SRCDIR="$CURRENT_DIR/../../creator-project/packages/$PACKAGE_NAME/" | ||
PACKAGE_VERSION=$( sed -n 's/.*"version": "\(.*\)",/\1/p' "$PACKAGE_SRCDIR/package.json" ) | ||
DMG_FILENAME="Install-Creator-Legacy-Support-$PACKAGE_VERSION.dmg" | ||
CONFIG_FILENAME="install-dmg.json" | ||
TEMP_CONFIG_FILENAME="install-dmg-work.json" | ||
|
||
sed "s/VERSION/$PACKAGE_VERSION/g" "$CONFIG_FILENAME" > "$TEMP_CONFIG_FILENAME" | ||
|
||
mkdir -p "$DISTS_DIR" | ||
|
||
cd "$DISTS_DIR" | ||
cp -R "$PACKAGE_SRCDIR" . | ||
|
||
cd "$CURRENT_DIR" | ||
|
||
if [ -f "$DMG_FILENAME" ]; then | ||
rm "$DMG_FILENAME" | ||
fi | ||
|
||
appdmg "$TEMP_CONFIG_FILENAME" "$DMG_FILENAME" | ||
rm "$TEMP_CONFIG_FILENAME" | ||
|
||
open . | ||
|