1
0
Fork 0

Merge branch 'refactor'

master
Ambrose Chua 2016-09-01 23:49:57 +08:00
commit 98e63bc0f7
165 changed files with 19 additions and 61619 deletions

4
.gitignore vendored
View File

@ -1,2 +1,2 @@
apikey.js
release/
src/apikey.js
build/

View File

@ -11,26 +11,11 @@ Code and design MIT Licensed.
**Please do this to prevent API overload! **
Check out the file `Youpp.app/Contents/Resources/app.nw/apikey-sample.js`, dump in your YouTube API key and rename to `apikey.js`.
Check out the file `apikey-sample.js`, dump in your YouTube API key and rename to `apikey.js`.
## Where?
## Packaging
All the fun happens in `Youpp.app/Contents/Resources/app.nw/`. All powered by node-webkit!
## How to use.
Well, I just dumped the .app folder here because I left the node-webkit, so you can just `git clone` the app down and run it.
### Developing or running on a Mac
node-webkit updates will have to be replaced on your own. [Download it](https://github.com/rogerwang/node-webkit/#downloads). Just keep the `Resources` and `Info.plist` files in the Youpp.app folder.
### Packaging for Windows
1. Run **build.bat**
2. Enjoy your new build in the **/release** folder
6. share your build.
### [Packaging for Linux](https://github.com/rogerwang/node-webkit/wiki/How-to-package-and-distribute-your-apps#wiki-linux)
If you use Linux, you don't need help from this Linux newbie.
```
sudo npm i -g nwjs-builder
./build.sh
```

View File

@ -1,65 +0,0 @@
<?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>CFBundleDisplayName</key>
<string>Youpp</string>
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeIconFile</key>
<string>icon.icns</string>
<key>CFBundleTypeName</key>
<string>Youpp</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
<key>LSHandlerRank</key>
<string>Owner</string>
<key>LSItemContentTypes</key>
<array>
<string>com.euricainc.ambc.youpp</string>
</array>
</dict>
<dict>
<key>CFBundleTypeName</key>
<string>Folder</string>
<key>CFBundleTypeOSTypes</key>
<array>
<string>fold</string>
</array>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
<key>LSHandlerRank</key>
<string>None</string>
</dict>
</array>
<key>CFBundleExecutable</key>
<string>nwjs</string>
<key>CFBundleIconFile</key>
<string>icon.icns</string>
<key>CFBundleIdentifier</key>
<string>com.intel.nw</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>Youpp</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>0.0.3</string>
<key>CFBundleVersion</key>
<string></string>
<key>LSFileQuarantineEnabled</key>
<true/>
<key>LSMinimumSystemVersion</key>
<string>10.6.0</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
<key>NSSupportsAutomaticGraphicsSwitching</key>
<true/>
<key>SCMRevision</key>
<string>222137</string>
</dict>
</plist>

Binary file not shown.

View File

@ -1 +0,0 @@
APPL????

View File

@ -1,3 +0,0 @@
module.exports = {
youtubekey: "AIzaSyD88ejeWUIVWmU7j5lhZNLyP9q3S6TFtFQ"
};

View File

@ -1,50 +0,0 @@
<?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>BreakpadProduct</key>
<string>nwjs_Mac</string>
<key>BreakpadProductDisplay</key>
<string>nwjs</string>
<key>BreakpadReportInterval</key>
<string>3600</string>
<key>BreakpadSendAndExit</key>
<string>YES</string>
<key>BreakpadSkipConfirm</key>
<string>YES</string>
<key>BreakpadURL</key>
<string>none</string>
<key>BreakpadVersion</key>
<string>53.0.2785.89</string>
<key>BuildMachineOSBuild</key>
<string>14D136</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>nwjs Framework</string>
<key>CFBundleIdentifier</key>
<string>io.nwjs.nwjs.framework</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>53.0.2785.89</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>2785.89</string>
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTSDKBuild</key>
<string>10.10</string>
<key>DTSDKName</key>
<string>macosx10.10</string>
<key>DTXcode</key>
<string>0631</string>
<key>DTXcodeBuild</key>
<string>6D1002</string>
<key>SCMRevision</key>
<string>368272317154efca67e932b2d2fa03d4da3b5247</string>
</dict>
</plist>

View File

@ -1,50 +0,0 @@
<?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>BuildMachineOSBuild</key>
<string>14D136</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>app_mode_loader</string>
<key>CFBundleIconFile</key>
<string>app.icns</string>
<key>CFBundleIdentifier</key>
<string>io.nwjs.nwjs.app.@APP_MODE_SHORTCUT_ID@</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>@APP_MODE_SHORTCUT_ID@</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>53.0.2785.89</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>2785.89</string>
<key>CrAppModeShortcutID</key>
<string>@APP_MODE_SHORTCUT_ID@</string>
<key>CrAppModeShortcutName</key>
<string>@APP_MODE_SHORTCUT_NAME@</string>
<key>CrAppModeShortcutURL</key>
<string>@APP_MODE_SHORTCUT_URL@</string>
<key>CrBundleIdentifier</key>
<string>@APP_MODE_BROWSER_BUNDLE_ID@</string>
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTSDKBuild</key>
<string>10.10</string>
<key>DTSDKName</key>
<string>macosx10.10</string>
<key>DTXcode</key>
<string>0631</string>
<key>DTXcodeBuild</key>
<string>6D1002</string>
<key>LSMinimumSystemVersion</key>
<string>10.9.0</string>
<key>NSAppleScriptEnabled</key>
<true/>
</dict>
</plist>

View File

@ -1,126 +0,0 @@
#!/bin/bash -p
# Copyright (c) 2011 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Called by the application to install in a new location. Generally, this
# means that the application is running from a disk image and wants to be
# copied to /Applications. The application, when running from the disk image,
# will call this script to perform the copy.
#
# This script will be run as root if the application determines that it would
# not otherwise have permission to perform the copy.
#
# When running as root, this script will be invoked with the real user ID set
# to the user's ID, but the effective user ID set to 0 (root). bash -p is
# used on the first line to prevent bash from setting the effective user ID to
# the real user ID (dropping root privileges).
set -e
# This script may run as root, so be paranoid about things like ${PATH}.
export PATH="/usr/bin:/usr/sbin:/bin:/sbin"
# If running as root, output the pid to stdout before doing anything else.
# See chrome/browser/mac/authorization_util.h.
if [ ${EUID} -eq 0 ] ; then
echo "${$}"
fi
if [ ${#} -ne 2 ] ; then
echo "usage: ${0} SRC DEST" >& 2
exit 2
fi
SRC=${1}
DEST=${2}
# Make sure that SRC is an absolute path and that it exists.
if [ -z "${SRC}" ] || [ "${SRC:0:1}" != "/" ] || [ ! -d "${SRC}" ] ; then
echo "${0}: source ${SRC} sanity check failed" >& 2
exit 3
fi
# Make sure that DEST is an absolute path and that it doesn't yet exist.
if [ -z "${DEST}" ] || [ "${DEST:0:1}" != "/" ] || [ -e "${DEST}" ] ; then
echo "${0}: destination ${DEST} sanity check failed" >& 2
exit 4
fi
# Do the copy.
rsync -lrpt "${SRC}/" "${DEST}"
# The remaining steps are not considered critical.
set +e
# Notify LaunchServices.
CORESERVICES="/System/Library/Frameworks/CoreServices.framework"
LAUNCHSERVICES="${CORESERVICES}/Frameworks/LaunchServices.framework"
LSREGISTER="${LAUNCHSERVICES}/Support/lsregister"
"${LSREGISTER}" -f "${DEST}"
# If this script is not running as root and the application is installed
# somewhere under /Applications, try to make it writable by all admin users.
# This will allow other admin users to update the application from their own
# user Keystone instances even if the Keystone ticket is not promoted to
# system level.
#
# If the script is not running as root and the application is not installed
# under /Applications, it might not be in a system-wide location, and it
# probably won't be something that other users on the system are running, so
# err on the side of safety and don't make it group-writable.
#
# If this script is running as root, a Keystone ticket promotion is expected,
# and future updates can be expected to be applied as root, so
# admin-writeability is not a concern. Set the entire thing to be owned by
# root in that case, regardless of where it's installed, and drop any group
# and other write permission.
#
# If this script is running as a user that is not a member of the admin group,
# the chgrp operation will not succeed. Tolerate that case, because it's
# better than the alternative, which is to make the application
# world-writable.
CHMOD_MODE="a+rX,u+w,go-w"
if [ ${EUID} -ne 0 ] ; then
if [ "${DEST:0:14}" = "/Applications/" ] &&
chgrp -Rh admin "${DEST}" >& /dev/null ; then
CHMOD_MODE="a+rX,ug+w,o-w"
fi
else
chown -Rh root:wheel "${DEST}" >& /dev/null
fi
chmod -R "${CHMOD_MODE}" "${DEST}" >& /dev/null
# On the Mac, or at least on HFS+, symbolic link permissions are significant,
# but chmod -R and -h can't be used together. Do another pass to fix the
# permissions on any symbolic links.
find "${DEST}" -type l -exec chmod -h "${CHMOD_MODE}" {} + >& /dev/null
# Host OS version check, to be able to take advantage of features on newer
# systems and fall back to slow ways of doing things on older systems.
OS_VERSION=$(sw_vers -productVersion)
OS_MAJOR=$(sed -Ene 's/^([0-9]+).*/\1/p' <<< ${OS_VERSION})
OS_MINOR=$(sed -Ene 's/^([0-9]+)\.([0-9]+).*/\2/p' <<< ${OS_VERSION})
# Because this script is launched by the application itself, the installation
# process inherits the quarantine bit (LSFileQuarantineEnabled). Any files or
# directories created during the update will be quarantined in that case,
# which may cause Launch Services to display quarantine UI. That's bad,
# especially if it happens when the outer .app launches a quarantined inner
# helper. Since the user approved the application launch if quarantined, it
# it can be assumed that the installed copy should not be quarantined. Use
# xattr to drop the quarantine attribute.
QUARANTINE_ATTR=com.apple.quarantine
if [ ${OS_MAJOR} -gt 10 ] ||
([ ${OS_MAJOR} -eq 10 ] && [ ${OS_MINOR} -ge 6 ]) ; then
# On 10.6, xattr supports -r for recursive operation.
xattr -d -r "${QUARANTINE_ATTR}" "${DEST}" >& /dev/null
else
# On earlier systems, xattr doesn't support -r, so run xattr via find.
find "${DEST}" -exec xattr -d "${QUARANTINE_ATTR}" {} + >& /dev/null
fi
# Great success!
exit 0

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Some files were not shown because too many files have changed in this diff Show More