1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2025-03-02 17:55:22 +00:00

update versioning scheme as per consensus between TMT, John_Clay, Gimp_, and charles_

This commit is contained in:
Charles Kerr 2007-07-10 19:40:21 +00:00
parent f86cf5449d
commit 5455df4373
16 changed files with 59 additions and 63 deletions

View file

@ -99,8 +99,8 @@ int main( int argc, char ** argv )
tr_stat_t * s;
tr_handle_status_t * hstat;
printf( "Transmission %s (%d) - http://transmission.m0k.org/\n\n",
VERSION_STRING, VERSION_REVISION );
printf( "Transmission %s - http://transmission.m0k.org/\n\n",
LONG_VERSION_STRING );
/* Get options */
if( parseCommandLine( argc, argv ) )

View file

@ -857,7 +857,7 @@ sendvers( struct con * con )
uint8_t * buf;
size_t len;
buf = ipc_mkvers( &len, "Transmission remote" VERSION_STRING );
buf = ipc_mkvers( &len, "Transmission remote" LONG_VERSION_STRING );
if( NULL == buf )
{
if( EPERM == errno )

View file

@ -119,7 +119,7 @@ usage( const char * msg, ... )
printf(
"usage: %s [-dfh]\n"
"\n"
"Transmission %s (r%d) http://transmission.m0k.org/\n"
"Transmission %s http://transmission.m0k.org/\n"
"A free, lightweight BitTorrent client with a simple, intuitive interface\n"
"\n"
" -d --debug Print data send and received, implies -f\n"
@ -128,7 +128,7 @@ usage( const char * msg, ... )
" -s --socket <path> Place the socket file at <path>\n"
"\n"
"To add torrents or set options, use the transmission-remote program.\n",
getmyname(), VERSION_STRING, VERSION_REVISION );
getmyname(), LONG_VERSION_STRING );
exit( 0 );
}

View file

@ -127,14 +127,14 @@ usage( const char * msg, ... )
printf(
"usage: %s [options] [files]...\n"
"\n"
"Transmission %s (r%d) http://transmission.m0k.org/\n"
"Transmission %s http://transmission.m0k.org/\n"
"A free, lightweight BitTorrent client with a simple, intuitive interface.\n"
"\n"
" -h --help Display this message and exit\n"
" -t --type daemon Use the daemon frontend, transmission-daemon\n"
" -t --type gtk Use the GTK+ frontend, transmission-gtk\n"
" -t --type mac Use the Mac OS X frontend\n",
getmyname(), VERSION_STRING, VERSION_REVISION );
getmyname(), LONG_VERSION_STRING );
exit( EXIT_SUCCESS );
}

View file

@ -224,7 +224,7 @@ usage( const char * msg, ... )
printf(
"usage: %s [options]\n"
"\n"
"Transmission %s (r%d) http://transmission.m0k.org/\n"
"Transmission %s http://transmission.m0k.org/\n"
"A free, lightweight BitTorrent client with a simple, intuitive interface.\n"
"\n"
" -a --add <torrent> Add a torrent\n"
@ -252,7 +252,7 @@ usage( const char * msg, ... )
" -u --upload-limit <int> Max upload rate in KiB/s\n"
" -U --upload-unlimited No upload rate limit\n"
" -x --proxy Use proxy command to connect to frontend\n",
getmyname(), VERSION_STRING, VERSION_REVISION );
getmyname(), LONG_VERSION_STRING );
exit( 0 );
}

View file

@ -255,7 +255,7 @@ newclient( int fd, short event UNUSED, void * arg )
}
bufferevent_enable( clev, EV_READ );
buf = ipc_mkvers( &buflen, "Transmission daemon " VERSION_STRING );
buf = ipc_mkvers( &buflen, "Transmission daemon " LONG_VERSION_STRING );
if( 0 > queuemsg( client, buf, buflen ) )
{
free( buf );

View file

@ -340,7 +340,7 @@ client_connect(char *path, struct constate *con) {
return FALSE;
}
buf = ipc_mkvers( &size, "Transmission GTK+ " VERSION_STRING );
buf = ipc_mkvers( &size, "Transmission GTK+ " LONG_VERSION_STRING );
if( NULL == buf )
{
close( con->fd );
@ -381,7 +381,7 @@ srv_io_accept(GSource *source SHUTUP, int fd, struct sockaddr *sa SHUTUP,
return;
}
buf = ipc_mkvers( &size, "Transmission GTK+ " VERSION_STRING );
buf = ipc_mkvers( &size, "Transmission GTK+ " LONG_VERSION_STRING );
if( NULL == buf )
{
ipc_freecon( newcon->ipc );

View file

@ -298,7 +298,7 @@ readargs( int argc, char ** argv, gboolean * sendquit, gboolean * startpaused )
printf(
_("usage: %s [-hpq] [files...]\n"
"\n"
"Transmission %s (r%d) http://transmission.m0k.org/\n"
"Transmission %s http://transmission.m0k.org/\n"
"A free, lightweight BitTorrent client with a simple, intuitive interface\n"
"\n"
" -h --help display this message and exit\n"
@ -309,7 +309,7 @@ _("usage: %s [-hpq] [files...]\n"
"torrent files may be loaded at startup by adding them to the command\n"
"line. If %s is already running, those torrents will be\n"
"opened in the running instance.\n"),
name, VERSION_STRING, VERSION_REVISION,
name, LONG_VERSION_STRING,
name, name, name );
exit(0);
break;
@ -888,7 +888,6 @@ getselection( struct cbdata * cbdata )
static void
about ( void )
{
char buf[128];
GtkWidget * w = gtk_about_dialog_new ();
GtkAboutDialog * a = GTK_ABOUT_DIALOG (w);
const char *authors[] = { "Eric Petit (Back-end; OS X)",
@ -897,8 +896,7 @@ about ( void )
"Charles Kerr (Back-end; GTK+)",
"Bryan Varner (BeOS)",
NULL };
g_snprintf (buf, sizeof(buf), _("%s (%d)"), VERSION_STRING, VERSION_REVISION);
gtk_about_dialog_set_version (a, buf);
gtk_about_dialog_set_version (a, LONG_VERSION_STRING );
#ifdef SHOW_LICENSE
gtk_about_dialog_set_license (a, LICENSE);
gtk_about_dialog_set_wrap_license (a, TRUE);

View file

@ -1305,6 +1305,7 @@ file_page_new ( TrTorrent * gtor )
GtkWidget * view, * scroll;
GtkCellRenderer * rend;
GtkCellRenderer * priority_rend;
GtkCellRenderer * enabled_rend;
GtkTreeViewColumn * col;
GtkTreeSelection * sel;
GtkTreeModel * model;
@ -1366,6 +1367,16 @@ file_page_new ( TrTorrent * gtor )
g_signal_connect( sel, "changed", G_CALLBACK(fileSelectionChangedCB), NULL );
fileSelectionChangedCB( sel, NULL );
/* add "download" checkbox column */
col = gtk_tree_view_column_new ();
gtk_tree_view_column_set_sort_column_id( col, FC_ENABLED );
rend = enabled_rend = gtk_cell_renderer_toggle_new ();
col = gtk_tree_view_column_new_with_attributes (_("Download"),
rend,
"active", FC_ENABLED,
NULL);
gtk_tree_view_append_column( GTK_TREE_VIEW( view ), col );
/* add priority column */
model = priority_model_new ();
col = gtk_tree_view_column_new ();
@ -1382,16 +1393,6 @@ file_page_new ( TrTorrent * gtor )
gtk_tree_view_column_add_attribute (col, rend, "text", FC_PRIORITY);
gtk_tree_view_append_column( GTK_TREE_VIEW( view ), col );
/* download enabled column */
col = gtk_tree_view_column_new ();
gtk_tree_view_column_set_sort_column_id( col, FC_ENABLED );
rend = gtk_cell_renderer_toggle_new ();
col = gtk_tree_view_column_new_with_attributes (_("Enabled"),
rend,
"active", FC_ENABLED,
NULL);
gtk_tree_view_append_column( GTK_TREE_VIEW( view ), col );
/* create the scrolled window and stick the view in it */
scroll = gtk_scrolled_window_new( NULL, NULL );
gtk_scrolled_window_set_policy( GTK_SCROLLED_WINDOW( scroll ),
@ -1410,7 +1411,7 @@ file_page_new ( TrTorrent * gtor )
data->selection = gtk_tree_view_get_selection( GTK_TREE_VIEW( view ) );
g_object_set_data_full (G_OBJECT(ret), "file-data", data, g_free);
g_signal_connect (G_OBJECT(priority_rend), "edited", G_CALLBACK(priority_changed_cb), data);
g_signal_connect( rend, "toggled", G_CALLBACK(enabled_toggled), data );
g_signal_connect(enabled_rend, "toggled", G_CALLBACK(enabled_toggled), data );
return ret;
}

View file

@ -451,9 +451,9 @@ tr_httpClient( int method, const char * host, int port, const char * fmt, ... )
if( tr_sprintf( EXPANDBUF( http->header ), " HTTP/1.1" CR LF
"Host: %s:%d" CR LF
"User-Agent: %s/%d.%d%d" CR LF
"User-Agent: " TR_NAME "/" LONG_VERSION_STRING CR LF
"Connection: close" CR LF,
http->host, http->port, TR_NAME, VERSION_MAJOR, VERSION_MINOR, VERSION_MAINTENANCE ) )
http->host, http->port ) )
{
goto err;
}

View file

@ -357,7 +357,7 @@ static void tr_realMakeMetaInfo ( tr_metainfo_builder_t * builder )
tr_bencInitStrDup( val, builder->announce );
val = tr_bencDictAdd( &top, "created by" );
tr_bencInitStrDup( val, TR_NAME " " VERSION_STRING );
tr_bencInitStrDup( val, TR_NAME "/" LONG_VERSION_STRING );
val = tr_bencDictAdd( &top, "creation date" );
tr_bencInitInt( val, time(0) );

View file

@ -133,7 +133,7 @@ makeAZHandshake( tr_torrent_t * tor, tr_peer_t * peer, int * buflen )
tr_bencInitStr( tr_bencDictAdd( &val, "identity" ),
tor->azId, TR_AZ_ID_LEN, 1 );
tr_bencInitStr( tr_bencDictAdd( &val, "client" ), TR_NAME, 0, 1 );
tr_bencInitStr( tr_bencDictAdd( &val, "version" ), VERSION_STRING, 0, 1 );
tr_bencInitStr( tr_bencDictAdd( &val, "version" ), SHORT_VERSION_STRING, 0, 1 );
if( 0 < tor->publicPort )
{
tr_bencInitInt( tr_bencDictAdd( &val, "tcp_port" ), tor->publicPort );

View file

@ -120,21 +120,13 @@ static char *
makeExtendedHandshake( tr_torrent_t * tor, tr_peer_t * peer, int * len )
{
benc_val_t val, * msgsval;
char * buf, * vers;
/* get human-readable version string */
vers = NULL;
asprintf( &vers, "%s %s", TR_NAME, VERSION_STRING );
if( NULL == vers )
{
return NULL;
}
char * buf;
char * vers = tr_strdup( TR_NAME " " SHORT_VERSION_STRING );
/* reserve space in toplevel dictionary for v, m, and possibly p */
tr_bencInit( &val, TYPE_DICT );
if( tr_bencDictReserve( &val, ( 0 < tor->publicPort ? 3 : 2 ) ) )
{
free( vers );
tr_bencFree( &val );
return NULL;
}

View file

@ -56,8 +56,8 @@ tr_handle_t * tr_init( const char * tag )
/* Generate a peer id : "-TRxxyz-" + 12 random alphanumeric
characters, where xx is the major version number, y is the
minor version number, and z is the maintenance number (Azureus-style) */
snprintf( h->id, sizeof h->id, "-TR%02d%01d%01d-",
VERSION_MAJOR, VERSION_MINOR, VERSION_MAINTENANCE );
snprintf( h->id, sizeof h->id, "-TR" VERSION_MAJOR VERSION_MINOR VERSION_MAINTENANCE VERSION_BETA "-" );
assert( strlen(h->id) == 8 );
for( i=8; i<TR_ID_LEN; ++i )
{
const int r = tr_rand( 36 );
@ -88,7 +88,7 @@ tr_handle_t * tr_init( const char * tag )
tr_fdInit();
h->shared = tr_sharedInit( h );
tr_inf( TR_NAME " " VERSION_STRING " started" );
tr_inf( TR_NAME " " LONG_VERSION_STRING " started" );
return h;
}

View file

@ -3,11 +3,11 @@
include ../mk/config.mk
include ../mk/common.mk
SRCS = bencode.c choking.c clients.c completion.c fastresume.c fdlimit.c \
http.c inout.c ipcparse.c list.c makemeta.c metainfo.c natpmp.c \
net.c peer.c platform.c ratecontrol.c sha1.c shared.c strlcat.c \
strlcpy.c torrent.c tracker.c transmission.c upnp.c utils.c xml.c \
basename.c dirname.c
SRCS = basename.c bencode.c choking.c clients.c completion.c dirname.c \
fastresume.c fdlimit.c http.c inout.c ipcparse.c list.c makemeta.c \
metainfo.c natpmp.c net.c peer.c platform.c ratecontrol.c sha1.c \
shared.c strlcat.c strlcpy.c torrent.c tracker.c transmission.c \
upnp.c utils.c xml.c
OBJS = $(SRCS:%.c=%.o)

View file

@ -2,9 +2,12 @@
#
# $Id$
MAJOR=0
MINOR=7
MAINT=2
# constraint: strlen(MAJOR MINOR MAINT BETA) must be 4
# convention: BETA: "Z" for a beta, "0" for a stable
MAJOR="0"
MINOR="7"
MAINT="2"
BETA="Z"
STRING=0.80-svn
# Get current SVN revision from Ids in all source files
@ -30,21 +33,23 @@ replace_if_differs ()
# Generate version.mk
cat > mk/version.mk.new << EOF
VERSION_MAJOR = $MAJOR
VERSION_MINOR = $MINOR
VERSION_MAINTENANCE = $MAINT
VERSION_STRING = $STRING
VERSION_REVISION = $REV
VERSION_MAJOR = "$MAJOR"
VERSION_MINOR = "$MINOR"
VERSION_MAINTENANCE = "$MAINT"
VERSION_REVISION = "$REV"
VERSION_STRING = "$MAJOR.$MINOR$MAINT$BETA (r$REV)"
EOF
replace_if_differs mk/version.mk.new mk/version.mk
# Generate version.h
cat > libtransmission/version.h.new << EOF
#define VERSION_MAJOR $MAJOR
#define VERSION_MINOR $MINOR
#define VERSION_MAINTENANCE $MAINT
#define VERSION_STRING "$STRING"
#define VERSION_REVISION $REV
#define VERSION_MAJOR "$MAJOR"
#define VERSION_MINOR "$MINOR"
#define VERSION_MAINTENANCE "$MAINT"
#define VERSION_REVISION "$REV"
#define VERSION_BETA "$BETA"
#define SHORT_VERSION_STRING "$MAJOR.$MINOR$MAINT$BETA"
#define LONG_VERSION_STRING "$MAJOR.$MINOR$MAINT$BETA (r$REV)"
EOF
replace_if_differs libtransmission/version.h.new libtransmission/version.h