Merge branch 'future' of git://github.com/siana/SingularityViewer.git into future

This commit is contained in:
Shyotl
2011-10-14 22:59:03 -05:00
22 changed files with 216 additions and 128 deletions

View File

@@ -62,13 +62,12 @@ elseif (LINUX)
else (STANDALONE)
set(WEBKIT_PLUGIN_LIBRARIES
llqtwebkit
qgif
qjpeg
QtWebKit
QtOpenGL
QtNetwork
QtGui
QtCore
jscore
jpeg
fontconfig
X11

View File

@@ -376,7 +376,7 @@ S32 LLImageJ2C::calcDataSizeJ2C(S32 w, S32 h, S32 comp, S32 discard_level, F32 r
discard_level--;
}
S32 bytes = (S32)((F32)(w*h*comp)*rate);
bytes = llmax(bytes, calcHeaderSizeJ2C());
//bytes = llmax(bytes, calcHeaderSizeJ2C());
return bytes;
}
@@ -396,9 +396,11 @@ S32 LLImageJ2C::calcDataSize(S32 discard_level)
static const LLCachedControl<S32> offset("SianaJ2CSizeOffset", 0);
S32 size = calcDataSizeJ2C(getWidth(), getHeight(), getComponents(), discard_level, mRate);
S32 size_d0 = calcDataSizeJ2C(getWidth(), getHeight(), getComponents(), discard_level, mRate);
return pow(size/size_d0, exponent)*size_d0 + offset;
S32 size_d0 = calcDataSizeJ2C(getWidth(), getHeight(), getComponents(), 0, mRate);
llassert_always(size_d0);
S32 bytes = pow(size/size_d0, exponent)*size_d0 + offset;
bytes = llmax(bytes, calcHeaderSizeJ2C());
return bytes;
}
discard_level = llclamp(discard_level, 0, MAX_DISCARD_LEVEL);
@@ -412,6 +414,7 @@ S32 LLImageJ2C::calcDataSize(S32 discard_level)
while ( level >= 0 )
{
mDataSizes[level] = calcDataSizeJ2C(getWidth(), getHeight(), getComponents(), level, mRate);
mDataSizes[level] = llmax(mDataSizes[level], calcHeaderSizeJ2C());
level--;
}

View File

@@ -1,38 +1,38 @@
/**
* @file message_prehash.cpp
* @brief file of prehashed variables
*
* $LicenseInfo:firstyear=2003&license=viewergpl$
*
* Copyright (c) 2003-2009, Linden Research, Inc.
*
* Second Life Viewer Source Code
* The source code in this file ("Source Code") is provided by Linden Lab
* to you under the terms of the GNU General Public License, version 2.0
* ("GPL"), unless you have obtained a separate licensing agreement
* ("Other License"), formally executed by you and Linden Lab. Terms of
* the GPL can be found in doc/GPL-license.txt in this distribution, or
* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
*
* There are special exceptions to the terms and conditions of the GPL as
* it is applied to this Source Code. View the full text of the exception
* in the file doc/FLOSS-exception.txt in this software distribution, or
* online at
* http://secondlifegrid.net/programs/open_source/licensing/flossexception
*
* By copying, modifying or distributing this software, you acknowledge
* that you have read and understood your obligations described above,
* and agree to abide by those obligations.
*
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
* COMPLETENESS OR PERFORMANCE.
* $/LicenseInfo$
*/
* @file message_prehash.cpp
* @brief file of prehashed variables
*
* $LicenseInfo:firstyear=2003&license=viewergpl$
*
* Copyright (c) 2003-2009, Linden Research, Inc.
*
* Second Life Viewer Source Code
* The source code in this file ("Source Code") is provided by Linden Lab
* to you under the terms of the GNU General Public License, version 2.0
* ("GPL"), unless you have obtained a separate licensing agreement
* ("Other License"), formally executed by you and Linden Lab. Terms of
* the GPL can be found in doc/GPL-license.txt in this distribution, or
* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
*
* There are special exceptions to the terms and conditions of the GPL as
* it is applied to this Source Code. View the full text of the exception
* in the file doc/FLOSS-exception.txt in this software distribution, or
* online at
* http://secondlifegrid.net/programs/open_source/licensing/flossexception
*
* By copying, modifying or distributing this software, you acknowledge
* that you have read and understood your obligations described above,
* and agree to abide by those obligations.
*
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
* COMPLETENESS OR PERFORMANCE.
* $/LicenseInfo$
*/
/**
* Generated from message template version number 2.000
*/
* Generated from message template version number 2.000
*/
#include "linden_common.h"
#include "message.h"
@@ -1389,4 +1389,4 @@ char const* const _PREHASH_ProductSKU = LLMessageStringTable::getInstance()->get
char const* const _PREHASH_SeeAVs = LLMessageStringTable::getInstance()->getString("SeeAVs");
char const* const _PREHASH_AnyAVSounds = LLMessageStringTable::getInstance()->getString("AnyAVSounds");
char const* const _PREHASH_GroupAVSounds = LLMessageStringTable::getInstance()->getString("GroupAVSounds");
char const* const _PREHASH_Language = LLMessageStringTable::getInstance()->getString("Language");
char const* const _PREHASH_Language = LLMessageStringTable::getInstance()->getString("Language");

View File

@@ -2,33 +2,34 @@
<array>
<map>
<key>default_grids_version</key><string>1</string>
<key>default_grids_version</key><string>2</string>
</map>
<!-- Second Life -->
<map>
<key>gridnick</key><string>secondlife</string>
<key>gridname</key><string>Agni</string>
<key>gridname</key><string>Second Life</string>
<key>platform</key><string>SecondLife</string>
<key>loginuri</key><string>https://login.agni.lindenlab.com/cgi-bin/login.cgi</string>
<key>loginpage</key><string>http://secondlife.com/app/login/</string>
<key>loginpage</key><string>http://viewer-login.agni.lindenlab.com/</string>
<key>helperuri</key><string>https://secondlife.com/helpers/</string>
<key>website</key><string>http://secondlife.com/</string>
<key>support</key><string>http://secondlife.com/support/</string>
<key>register</key><string>http://secondlife.com/registration/</string>
<key>password</key><string>http://secondlife.com/account/request.php</string>
<key>render_compat</key><boolean>1</boolean>
<key>inventory_links</key><boolean>1</boolean>
</map>
<map>
<key>gridnick</key><string>secondlife_beta</string>
<key>gridname</key><string>Aditi</string>
<key>gridname</key><string>Second Life BETA</string>
<key>helperuri</key><string>http://aditi-secondlife.webdev.lindenlab.com/helpers/</string>
<key>loginpage</key><string>http://secondlife.com/app/login/</string>
<key>loginpage</key><string>http://viewer-login.agni.lindenlab.com/</string>
<key>loginuri</key><string>https://login.aditi.lindenlab.com/cgi-bin/login.cgi</string>
<key>password</key><string>http://secondlife.com/account/request.php</string>
<key>platform</key><string>SecondLife</string>
<key>register</key><string>http://secondlife.com/registration/</string>
<key>render_compat</key><boolean>0</boolean>
<key>inventory_links</key><boolean>1</boolean>
<key>support</key><string>http://secondlife.com/support/</string>
<key>version</key><integer>0</integer>
<key>website</key><string>http://secondlife.com/</string>
@@ -37,7 +38,6 @@
<!-- Local Host -->
<map>
<key>gridnick</key><string>local</string>
<key>gridname</key><string>Local Host</string>
<key>platform</key><string>OpenSim</string>
<key>loginuri</key><string>http://127.0.0.1:9000/</string>

View File

@@ -796,7 +796,7 @@ void HippoGridManager::loadFromFile()
{
mDefaultGridsVersion = 0;
// load user grid info
parseFile(gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "grids_sg1.xml"), false);
parseFile(gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "grids_sg2.xml"), false);
// merge default grid info, if newer. Force load, if list of grids is empty.
parseFile(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "default_grids.xml"), !mGridInfo.empty());
// merge grid info from web site, if newer. Force load, if list of grids is empty.
@@ -957,7 +957,7 @@ void HippoGridManager::saveFile()
}
// write client grid info file
std::string fileName = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "grids_sg1.xml");
std::string fileName = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "grids_sg2.xml");
llofstream file;
file.open(fileName.c_str());
if (file.is_open())

View File

@@ -105,6 +105,7 @@ void LLFloaterMediaBrowser::draw()
media_playing = media_plugin->getStatus() == LLPluginClassMediaOwner::MEDIA_PLAYING;
}
}
childSetVisible("time_controls", show_time_controls);
childSetVisible("rewind", show_time_controls);
childSetVisible("play", show_time_controls && ! media_playing);
childSetVisible("pause", show_time_controls && media_playing);
@@ -139,7 +140,6 @@ BOOL LLFloaterMediaBrowser::postBuild()
childSetAction("pause", onClickPlay, this);
childSetAction("seek", onClickSeek, this);
childSetAction("go", onClickGo, this);
childSetAction("close", onClickClose, this);
childSetAction("open_browser", onClickOpenWebBrowser, this);
childSetAction("assign", onClickAssign, this);
@@ -284,14 +284,6 @@ void LLFloaterMediaBrowser::onClickGo(void* user_data)
self->mBrowser->navigateTo(self->mAddressCombo->getValue().asString());
}
//static
void LLFloaterMediaBrowser::onClickClose(void* user_data)
{
LLFloaterMediaBrowser* self = (LLFloaterMediaBrowser*)user_data;
self->close();
}
//static
void LLFloaterMediaBrowser::onClickOpenWebBrowser(void* user_data)
{

View File

@@ -85,7 +85,6 @@ public:
static void onClickBack(void* user_data);
static void onClickForward(void* user_data);
static void onClickGo(void* user_data);
static void onClickClose(void* user_data);
static void onClickOpenWebBrowser(void* user_data);
static void onClickAssign(void* user_data);
static void onClickRewind(void* user_data);

View File

@@ -942,7 +942,6 @@ void LLPanelLogin::loadLoginPage()
}
// Grid
oStr << "&grid=" << LLWeb::curlEscape(LLViewerLogin::getInstance()->getGridLabel());
if (gHippoGridManager->getConnectedGrid()->isSecondLife()) {
// find second life grid from login URI
@@ -960,6 +959,11 @@ void LLPanelLogin::loadLoginPage()
}
}
}
else
{
oStr << "&grid=" << LLWeb::curlEscape(LLViewerLogin::getInstance()->getGridLabel());
}
gViewerWindow->setMenuBackgroundColor(false, !LLViewerLogin::getInstance()->isInProductionGrid());
gLoginMenuBarView->setBackgroundColor(gMenuBarView->getBackgroundColor());

View File

@@ -372,7 +372,7 @@ bool idle_startup()
static U64 first_sim_handle = 0;
static LLHost first_sim;
static std::string first_sim_seed_cap;
static U32 first_sim_size_x = 256;
static U32 first_sim_size_x = 256;
static U32 first_sim_size_y = 256;
static LLVector3 initial_sun_direction(1.f, 0.f, 0.f);

View File

@@ -400,7 +400,6 @@ class SGHostBlackList{
int errorCount;
};
static LLMutex* sMutex;
typedef std::vector<BlackListEntry> blacklist_t;
//Why is it a vector? because using std::map for just 1-2 values is insane-ish.
typedef blacklist_t::iterator iter;
@@ -423,22 +422,10 @@ class SGHostBlackList{
return blacklist.end();
}
static void lock() {
if (!sMutex)
sMutex = new LLMutex;
sMutex->lock();
}
static void unlock() {
sMutex->unlock();
}
public:
static bool isBlacklisted(std::string url) {
lock();
iter found = find(url);
bool r = (found != blacklist.end()) && (found->errorCount > MAX_ERRORCOUNT);
unlock();
return r;
}
@@ -450,7 +437,6 @@ public:
entry.timeUntil = LLTimer::getTotalTime() + timeout*1000;
entry.reason = reason;
entry.errorCount = 0;
lock();
iter found = find(entry.host);
if(found != blacklist.end()) {
entry.errorCount = found->errorCount + 1;
@@ -465,18 +451,14 @@ public:
}
}
else blacklist.push_back(entry);
unlock();
}
};
LLMutex* SGHostBlackList::sMutex = 0;
SGHostBlackList::blacklist_t SGHostBlackList::blacklist;
//call every time a connection is opened
//return true if connecting allowed
static bool sgConnectionThrottle() {
static LLMutex mutex;
LLMutexLock lock(&mutex);
const U32 THROTTLE_TIMESTEPS_PER_SECOND = 10;
static const LLCachedControl<U32> max_connections_per_second("HTTPRequestRate", 30);
U32 max_connections = max_connections_per_second/THROTTLE_TIMESTEPS_PER_SECOND;

View File

@@ -3681,17 +3681,17 @@ void process_teleport_finish(LLMessageSystem* msg, void**)
U32 teleport_flags;
msg->getU32Fast(_PREHASH_Info, _PREHASH_TeleportFlags, teleport_flags);
U32 region_size_x = 256;
msg->getU32Fast(_PREHASH_Info, _PREHASH_RegionSizeX, region_size_x);
U32 region_size_y = 256;
msg->getU32Fast(_PREHASH_Info, _PREHASH_RegionSizeY, region_size_y);
//and a little hack for Second Life compatibility
if (region_size_y == 0 || region_size_x == 0)
{
region_size_x = 256;
region_size_y = 256;
U32 region_size_x = 256;
msg->getU32Fast(_PREHASH_Info, _PREHASH_RegionSizeX, region_size_x);
U32 region_size_y = 256;
msg->getU32Fast(_PREHASH_Info, _PREHASH_RegionSizeY, region_size_y);
//and a little hack for Second Life compatibility
if (region_size_y == 0 || region_size_x == 0)
{
region_size_x = 256;
region_size_y = 256;
}
std::string seedCap;
@@ -4018,17 +4018,17 @@ void process_crossed_region(LLMessageSystem* msg, void**)
std::string seedCap;
msg->getStringFast(_PREHASH_RegionData, _PREHASH_SeedCapability, seedCap);
U32 region_size_x = 256;
msg->getU32(_PREHASH_RegionData, _PREHASH_RegionSizeX, region_size_x);
U32 region_size_y = 256;
msg->getU32(_PREHASH_RegionData, _PREHASH_RegionSizeY, region_size_y);
//and a little hack for Second Life compatibility
if (region_size_y == 0 || region_size_x == 0)
{
region_size_x = 256;
region_size_y = 256;
U32 region_size_x = 256;
msg->getU32(_PREHASH_RegionData, _PREHASH_RegionSizeX, region_size_x);
U32 region_size_y = 256;
msg->getU32(_PREHASH_RegionData, _PREHASH_RegionSizeY, region_size_y);
//and a little hack for Second Life compatibility
if (region_size_y == 0 || region_size_x == 0)
{
region_size_x = 256;
region_size_y = 256;
}
send_complete_agent_movement(sim_host);

Binary file not shown.

After

Width:  |  Height:  |  Size: 485 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 508 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 467 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@@ -390,5 +390,10 @@
<texture name="media_btn_stoploading.png"/>
<texture name="media_panel_divider.png"/>
<texture name="media_panel_scrollbg.png"/>
<texture name="go-previous-4.png"/>
<texture name="go-next-4.png"/>
<texture name="view-refresh-5.png"/>
<texture name="go-home-4.png"/>
</textures>

Binary file not shown.

After

Width:  |  Height:  |  Size: 786 B

View File

@@ -5,11 +5,11 @@
title="Inventory" width="467">
<search_editor bottom="-50" follows="left|top|right" height="16" label="Type here to search"
left="6" mouse_opaque="true" name="inventory search editor" width="455" />
<button left="10" bottom_delta="-24" height="20" width="25" follows="left|top" halign="center"
label="--" name="collapse_btn" mouse_opaque="true" font="SansSerif"
<button left="6" bottom_delta="-26" height="22" width="22" follows="left|top" halign="center"
label="" image_overlay="inv_collapse_all.tga" name="collapse_btn" mouse_opaque="true" font="SansSerif"
tool_tip="Collapse All" />
<text name="group_titles_textbox" font="SansSerifSmall" follows="left|top"
height="16" left_delta="35" bottom_delta="0" width="120">Quick Filter:</text>
<text name="group_titles_textbox" halign="right" font="SansSerifSmall" follows="left|top"
height="16" left="30" bottom_delta="2" right="93">Quick Filter:</text>
<!-- Inventory Type Filter Labels -->
<string name="filter_type_all">All Types</string>
<string name="filter_type_animation">Animations</string>
@@ -24,7 +24,7 @@
<string name="filter_type_texture">Textures</string>
<string name="filter_type_snapshot">Snapshots</string>
<string name="filter_type_custom">Custom...</string>
<combo_box name="Quick Filter" label="Quick Filter" follows="left|top" height="20" left_delta="60" width="150" bottom_delta="0">
<combo_box name="Quick Filter" label="Quick Filter" follows="left|top|right" height="20" left="95" right="-6" bottom_delta="0">
<combo_item name="filter_type_all">All Types</combo_item>
<separator />
<combo_item name="filter_type_animation">Animations</combo_item>

View File

@@ -3,18 +3,20 @@
height="440" min_height="140" min_width="467" name="floater_about"
rect_control="FloaterMediaRect" title="Media Browser" width="820">
<layout_stack name="stack1" bottom="0" follows="left|right|top|bottom" left="10" top="-20" width="800">
<layout_panel auto_resize="false" bottom="0" height="20" left="0" name="nav_controls" user_resize="false"
<layout_panel auto_resize="false" bottom="0" height="25" left="0" name="nav_controls" user_resize="false"
width="800">
<button bottom="0" follows="left|top" height="20" label="Back" left="0" name="back"
width="55" />
<button bottom_delta="0" follows="left|top" height="20" label="Forward" left_delta="55"
name="forward" width="60" />
<button bottom_delta="0" enabled="false" follows="left|top" height="20" label="Reload"
left_delta="65" name="reload" width="70" />
<combo_box allow_text_entry="true" bottom_delta="0" follows="left|top|right" height="20"
left_delta="75" max_chars="255" name="address" width="540" />
<button bottom_delta="0" enabled="false" follows="right|top" height="20" label="Go"
left_delta="545" name="go" width="55" />
<button bottom="0" follows="left|top" height="25" label="" image_overlay="go-previous-4.png" left="0" name="back"
width="25" />
<button bottom_delta="0" follows="left|top" height="25" label="" image_overlay="go-next-4.png" left_delta="27"
name="forward" width="25" />
<button bottom_delta="0" enabled="false" follows="left|top" height="25" label="" image_overlay="view-refresh-5.png"
left_delta="27" name="reload" width="25" />
<combo_box allow_text_entry="true" bottom_delta="4" follows="left|top|right" height="20"
left_delta="29" max_chars="255" name="address" width="657" />
<button bottom_delta="-4" enabled="false" follows="right|top" height="25" label="Go" font="SansSerif"
left_delta="660" name="go" width="55" />
<!--button bottom_delta="0" enabled="true" follows="right|top" height="25" label="" image_overlay="go-home-4.png"
left_delta="58" name="home" width="35" /-->
</layout_panel>
<layout_panel auto_resize="false" bottom="0" height="20" left="0" name="time_controls" user_resize="false"
width="800">
@@ -31,8 +33,8 @@
</layout_panel>
<layout_panel auto_resize="false" bottom="0" height="20" left="0"
name="parcel_owner_controls" user_resize="false" width="540">
<button bottom="0" enabled="false" follows="left|top" height="20"
label="Send Current URL to Parcel" left="0" name="assign" width="200" />
<button bottom="0" enabled="false" follows="left|top" height="22"
label="Send Current URL To Parcel" left="0" name="assign" width="200" />
</layout_panel>
<layout_panel auto_resize="true" bottom="0" height="20" left="0" name="external_controls" user_resize="false"
width="540">
@@ -43,8 +45,8 @@
<check_box bottom="5" control_name="UseExternalBrowser" follows="bottom|left" height="20"
label="Always open in my web browser" left_delta="190" name="open_always"
width="200" />
<button bottom="5" follows="bottom|right" height="20" label="Close" left="-70"
name="close" width="70" />
<!--button bottom="5" follows="bottom|right" height="20" label="Close" left="-70"
name="close" width="70" /-->
</layout_panel>
</layout_stack>
<string name="home_page_url">

View File

@@ -803,7 +803,7 @@ class Linux_i686Manifest(LinuxManifest):
self.path("libalut.so")
self.path("libopenal.so", "libopenal.so.1")
self.path("libtcmalloc_minimal.so.0")
self.path("libtcmalloc_minimal.so.0.0.0")
self.path("libtcmalloc_minimal.so.0.2.2")
self.end_prefix("lib")

View File

@@ -544,16 +544,16 @@
<key>linux</key>
<map>
<key>md5sum</key>
<string>1d7acbc5b578b3b5cfc739d2f454b18c</string>
<string>b190d8a0dce8dd8b514d2adb2c74b8d8</string>
<key>url</key>
<uri>https://github.com/downloads/siana/SingularityViewer/google-linux-110103.tar.bz2</uri>
<uri>http://sldev.free.fr/libraries/google-perftools-1.8.3-linux-20110924.tar.bz2</uri>
</map>
<key>windows</key>
<map>
<key>md5sum</key>
<string>571a398f5b3f65ba2c02f48df843cc97</string>
<string>4f787437a5e063ccde6637dfb1ebc01d</string>
<key>url</key>
<uri>https://github.com/downloads/siana/SingularityViewer/tcmalloc-1.7-min-20110507.tar.bz2</uri>
<uri>https://bitbucket.org/Ansariel/phoenix-prebuilts/downloads/google_perftools-1.8-windows-20111005.tar.bz2</uri>
</map>
</map>
</map>
@@ -927,9 +927,9 @@ anguage Infrstructure (CLI) international standard</string>
<key>linux</key>
<map>
<key>md5sum</key>
<string>5d743c93b970abe685b185de83001a6e</string>
<string>6e422a3548597a043223de9e9384c734</string>
<key>url</key>
<uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/llqtwebkit-linux-qt4.6-20100923.tar.bz2</uri>
<uri>https://github.com/downloads/siana/SingularityViewer/llqtwebkit-4.7.1-linux-20111013.tar.bz2</uri>
</map>
<key>windows</key>
<map>

102
repackage.sh Executable file
View File

@@ -0,0 +1,102 @@
#!/bin/bash
#(C) 2011 SIANA GEARZ
usage() {
echo "Usage: repackage PLATTFORM FILEIN.tar.bz2 [FILEOUT.tar.bz2]
Repackage an archive from llautobuild format into legacy format
PLATTFORM can be one of windows, linux, mac.
"
exit 0
}
TMP="/tmp/pak$$"
LIBPATH=""
INCPATH=""
PWD=`pwd`
shopt -s nocasematch
case "$1" in
--windows|-w|windows|win)
MODE=win
LIBPATH="libraries/i686-win32/lib/release"
LIBDPATH="libraries/i686-win32/lib/debug"
INCPATH="libraries/i686-win32/include"
;;
--mac|--osx|--darwin|-x|mac|osx|darwin)
MODE=osx
LIBPATH="libraries/universal-darwin/lib_release"
LIBDPATH="libraries/universal-darwin/lib_release"
INCPATH="libraries/universal-darwin/include"
;;
--lin|--linux|-l|linux)
MODE=linux
LIBPATH="libraries/i686-linux/lib_release_client"
INCPATH="libraries/i686-linux/include"
;;
--linux64|-6|linux64)
MODE=linux64
LIBPATH="libraries/x86_64-linux/lib_release_client"
INCPATH="libraries/x86_64-linux/include"
;;
*)
usage
;;
esac
case "$2" in
--commoninclude|--common-include|--common)
INCPATH="libraries/include"
shift
;;
esac
test -n "$2" && FILEIN=`readlink -e $2`
test -n "$3" && FILEOUT=`readlink -f $3`
if [ -z $FILEIN ]; then
usage
fi
if [ -z $FILEOUT ]; then
FILEOUT=`readlink -m package.tar.bz2`
fi
mkdir "$TMP"
cd "$TMP"
case "$FILEIN" in
http\:\/\/|https\:\/\/)
echo " Downloading..."
wget "$FILEIN" -O package.tar.bz2
echo " Unpacking..."
tar -xjvf package.tar.bz2
rm package.tar.bz2
;;
*)
echo " Unpacking..."
tar -xjvf "$FILEIN"
;;
esac
if [ -n "$LIBDPATH" -a -d lib/debug ]; then
mkdir -p $LIBDPATH
mv -f lib/debug/* $LIBDPATH
fi
if [ -d lib/release ]; then
mkdir -p $LIBPATH
mv -f lib/release/* $LIBPATH
fi
if [ -d include ]; then
mkdir -p $INCPATH
mv -f include/* $LIBPATH
fi
echo " Packing..."
tar -cjvf "$FILEOUT" libraries LICENSES
echo " Checksum:"
cd `dirname "$FILEOUT"`
md5sum -b `basename "$FILEOUT"`
cd "$PWD"
rm -rf "$TMP"