Changeset 355

Show
Ignore:
Timestamp:
04/21/08 23:28:13 (2 years ago)
Author:
calh
Message:

no longer need version numbers in the makefile (pulled from application.ini). rearranged windows config stuff to have less options and be more sensible. build the uploadr.jar inside the builds folder instead of in the source tree

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/uploadr/Makefile

    r333 r355  
    5252# Configuration 
    5353 
    54 # Version number for Uploadr 
    55 VER := 3.1 
    56  
    5754# Source files 
    5855#   Even though this isn't a very Windows-y path, it makes life 
     
    6057SRC := MacUploadr.app/Contents 
    6158 
     59# Version number for Uploadr - this comes from application.ini 
     60VER := `grep ^Version= $(SRC)/Resources/application.ini | sed 's/Version=\(.*\)/\1/'` 
     61 
    6262######################################################################## 
    6363# Windows configuration 
     
    6666PLATFORM := win 
    6767 
    68 # Dated version for the NSIS installer 
    69 VER_DATE := 2008.04.03.01 
    70  
    7168# Location of Mozilla tree for the MAR tools 
    7269MOZILLA := /c/mozilla 
    7370 
     71# Location for application bundle staging 
     72APPNAME := Flickr\ Uploadr 
     73 
     74# Location to output finished DMGs 
     75OUT := /c/code/uploadr 
     76 
     77# below here, don't modify anything 
     78 
     79# Dated version for the NSIS installer - this comes from application.ini 
     80VER_DATE := `grep ^BuildID= $(SRC)/Resources/application.ini | sed 's/BuildID=\([0-9]\{4\}\)\([0-9]\{2\}\)\([0-9]\{2\}\)\([0-9]\{2\}\)/\1.\2.\3.\4/'`; 
     81 
    7482# Location for build staging 
    75 #   The base of this path must exist before running make 
    76 BUILD := /c/code/uploadr/builds/$(INTL) 
     83BUILD := $(OUT)/builds/$(INTL) 
    7784 
    7885# Location for application bundle staging 
    79 APP := $(BUILD)/Flickr\ Uploadr 
     86APP := $(BUILD)/$(APPNAME) 
    8087 
    8188# Location for resource file (chrome, components, etc) staging 
    8289RES := $(APP) 
    83  
    84 # Location to output finished DMGs 
    85 OUT := /c/code/uploadr 
    8690 
    8791# End Windows configuration 
     
    245249        @# Chrome 
    246250        mkdir $(RES)/chrome 
    247         mkdir content 
    248         mkdir content/uploadr 
    249         cp $(SRC)/Resources/chrome/content/uploadr/*.* content/uploadr/ 
    250         mkdir content/hacks 
    251 ifeq (mac, $(PLATFORM)) 
    252         mkdir content/hacks/mac 
    253         cp $(SRC)/Resources/chrome/content/hacks/mac/*.xul content/hacks/mac/ 
    254 #       cp $(SRC)/Resources/chrome/content/hacks/mac/*.js content/hacks/mac/ 
    255 endif 
    256 ifeq (win, $(PLATFORM)) 
    257         mkdir content/hacks/win 
    258         cp $(SRC)/Resources/chrome/content/hacks/win/*.xul content/hacks/win/ 
    259 #       cp $(SRC)/Resources/chrome/content/hacks/win/*.js content/hacks/win/ 
     251        mkdir $(BUILD)/jar 
     252        mkdir $(BUILD)/jar/content 
     253        mkdir $(BUILD)/jar/content/uploadr 
     254        cp $(SRC)/Resources/chrome/content/uploadr/*.* $(BUILD)/jar/content/uploadr/ 
     255        mkdir $(BUILD)/jar/content/hacks 
     256ifeq (mac, $(PLATFORM)) 
     257        mkdir $(BUILD)/jar/content/hacks/mac 
     258        cp $(SRC)/Resources/chrome/content/hacks/mac/*.xul $(BUILD)/jar/content/hacks/mac/ 
     259#       cp $(SRC)/Resources/chrome/content/hacks/mac/*.js $(BUILD)/jar/content/hacks/mac/ 
     260endif 
     261ifeq (win, $(PLATFORM)) 
     262        mkdir $(BUILD)/jar/content/hacks/win 
     263        cp $(SRC)/Resources/chrome/content/hacks/win/*.xul $(BUILD)/jar/content/hacks/win/ 
     264#       cp $(SRC)/Resources/chrome/content/hacks/win/*.js $(BUILD)/jar/content/hacks/win/ 
    260265endif 
    261266ifeq (linux, $(PLATFORM)) 
    262267        mkdir content/hacks/unix 
    263         cp $(SRC)/Resources/chrome/content/hacks/unix/*.xul content/hacks/unix/ 
    264 #       cp $(SRC)/Resources/chrome/content/hacks/unix/*.js content/hacks/unix/ 
    265 endif 
    266         mkdir locale 
    267         mkdir locale/branding 
    268         cp $(SRC)/Resources/chrome/locale/branding/*.* locale/branding/ 
    269         mkdir locale/$(INTL) 
    270         cp $(SRC)/Resources/chrome/locale/$(INTL)/*.* locale/$(INTL)/ 
     268        cp $(SRC)/Resources/chrome/content/hacks/unix/*.xul $(BUILD)/jar/content/hacks/unix/ 
     269#       cp $(SRC)/Resources/chrome/content/hacks/unix/*.js $(BUILD)/jar/content/hacks/unix/ 
     270endif 
     271        mkdir $(BUILD)/jar/locale 
     272        mkdir $(BUILD)/jar/locale/branding 
     273        cp $(SRC)/Resources/chrome/locale/branding/*.* $(BUILD)/jar/locale/branding/ 
     274        mkdir $(BUILD)/jar/locale/$(INTL) 
     275        cp $(SRC)/Resources/chrome/locale/$(INTL)/*.* $(BUILD)/jar/locale/$(INTL)/ 
    271276        sed 's/en-US/$(INTL)/g' $(SRC)/Resources/chrome/chrome.manifest.prod > \ 
    272277                $(RES)/chrome/chrome.manifest 
    273         mkdir skin 
     278        mkdir $(BUILD)/jar/skin 
    274279#ifeq (mac, $(PLATFORM)) 
    275 #       mkdir skin/hacks 
    276 #       mkdir skin/hacks/mac 
    277 #       cp $(SRC)/Resources/chrome/skin/hacks/mac/hacks.css skin/hacks/mac/ 
     280#       mkdir $(BUILD)/jar/skin/hacks 
     281#       mkdir $(BUILD)/jar/skin/hacks/mac 
     282#       cp $(SRC)/Resources/chrome/skin/hacks/mac/hacks.css $(BUILD)/jar/skin/hacks/mac/ 
    278283#endif 
    279284#ifeq (win, $(PLATFORM)) 
    280 #       mkdir skin/hacks/win 
    281 #       cp $(SRC)/Resources/chrome/skin/hacks/win/hacks.css skin/hacks/win/ 
     285#       mkdir $(BUILD)/jar/skin/hacks/win 
     286#       cp $(SRC)/Resources/chrome/skin/hacks/win/hacks.css $(BUILD)/jar/skin/hacks/win/ 
    282287#endif 
    283288#ifeq (linux, $(PLATFORM)) 
    284 #       mkdir skin/hacks/unix 
    285 #       cp $(SRC)/Resources/chrome/skin/hacks/unix/hacks.css skin/hacks/unix/ 
     289#       mkdir $(BUILD)/jar/skin/hacks/unix 
     290#       cp $(SRC)/Resources/chrome/skin/hacks/unix/hacks.css $(BUILD)/jar/skin/hacks/unix/ 
    286291#endif 
    287         mkdir skin/uploadr 
    288         cp $(SRC)/Resources/chrome/skin/uploadr/*.css skin/uploadr/ 
    289         cp $(SRC)/Resources/chrome/skin/uploadr/*.gif skin/uploadr/ 
    290         cp $(SRC)/Resources/chrome/skin/uploadr/*.png skin/uploadr/ 
    291 ifeq (win, $(PLATFORM)) 
    292         /c/Program\ Files/7-Zip/7z.exe a -r uploadr.zip content locale skin 
    293 else 
    294         zip uploadr -r content locale skin 
    295 endif 
    296         rm -rf content locale skin 
    297         mv uploadr.zip $(RES)/chrome/uploadr.jar 
     292        mkdir $(BUILD)/jar/skin/uploadr 
     293        cp $(SRC)/Resources/chrome/skin/uploadr/*.css $(BUILD)/jar/skin/uploadr/ 
     294        cp $(SRC)/Resources/chrome/skin/uploadr/*.gif $(BUILD)/jar/skin/uploadr/ 
     295        cp $(SRC)/Resources/chrome/skin/uploadr/*.png $(BUILD)/jar/skin/uploadr/ 
     296ifeq (win, $(PLATFORM)) 
     297        cd $(BUILD)/jar/ && zip uploadr.zip -r content locale skin 
     298else 
     299        cd $(BUILD)/jar/ && zip uploadr -r content locale skin 
     300endif 
     301        mv $(BUILD)/jar/uploadr.zip $(RES)/chrome/uploadr.jar 
     302        rm -rf $(BUILD)/jar 
    298303 
    299304        @# XPCOM