project_files/Android-build/SDL-android-project/src/org/hedgewars/mobile/Downloader/DownloadService.java
author Xeli
Sun, 21 Aug 2011 22:16:55 +0200
branchhedgeroid
changeset 5637 fcc0e5b3d66b
parent 5621 ea796c83ea47
child 5671 ba4c3a4c8b09
permissions -rw-r--r--
Changed url to code.google.com page
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
5621
ea796c83ea47 added licenses
Xeli
parents: 5514
diff changeset
     1
/*
ea796c83ea47 added licenses
Xeli
parents: 5514
diff changeset
     2
 * Hedgewars for Android. An Android port of Hedgewars, a free turn based strategy game
ea796c83ea47 added licenses
Xeli
parents: 5514
diff changeset
     3
 * Copyright (c) 2011 Richard Deurwaarder <xeli@xelification.com>
ea796c83ea47 added licenses
Xeli
parents: 5514
diff changeset
     4
 *
ea796c83ea47 added licenses
Xeli
parents: 5514
diff changeset
     5
 * This program is free software; you can redistribute it and/or modify
ea796c83ea47 added licenses
Xeli
parents: 5514
diff changeset
     6
 * it under the terms of the GNU General Public License as published by
ea796c83ea47 added licenses
Xeli
parents: 5514
diff changeset
     7
 * the Free Software Foundation; version 2 of the License
ea796c83ea47 added licenses
Xeli
parents: 5514
diff changeset
     8
 *
ea796c83ea47 added licenses
Xeli
parents: 5514
diff changeset
     9
 * This program is distributed in the hope that it will be useful,
ea796c83ea47 added licenses
Xeli
parents: 5514
diff changeset
    10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
ea796c83ea47 added licenses
Xeli
parents: 5514
diff changeset
    11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
ea796c83ea47 added licenses
Xeli
parents: 5514
diff changeset
    12
 * GNU General Public License for more details.
ea796c83ea47 added licenses
Xeli
parents: 5514
diff changeset
    13
 *
ea796c83ea47 added licenses
Xeli
parents: 5514
diff changeset
    14
 * You should have received a copy of the GNU General Public License
ea796c83ea47 added licenses
Xeli
parents: 5514
diff changeset
    15
 * along with this program; if not, write to the Free Software
ea796c83ea47 added licenses
Xeli
parents: 5514
diff changeset
    16
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
ea796c83ea47 added licenses
Xeli
parents: 5514
diff changeset
    17
 */
ea796c83ea47 added licenses
Xeli
parents: 5514
diff changeset
    18
ea796c83ea47 added licenses
Xeli
parents: 5514
diff changeset
    19
5412
ab055114c788 Moved download classes to their own dir and fixed the way the dest dir is being 'build'
Xeli
parents: 5406
diff changeset
    20
package org.hedgewars.mobile.Downloader;
ab055114c788 Moved download classes to their own dir and fixed the way the dest dir is being 'build'
Xeli
parents: 5406
diff changeset
    21
ab055114c788 Moved download classes to their own dir and fixed the way the dest dir is being 'build'
Xeli
parents: 5406
diff changeset
    22
import java.util.ArrayList;
5397
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
    23
5412
ab055114c788 Moved download classes to their own dir and fixed the way the dest dir is being 'build'
Xeli
parents: 5406
diff changeset
    24
import org.hedgewars.mobile.MainActivity;
ab055114c788 Moved download classes to their own dir and fixed the way the dest dir is being 'build'
Xeli
parents: 5406
diff changeset
    25
import org.hedgewars.mobile.R;
ab055114c788 Moved download classes to their own dir and fixed the way the dest dir is being 'build'
Xeli
parents: 5406
diff changeset
    26
import org.hedgewars.mobile.Utils;
5397
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
    27
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
    28
import android.app.Notification;
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
    29
import android.app.NotificationManager;
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
    30
import android.app.PendingIntent;
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
    31
import android.app.Service;
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
    32
import android.content.Intent;
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
    33
import android.os.Handler;
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
    34
import android.os.IBinder;
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
    35
import android.os.Message;
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
    36
import android.os.Messenger;
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
    37
import android.os.RemoteException;
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
    38
import android.util.Log;
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
    39
import android.widget.RemoteViews;
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
    40
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
    41
public class DownloadService extends Service {
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
    42
5637
fcc0e5b3d66b Changed url to code.google.com page
Xeli
parents: 5621
diff changeset
    43
	private final static String URL = "http://hedgewars.googlecode.com/files/data_5631.zip";
5397
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
    44
	public static final int MSG_CANCEL = 0;
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
    45
	public static final int MSG_REGISTER_CLIENT = 1;
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
    46
	public static final int MSG_UNREGISTER_CLIENT = 2;
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
    47
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
    48
	public static final int NOTIFICATION_PROCESSING = 0;
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
    49
	public static final int NOTIFICATION_DONE = 1;
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
    50
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
    51
	private DownloadAsyncTask downloadTask;
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
    52
	private final Messenger messenger = new Messenger(new DownloadHandler());
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
    53
	private NotificationManager nM;
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
    54
	private RemoteViews contentView;
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
    55
	private Notification notification;
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
    56
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
    57
	private ArrayList<Messenger> clientList = new ArrayList<Messenger>();
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
    58
	private Message onRegisterMessage = null;
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
    59
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
    60
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
    61
	class DownloadHandler extends Handler{
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
    62
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
    63
		public void handleMessage(Message msg){
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
    64
			switch(msg.what){
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
    65
			case MSG_CANCEL:
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
    66
				downloadTask.cancel(false);
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
    67
				break;
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
    68
			case MSG_REGISTER_CLIENT:
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
    69
				clientList.add(msg.replyTo);
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
    70
				if(onRegisterMessage != null){
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
    71
					try {
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
    72
						msg.replyTo.send(Message.obtain(onRegisterMessage));
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
    73
					} catch (RemoteException e) {
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
    74
						e.printStackTrace();
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
    75
					}
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
    76
				}
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
    77
				break;
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
    78
			case MSG_UNREGISTER_CLIENT:
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
    79
				clientList.remove(msg.replyTo);
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
    80
				break;
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
    81
			}
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
    82
		}
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
    83
	}
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
    84
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
    85
	public final static int TASKID_START = 0;
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
    86
	public final static int TASKID_CANCEL = 1;
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
    87
	
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
    88
	public int onStartCommand(Intent intent, int flags, int startId){
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
    89
		switch(intent.getIntExtra("taskID", TASKID_START)){
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
    90
		case TASKID_START:
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
    91
			nM = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
    92
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
    93
			notification = new Notification(R.drawable.statusbar, getString(R.string.notification_title), System.currentTimeMillis());
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
    94
			//notification.flags |= Notification.FLAG_ONGOING_EVENT;// | Notification.FLAG_NO_CLEAR | Notification.FLAG_FOREGROUND_SERVICE;
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
    95
			notification.flags |= Notification.FLAG_ONGOING_EVENT;
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
    96
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
    97
			contentView = new RemoteViews(getPackageName(), R.layout.notification);
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
    98
			contentView.setProgressBar(R.id.notification_progress, 100, 34, false);
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
    99
			notification.contentView = contentView;
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
   100
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
   101
			PendingIntent contentIntent = PendingIntent.getActivity(this, 0, new Intent(this, DownloadActivity.class), Intent.FLAG_ACTIVITY_NEW_TASK);
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
   102
			notification.contentIntent = contentIntent;
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
   103
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
   104
			//nM.notify(NOTIFICATION_PROCESSING, notification);
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
   105
			startForeground(NOTIFICATION_PROCESSING, notification);
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
   106
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
   107
			if(downloadTask == null){
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
   108
				downloadTask = new DownloadAsyncTask(this);
5412
ab055114c788 Moved download classes to their own dir and fixed the way the dest dir is being 'build'
Xeli
parents: 5406
diff changeset
   109
				downloadTask.execute(Utils.getDownloadPath(this), URL);
5397
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
   110
			}	
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
   111
			break;
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
   112
		case TASKID_CANCEL:
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
   113
			downloadTask.cancel(false);
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
   114
			stopService();
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
   115
			break;
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
   116
		}		
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
   117
		return 0;
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
   118
	}
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
   119
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
   120
	public void onDestroy(){
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
   121
		Log.e("bla", "onDestroy");
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
   122
		downloadTask.cancel(false);	
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
   123
	}
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
   124
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
   125
	public IBinder onBind(Intent intent) {
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
   126
		return messenger.getBinder();
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
   127
	}
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
   128
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
   129
	/*
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
   130
	 * Thread safe method to let clients know the processing is starting and will process int max kbytes
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
   131
	 * 
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
   132
	 */
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
   133
	public void start(int max){
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
   134
		onRegisterMessage = Message.obtain(null, DownloadActivity.MSG_START, max, -1);
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
   135
		sendMessageToClients(onRegisterMessage);
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
   136
	}
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
   137
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
   138
	public void update(int progress, int max, String fileName){
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
   139
		progress = (progress/1024);
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
   140
		updateNotification(progress, max, fileName);
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
   141
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
   142
		sendMessageToClients(Message.obtain(null, DownloadActivity.MSG_UPDATE, progress, max, fileName));
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
   143
	}
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
   144
	public void done(boolean succesful){
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
   145
		sendMessageToClients(Message.obtain(null, DownloadActivity.MSG_DONE));
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
   146
		stopService();//stopService clears all notifications and thus must be called before we show the ready notification
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
   147
		showDoneNotification();
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
   148
	}
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
   149
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
   150
	private void stopService(){
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
   151
		nM.cancelAll();
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
   152
		stopForeground(true);
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
   153
		stopSelf();
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
   154
	}
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
   155
	
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
   156
	private void updateNotification(int progress, int max, String fileName){
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
   157
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
   158
		contentView.setProgressBar(R.id.notification_progress, max, progress, false);
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
   159
		contentView.setTextViewText(R.id.progressbar_sub, String.format("%dkb/%dkb (Compressed sizes)", progress, max));
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
   160
		nM.notify(NOTIFICATION_PROCESSING, notification);
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
   161
	}
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
   162
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
   163
	private void showDoneNotification(){
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
   164
		nM.cancelAll();
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
   165
		stopForeground(true);
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
   166
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
   167
		String title = getString(R.string.notification_title);
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
   168
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
   169
		notification = new Notification(R.drawable.icon, title, System.currentTimeMillis());
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
   170
		notification.flags |= Notification.FLAG_AUTO_CANCEL;
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
   171
		PendingIntent contentIntent = PendingIntent.getActivity(this, 0, new Intent(this, MainActivity.class), Intent.FLAG_ACTIVITY_NEW_TASK);
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
   172
		notification.setLatestEventInfo(this, title, getString(R.string.notification_done), contentIntent);
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
   173
		nM.notify(NOTIFICATION_DONE, notification);
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
   174
	}	
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
   175
	private void sendMessageToClients(Message msg){
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
   176
		for(Messenger m : clientList){
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
   177
			try {
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
   178
				m.send(Message.obtain(msg));
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
   179
			} catch (RemoteException e) {}//TODO should we catch this properly?
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
   180
		}
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
   181
	}
5412
ab055114c788 Moved download classes to their own dir and fixed the way the dest dir is being 'build'
Xeli
parents: 5406
diff changeset
   182
5397
4ae1b082e4ba Added download functionality and changed some icons
Xeli
parents:
diff changeset
   183
}