forked from adobe/brackets-shell
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'glenn/win-build-script' into glenn/gyp
- Loading branch information
Showing
17 changed files
with
760 additions
and
563 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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
File renamed without changes.
File renamed without changes.
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,68 @@ | ||
// Microsoft Visual C++ generated resource script. | ||
// | ||
#include "resource.h" | ||
|
||
#define APSTUDIO_READONLY_SYMBOLS | ||
///////////////////////////////////////////////////////////////////////////// | ||
// | ||
// Generated from the TEXTINCLUDE 2 resource. | ||
// | ||
#define APSTUDIO_HIDDEN_SYMBOLS | ||
#include "windows.h" | ||
#undef APSTUDIO_HIDDEN_SYMBOLS | ||
|
||
#define OS_WIN | ||
#include "config.h" | ||
|
||
///////////////////////////////////////////////////////////////////////////// | ||
#undef APSTUDIO_READONLY_SYMBOLS | ||
|
||
///////////////////////////////////////////////////////////////////////////// | ||
// English (U.S.) resources | ||
|
||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) | ||
#ifdef _WIN32 | ||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US | ||
#pragma code_page(1252) | ||
#endif //_WIN32 | ||
|
||
///////////////////////////////////////////////////////////////////////////// | ||
// | ||
// VersionInfo | ||
// | ||
|
||
VS_VERSION_INFO VERSIONINFO | ||
FILEVERSION 0,18,0,0 | ||
/* PRODUCTVERSION 1,0,0,0 */ | ||
FILEOS VOS__WINDOWS32 | ||
FILETYPE VFT_APP | ||
BEGIN | ||
BLOCK "StringFileInfo" | ||
BEGIN | ||
BLOCK "040904E4" | ||
BEGIN | ||
VALUE "CompanyName", "brackets.io\0" | ||
VALUE "FileDescription", "\0" | ||
VALUE "FileVersion", "Sprint 18\0" | ||
VALUE "ProductName", APP_NAME "\0" | ||
VALUE "ProductVersion", "\0" | ||
VALUE "LegalCopyright", "(c) 2012 Adobe Systems, Inc.\0" | ||
END | ||
END | ||
|
||
BLOCK "VarFileInfo" | ||
BEGIN | ||
/* The following line should only be modified for localized versions. */ | ||
/* It consists of any number of WORD,WORD pairs, with each pair */ | ||
/* describing a language,codepage combination supported by the file. */ | ||
/* */ | ||
/* For example, a file might have values "0x409,1252" indicating that it */ | ||
/* supports English language (0x409) in the Windows ANSI codepage (1252). */ | ||
|
||
VALUE "Translation", 0x409, 1252 | ||
VALUE "Translation", 0x40C, 1252 | ||
END | ||
END | ||
|
||
#endif // !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) | ||
|
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,5 @@ | ||
{ | ||
'variables': { | ||
'appname': "Brackets" | ||
} | ||
} |
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
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
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
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,109 @@ | ||
# SETUP - MAC | ||
# - Install xcode | ||
# - Install xcode command line tools | ||
# - Install DropDMG, including the dropdmg command line tool | ||
# SETUP - WIN | ||
# - Install Visual Studio 2010 (Express is fine) | ||
# SETUP - COMMON | ||
# - Setup source directories as specified in README.md | ||
# (copy CEF binary, run scripts/make_symlinks.sh, etc.) | ||
# - Set BRACKETS_SRC environment variable, pointing to the | ||
# brackets source code (without trailing '/') | ||
# - Optionally, set BRACKETS_APP_NAME environment variable with the | ||
# name of the application. (This should match the app name built | ||
# by the gyp project, and need not match the final installed build name.) | ||
# - Optionally, set BRACKETS_SHELL_BRANCH and BRACKETS_BRANCH | ||
# to the branches you want to build. | ||
|
||
# Make sure BRACKETS_SRC environment variable is set | ||
if [ "$BRACKETS_SRC" = "" ]; then | ||
echo "The BRACKETS_SRC environment variable must be set to the location of the Brackets source folder. Aborting." | ||
exit | ||
fi | ||
|
||
# Default the app name to "Brackets", but override with $BRACKETS_APP_NAME if set | ||
if [ "$BRACKETS_APP_NAME" = "" ]; then | ||
export BRACKETS_APP_NAME="Brackets" | ||
fi | ||
|
||
# Default the branches to "master" | ||
# You can set either branch name to "NO_FETCH" to skip the fetching for that repo | ||
if [ "$BRACKETS_SHELL_BRANCH" = "" ]; then | ||
export BRACKETS_SHELL_BRANCH="master" | ||
fi | ||
if [ "$BRACKETS_BRANCH" = "" ]; then | ||
export BRACKETS_BRANCH="master" | ||
fi | ||
|
||
# Pull the latest code | ||
curDir=`pwd` | ||
cd "$BRACKETS_SRC" | ||
if [ "$BRACKETS_BRANCH" != "NO_FETCH" ]; then | ||
git checkout "$BRACKETS_BRANCH" | ||
git pull origin "$BRACKETS_BRANCH" | ||
git submodule update --init --recursive | ||
else | ||
echo "Skipping fetch for brackets repo" | ||
fi | ||
build_num=`git log --oneline | wc -l | tr -d ' '` | ||
brackets_sha=`git log | head -1 | sed -e 's/commit \([0-9a-f]*$\)/\1/'` | ||
cd $curDir | ||
if [ "$BRACKETS_SHELL_BRANCH" != "NO_FETCH" ]; then | ||
git checkout "$BRACKETS_SHELL_BRANCH" | ||
git pull origin "$BRACKETS_SHELL_BRANCH" | ||
else | ||
echo "Skipping fetch for brackets-shell repo" | ||
fi | ||
|
||
os=${OSTYPE//[0-9.]/} | ||
|
||
if [ "$os" = "darwin" ]; then # Building on mac | ||
# Clean and build the xcode project | ||
xcodebuild -project appshell.xcodeproj -config Release clean | ||
xcodebuild -project appshell.xcodeproj -config Release build | ||
|
||
# Package www files | ||
scripts/package_www_files.sh | ||
|
||
# Remove existing staging dir | ||
if [ -d installer/mac/staging ]; then | ||
rm -rf installer/mac/staging | ||
fi | ||
|
||
mkdir installer/mac/staging | ||
|
||
# Copy to installer staging folder | ||
cp -R "xcodebuild/Release/${BRACKETS_APP_NAME}.app" installer/mac/staging/ | ||
packageLocation="installer/mac/staging/${BRACKETS_APP_NAME}.app/Contents/www" | ||
|
||
elif [ "$os" = "msys" ]; then # Building on Windows | ||
|
||
# Clean and build the Visual Studio project | ||
cmd /k "scripts\build_projects.bat" | ||
|
||
# Stage files for installer | ||
cmd /k "scripts\stage_for_installer.bat" | ||
|
||
packageLocation="installer/win/staging/www" | ||
|
||
else | ||
echo "Unknown platform \"$os\". I don't know how to build this." | ||
exit; | ||
fi | ||
|
||
|
||
# Set the build number, branch and sha on the staged build | ||
cat "$packageLocation/package.json" \ | ||
| sed "s:\(\"version\"[^\"]*\"[0-9.]*-\)\([0-9*]\)\(\"\):\1$build_num\3:" \ | ||
| sed "s:\(\"branch\"[^\"]*\"\)\([^\"]*\)\(\"\):\1$BRACKETS_BRANCH\3:" \ | ||
| sed "s:\(\"SHA\"[^\"]*\"\)\([^\"]*\)\(\"\):\1$brackets_sha\3:" \ | ||
> tmp_package_json.txt | ||
mv tmp_package_json.txt "$packageLocation/package.json" | ||
|
||
# Build the installer | ||
if [ "$os" = "darwin" ]; then # Build mac installer | ||
cd installer/mac | ||
./buildInstaller.sh | ||
|
||
# TODO: Build windows installer | ||
fi |
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
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,7 @@ | ||
:: Batch file that sets up Visual Studio command line tools and builds appshell.sln | ||
:: This file should *not* be called directly. It is called by the build.sh script. | ||
|
||
call "%VS100COMNTOOLS%/vsvars32.bat" | ||
msbuild.exe appshell.sln /t:Clean /p:Platform=Win32 /p:Configuration=Release | ||
msbuild.exe appshell.sln /t:Build /p:Platform=Win32 /p:Configuration=Release | ||
exit |
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,7 @@ | ||
:: Batch file that simply calls installer/win/stageForInstaller. | ||
:: This file is used by build.sh | ||
|
||
cd installer/win | ||
call stageForInstaller.bat | ||
cd ../.. | ||
exit |