Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Put VERSION macros in global.h

Configure derives the version and then ensures it is assigned and used
where necessary.

A dist target for Makefile thus not duplicating version determination
logic.

Dedup'd findsrc.pl into a Ruby module.
  • Loading branch information...
commit e0488dbdcce860bab00ce95a9c3e032db7dad3a8 1 parent 09dc6cb
Max Howell mxcl authored
2  .gitattributes
... ... @@ -1,2 +1,4 @@
1 1 /admin/dist.sh export-ignore
2 2 /admin/cleansrc.sh export-ignore
  3 +/.gitignore export-ignore
  4 +/.gitattributes export-ignore
47 README
@@ -13,7 +13,17 @@ Fork it: http://github.com/mxcl/liblastfm
13 13
14 14 Dependencies
15 15 ============
16   -The build process requires ruby, Qt>=4.4 and GNU make (or MS nmake).
  16 +liblastfm dynamically links to:
  17 +
  18 +* Qt 4.4
  19 + http://www.qtsoftware.com
  20 +* FFTW 3.2
  21 + Compiled with single precision
  22 + http://www.fftw.org
  23 +* Secret Rabbit code (aka libsamplerate)
  24 + http://www.mega-nerd.com/SRC
  25 +
  26 +Additionally, to build you will need Ruby and GNU make (or Microsoft nmake).
17 27
18 28 Mac OS X
19 29 --------
@@ -24,37 +34,48 @@ Mac OS X
24 34 qt4-mac-devel will take a long time to build. So you may want to install the
25 35 Trolltech binary package instead.
26 36
  37 +Macports carries liblastfm now, so you may have downloaded this package simply
  38 +to perform this next line:
  39 +
  40 + sudo port install liblastfm
  41 +
27 42 Linux
28 43 -----
29   -For Ubuntu 9.04 (some are build deps, eg. Ruby is used during configure):
  44 +Do something like this:
30 45
31 46 sudo apt-get install qt4-qmake pkg-config libsamplerate-dev libfftw3-dev ruby g++ libqt4-dev
32 47
33   -The configure process also requires lsb_release on Linux. This is usually
34   -already installed (correct me if I'm wrong).
  48 +Additionally on Linux the configure process requires lsb_release. This is
  49 +usually already installed (correct me if I'm wrong).
35 50
36 51 Windows
37 52 -------
38   -Best of luck to you. You'll need Ruby, GNU Make and the Windows Server 2003
39   -Platform SDK r2:
  53 +Install Ruby. Install Visual Studio 2005 or higher. Install Qt. Install the
  54 +Windows Server 2003 Platform SDK r2:
  55 +
  56 +http://www.microsoft.com/Downloads/details.aspx?FamilyID=484269e2-3b89-47e3-8eb7-1f2be6d7123a
  57 +
  58 +Set up your environment variables so all include paths and tools are
  59 +available.
40 60
41   -http://www.microsoft.com/Downloads/details.aspx?FamilyID=484269e2-3b89-47e3-8eb7-1f2be6d7123a&displaylang=en
  61 +Build and install FFTW and Secret Rabbit Code.
42 62
43   -liblastfm should build under both cygwin and regular Windows shell.
  63 +Open a plain Windows shell (Cygwin will work but we don't recommend it), and
  64 +see the next section.
44 65
45 66
46 67 Installing liblastfm
47 68 ====================
48   - ./configure --release --prefix /usr/local && make && sudo make install
  69 + ruby configure --release --prefix /usr/local && make && sudo make install
49 70
50 71 Packaging liblastfm
51 72 -------------------
52 73 DESTDIR is supported.
53 74
54   -The library is split into liblastfm and liblastfm_fingerprint. The
55   -fingerprinting part is separate as it links to libfftw3. So if you want to
56   -package it separately then you can. Sadly because there is simply no good
57   -configuration system in the world, you still have to build both…
  75 +liblastfm builds to two dynamic libraries (liblastfm.so and
  76 +liblastfm_fingerprint.so). liblastfm.so links only to Qt, but the
  77 +fingerprinting part has additional dependencies. So ideally, you would
  78 +distribute two packages.
58 79
59 80
60 81 Using liblastfm
55 admin/Makefile.rb
@@ -12,15 +12,15 @@
12 12 ######################################################################### defs
13 13 case Platform::IMPL
14 14 when :mswin
15   - $cp='ruby -e "require \'FileUtils\'; FileUtils.copy_file(ARGV[0], ARGV[1])" --'
16   - $ln=$cp
17   - $mkdir='ruby -e "require \'FileUtils\'; FileUtils.mkpath ARGV[0]" --'
18   - $orderonly=''
  15 + CP='ruby -e "require \'FileUtils\'; FileUtils.copy_file(ARGV[0], ARGV[1])" --'
  16 + LN=CP
  17 + MKDIR='ruby -e "require \'FileUtils\'; FileUtils.mkpath ARGV[0]" --'
  18 + ORDERONLY=''
19 19 else
20   - $cp='cp'
21   - $ln='cp' #'ln -sf' oddly doesn't work, the target is always remade
22   - $mkdir='mkdir -p'
23   - $orderonly='|'
  20 + CP='cp'
  21 + LN='cp' #'ln -sf' oddly doesn't work, the target is always remade
  22 + MKDIR='mkdir -p'
  23 + ORDERONLY='|'
24 24 end
25 25
26 26 def penis( path )
@@ -38,10 +38,10 @@ def penis( path )
38 38
39 39
40 40 ######################################################################### main
  41 +INSTALL_PREFIX=ENV['LFM_PREFIX']
  42 +abort("Environment variable LFM_PREFIX not defined") if INSTALL_PREFIX.nil?
41 43 $install_headers=''
42 44 $headers=''
43   -$install_prefix = ENV['LFM_PREFIX']
44   -abort("Environment variable LFM_PREFIX not defined") if $install_prefix.nil?
45 45
46 46 puts <<-EOS
47 47 .PHONY: all
@@ -95,13 +95,13 @@ def penis( path )
95 95
96 96 begin
97 97 lhd='_include/lastfm'
98   - ihd="$(DESTDIR)#{$install_prefix}/include/lastfm"
  98 + ihd="$(DESTDIR)#{INSTALL_PREFIX}/include/lastfm"
99 99 ARGV.each do |header|
100 100 penis "src/#{header}" do |path, classname|
101   - puts "#{lhd}/#{classname}: #{path} #{$orderonly} #{lhd}"
102   - puts " #{$ln} #{path} $@"
103   - puts "#{ihd}/#{classname}: #{path} #{$orderonly} #{ihd}"
104   - puts " #{$cp} #{path} $@"
  101 + puts "#{lhd}/#{classname}: #{path} #{ORDERONLY} #{lhd}"
  102 + puts " #{LN} #{path} $@"
  103 + puts "#{ihd}/#{classname}: #{path} #{ORDERONLY} #{ihd}"
  104 + puts " #{CP} #{path} $@"
105 105 puts
106 106 $headers+=" #{lhd}/#{classname}"
107 107 $install_headers+=" #{ihd}/#{classname}"
@@ -111,21 +111,28 @@ def penis( path )
111 111
112 112 puts <<-EOS
113 113 _include/lastfm:
114   - #{$mkdir} $@
115   -$(DESTDIR)#{$install_prefix}/include/lastfm:
116   - #{$mkdir} $@
  114 + #{MKDIR} $@
  115 +$(DESTDIR)#{INSTALL_PREFIX}/include/lastfm:
  116 + #{MKDIR} $@
117 117
118   -_include/lastfm.h: #{$headers} #{$orderonly} _include/lastfm
  118 +_include/lastfm.h: #{$headers} #{ORDERONLY} _include/lastfm
119 119 ruby admin/lastfm.h.rb $@
120   -$(DESTDIR)#{$install_prefix}/include/lastfm.h: _include/lastfm.h #{$orderonly} $(DESTDIR)#{$install_prefix}/include/lastfm
121   - #{$cp} _include/lastfm.h $@
  120 +$(DESTDIR)#{INSTALL_PREFIX}/include/lastfm.h: _include/lastfm.h #{ORDERONLY} $(DESTDIR)#{INSTALL_PREFIX}/include/lastfm
  121 + #{CP} _include/lastfm.h $@
122 122
123 123 .PHONY: headers
124 124 headers: #{$headers} _include/lastfm.h
125 125
126 126 .PHONY: install
127   -install: #{$install_headers} $(DESTDIR)#{$install_prefix}/include/lastfm.h
128   - cd src && make install "INSTALL_ROOT=$(DESTDIR)#{$install_prefix}"
129   - cd src/fingerprint && make install "INSTALL_ROOT=$(DESTDIR)#{$install_prefix}"
  127 +install: #{$install_headers} $(DESTDIR)#{INSTALL_PREFIX}/include/lastfm.h
  128 + cd src && $(MAKE) install "INSTALL_ROOT=$(DESTDIR)#{INSTALL_PREFIX}"
  129 + cd src/fingerprint && $(MAKE) install "INSTALL_ROOT=$(DESTDIR)#{INSTALL_PREFIX}"
130 130
  131 +EOS
  132 +
  133 +BASENAME='liblastfm-'+ENV['LFM_VERSION']
  134 +puts <<-EOS
  135 +.PHONY: dist
  136 +dist:
  137 + git archive --prefix=#{BASENAME}/ HEAD | bzip2 > #{BASENAME}.tar.bz2
131 138 EOS
6 admin/cleansrc.sh
... ... @@ -1,8 +1,6 @@
1 1 #!/bin/sh
2   -
3   -d=`dirname $0`
4   -
5   -for x in `$d/findsrc cpp` `$d/findsrc h`
  2 +cd `dirname $0`/..
  3 +for x in `admin/findsrc.rb cpp h`
6 4 do
7 5 tab2space -unix $x $x
8 6 #(echo ',s/ *$//'; echo 'wq') | ed -s $x
12 admin/dist.sh
... ... @@ -1,12 +0,0 @@
1   -#!/bin/bash
2   -
3   -v=`perl -ne '/VERSION\s*=\s*((\d\.)*\d)/ and print \$1' $0/../../src/lastfm.pro`
4   -basename=liblastfm-$v
5   -
6   -# OSX copies special file attributes to ._files when you tar!
7   -export COPY_EXTENDED_ATTRIBUTES_DISABLE=true
8   -export COPYFILE_DISABLE=true
9   -
10   -git archive --prefix=$basename/ HEAD | bzip2 > $basename.tar.bz2
11   -
12   -echo `pwd`/$basename.tar.bz2
44 admin/findsrc
... ... @@ -1,44 +0,0 @@
1   -#!/usr/bin/perl
2   -use strict;
3   -use warnings;
4   -use File::Find;
5   -use Switch;
6   -
7   -sub usage
8   -{
9   - print "$0 extension [path]\n";
10   - exit
11   -}
12   -
13   -my $ext = shift || usage();
14   -
15   -my $exclude;
16   -switch ($^O)
17   -{
18   - case "cygwin" { $exclude = "mac"; }
19   - case "MSWin32" { $exclude = "mac"; } # active perl
20   - case "darwin" { $exclude = "win"; }
21   - else { $exclude = "win"; }
22   -}
23   -
24   -find( \&find_sources, shift || '.' );
25   -
26   -
27   -sub find_sources
28   -{
29   - if (-d)
30   - {
31   - switch ($_)
32   - {
33   - case '.svn' { $File::Find::prune = 1; }
34   - case '_build' { $File::Find::prune = 1; }
35   - case 'tests' { $File::Find::prune = 1; }
36   - case ($exclude) { $File::Find::prune = 1; }
37   - }
38   - }
39   - elsif (-f and /\.$ext$/)
40   - {
41   - $File::Find::name =~ s|^\./||g;
42   - print "$File::Find::name\n";
43   - }
44   -}
33 admin/findsrc.rb
... ... @@ -0,0 +1,33 @@
  1 +#!/usr/bin/ruby
  2 +require 'find'
  3 +require "#{File.dirname __FILE__}/platform"
  4 +
  5 +def findsrc dir='.'
  6 + excludes = ['.svn','.git','_include','tests','_build']
  7 + case Platform::IMPL
  8 + when :macosx then excludes<<'win'
  9 + when :mswin, :cygwin then excludes<<'mac'
  10 + else excludes<<'win'<<'mac'
  11 + end
  12 +
  13 + Find.find dir do |path|
  14 + next if path == dir # oddly neccessary
  15 + path.sub! %r[^\./], ''
  16 + if File.directory? path
  17 + Find.prune if excludes.include? File.basename(path)
  18 + #don't recurse into dirs with pro files in
  19 + Find.prune if Dir["#{path}/*.pro"].length > 0 and $findsrc_prune_pro
  20 + elsif File.file? path
  21 + case Platform::IMPL
  22 + when :macosx then next if /_mac\.cpp$/.match path
  23 + when :mswin, :cygwin then next if /_win\.cpp$/.match path
  24 + end
  25 + yield( path, File.extname( path ) ) unless File.basename(path) == 'EXAMPLE.cpp'
  26 + end
  27 + end
  28 +end
  29 +
  30 +if $0 == __FILE__
  31 + extnames=ARGV.collect {|extname| ".#{extname}"}
  32 + findsrc {|path,extname| puts path if extnames.include? extname}
  33 +end
3  admin/lastfm.h.rb
... ... @@ -1,6 +1,5 @@
1 1 #!/usr/bin/ruby
2   -
3 2 f = File.new(ARGV[0], "w")
4 3 Dir["_include/lastfm/*"].each do |h|
5 4 f.write %Q{#include "lastfm/#{File.basename h}"\n}
6   -end
  5 +end
98 admin/qpp
... ... @@ -1,88 +1,42 @@
1   -#!/usr/bin/ruby -W0
2   -# Usage examples:
3   -# qpp foo.pro => ./_file.qmake
4   -# qpp foo/bar/ => ./_file.qmake
5   -#
6   -cwd = File.dirname( __FILE__ )
7   -require 'find'
8   -require "#{cwd}/platform.rb"
9   -
10   -if ARGV[0] && File.file?( ARGV[0] )
11   - File.open( ARGV[0] ).each_line do |line|
12   - line.chomp!
13   -
14   - matches = /^\s*TEMPLATE += (.*)$/.match( line )
15   - if !matches.nil?
16   - exit if matches[1].downcase == 'subdirs'
17   - end
18   -
19   - matches = /(\s|\:|\{)VERSION\s*=\s*((\d\.){0,2}\d)$/.match( line )
20   - if !matches.nil? && !File.file?( "_version.h" )
21   - File.open( "_version.h", 'w' ) { |f| f.write( "#define VERSION \"#{matches[2]}\"\n" ) }
22   - end
23   - end
24   -end
  1 +#!/usr/bin/ruby
  2 +# Creates a qmake .pro file for all valid SOURCES, HEADERS, FORMS and
  3 +# RESOURCES under each argument to ARGV as directories
25 4
  5 +cwd=File.dirname __FILE__
  6 +require 'find'
  7 +require "#{cwd}/findsrc"
26 8
27 9 sources = Array.new
28 10 headers = Array.new
29 11 forms = Array.new
30 12 resources = Array.new
31 13
32   -dir = ARGV[0]
33   -if dir.nil?
34   - dir = '.'
35   -elsif !File.directory?( dir )
36   - dir = File.dirname( dir )
37   -end
38   -
  14 +$findsrc_prune_pro=true
39 15
40   -def find_sources(dir)
41   - Find.find( dir ) do |path|
42   - next if path == dir # oddly neccessary
43   - if File.directory? path
44   - excludes = ['.svn', 'tests', '_build']
45   - case Platform::IMPL
46   - when :macosx then excludes << 'win'
47   - when :mswin, :cygwin then excludes << 'mac'
48   - else excludes << 'win' << 'mac'
  16 +ARGV.each do |d|
  17 + Dir.chdir d do
  18 + findsrc do |path,ext|
  19 + case ext
  20 + when ".h" then headers << path
  21 + when ".ui" then forms << path
  22 + when ".qrc" then resources << path
  23 + when ".cpp" then sources << path
49 24 end
50   - Find.prune if excludes.include? File.basename path
51   - Find.prune if Dir["#{path}/*.pro"].length > 0 #don't recurse into dirs with pro files in
52   - elsif File.file? path
53   - case Platform::IMPL
54   - when :macosx then next if /_mac\.cpp$/.match path
55   - when :mswin, :cygwin then next if /_win\.cpp$/.match path
56   - end
57   - yield( path, File.extname( path ) ) unless File.basename(path) == 'EXAMPLE.cpp'
58 25 end
59 26 end
60 27 end
61 28
62   -
63   -find_sources dir do |path, ext|
64   - path.sub! /^.\//, ''
65   - case ext
66   - when ".h" then headers << path
67   - when ".ui" then forms << path
68   - when ".qrc" then resources << path
69   - when ".cpp" then sources << path
70   - end
71   -end
72   -
73   -
74   -def write_section( section, array, f )
75   - return if array.empty?
76   - f.write( section + " =" )
77   - array.each do |path|
78   - f.write( " \\\n\t" )
79   - f.write( path )
  29 +def puts_section section, files
  30 + return if files.empty?
  31 + print section + " ="
  32 + files.each do |filename|
  33 + print " \\\n\t"
  34 + print filename
80 35 end
81   - f.write( "\n" )
  36 + puts
82 37 end
83 38
84   -f = File.open( '_files.qmake', 'w' )
85   -write_section( "SOURCES", sources, f )
86   -write_section( "HEADERS", headers, f )
87   -write_section( "FORMS", forms, f )
88   -write_section( "RESOURCES", resources, f )
  39 +puts_section "SOURCES", sources
  40 +puts_section "HEADERS", headers
  41 +puts_section "FORMS", forms
  42 +puts_section "RESOURCES", resources
2  admin/utils.rb
@@ -4,7 +4,7 @@
4 4 def h(s, n)
5 5 case Platform::IMPL
6 6 when :mswin
7   - puts '==>'+s
  7 + puts '==> '+s
8 8 else
9 9 puts "\033[0;#{n}m==>\033[0;0;1m #{s} \033[0;0m"
10 10 end
4 admin/which_qmake.rb
... ... @@ -1,3 +1,5 @@
  1 +require "#{File.dirname __FILE__}/platform.rb"
  2 +
1 3 class QMakeNotFound < RuntimeError; end
2 4 class QMakeTooOld < RuntimeError; end
3 5
@@ -33,4 +35,4 @@ def which_qmake
33 35 end
34 36 end
35 37
36   -puts which_qmake if __FILE__ == $0
  38 +puts which_qmake if __FILE__ == $0
32 configure
@@ -10,12 +10,17 @@ require "#{cwd}/admin/which_qmake.rb"
10 10 require "#{cwd}/admin/utils.rb"
11 11
12 12 begin
13   - h1 'Configuring liblastfm...'
  13 + IO.read("#{cwd}/src/global.h") =~ /LASTFM_VERSION_STRING\s+"((\d\.)*\d)"/
  14 + abort "Couldn't determine our version!" if $1.nil?
  15 + LFM_VERSION=$1
  16 + ENV['LFM_VERSION']=LFM_VERSION
  17 +
  18 + h1 "Configuring liblastfm-#{LFM_VERSION}..."
14 19
15 20 unless ARGV.include? '--skip-checks'
16 21 $qmake=which_qmake
17   - pkgconfig 'samplerate', 'libsamplerate'
18   - pkgconfig 'fftw3f', 'fftw'
  22 +# pkgconfig 'samplerate', 'libsamplerate'
  23 +# pkgconfig 'fftw3f', 'fftw'
19 24
20 25 puts 'Using '+`which #{$qmake}` unless Platform::IMPL == :mswin
21 26 else
@@ -37,19 +42,23 @@ begin
37 42 h1 'Generating Build System'
38 43
39 44 h2 'Generating .qmake.env' do
40   - f = File.new('.qmake.env', 'w')
  45 + f = File.new("#{cwd}/.qmake.env", 'w')
41 46 f.write qmake_env('CC', 'QMAKE_CC')
42 47 f.write qmake_env('CXX', 'QMAKE_CXX')
43 48 f.write qmake_env('LDFLAGS', 'QMAKE_LFLAGS_RELEASE')
44 49 f.write qmake_env(['CFLAGS', 'CPPFLAGS'], 'QMAKE_CFLAGS_RELEASE')
45 50 f.write qmake_env(['CXXFLAGS', 'CPPFLAGS'], 'QMAKE_CXXFLAGS_RELEASE')
46   - f.write "QMAKE_CXXFLAGS_RELEASE = -O3 -fomit-frame-pointer\n" if `whoami` == "mxcl\n" #OHAI!
47 51 f.close
48 52 end unless Platform::IMPL == :mswin
49 53
50 54 h2 "Running qpp..." do
51   - Dir.chdir('src') { `ruby ../admin/qpp lastfm.pro` }
52   - Dir.chdir('src/fingerprint') { `ruby ../../admin/qpp fingerprint.pro` }
  55 + ['src','src/fingerprint'].each do |d|
  56 + d="#{cwd}/#{d}"
  57 + f=File.new "#{d}/_files.qmake", 'w'
  58 + f.write `ruby admin/qpp #{d}`
  59 + # on Windows VERSION produces lastfm0.dll, the 0 breaks the build
  60 + f.puts "VERSION = #{LFM_VERSION}" unless Platform::IMPL == :mswin
  61 + end
53 62 end
54 63
55 64 h2 "Configuring qmake..." do
@@ -76,11 +85,16 @@ begin
76 85 hs << 'types/Track.h types/Mbid.h' << 'types/Artist.h' << 'types/Album.h' << 'types/FingerprintId.h' << 'types/Playlist.h' << 'types/Tag.h' << 'types/User.h types/Xspf.h'
77 86 hs << 'ws/ws.h' << 'ws/InternetConnectionMonitor.h' << 'ws/NetworkAccessManager.h'
78 87
79   - File.new('Makefile', 'w').write `ruby admin/Makefile.rb #{hs.join(' ')}`
  88 + File.new("#{cwd}/Makefile", 'w').write `ruby admin/Makefile.rb #{hs.join(' ')}`
  89 + end
  90 +
  91 + case Platform::IMPL
  92 + when :mswin then make='nmake'
  93 + else make='make'
80 94 end
81 95
82 96 puts
83   - puts 'Good, your configure is finished! Now type: make'
  97 + puts "Good, your configure is finished! Now type: #{make}"
84 98
85 99 rescue QMakeTooOld
86 100 puts <<-sput
25 src/fingerprint/fingerprint.pro
@@ -5,25 +5,20 @@ QT = core xml network sql
5 5 include( _files.qmake )
6 6 DEFINES += LASTFM_OHAI_QMAKE
7 7
  8 +INSTALLS = target
  9 +target.path = /lib
  10 +
8 11 win32 {
9 12 #FIXME which -lfftw* is right?
10 13 LIBS += -llibsamplerate -llibfftw3f-3 -lfftw3f
11 14 DEFINES += __NO_THREAD_CHECK
12 15 QMAKE_LFLAGS_DEBUG += /NODEFAULTLIB:msvcrt.lib /NODEFAULTLIB:libcmt.lib
13 16 }
14   -else{
15   - # versions break builds on Windows as it changes the link name! :P
16   - VERSION = 0.1
17   -
18   - mac:CONFIG( app_bundle ){
19   - LIBS += /opt/local/lib/libfftw3f.a /opt/local/lib/libsamplerate.a
20   - INCLUDEPATH += /opt/local/include
21   - }
22   - else{
23   - CONFIG += link_pkgconfig
24   - PKGCONFIG += fftw3f samplerate
25   - }
  17 +else:mac:CONFIG( app_bundle ){
  18 + LIBS += libfftw3f.a libsamplerate.a -L/opt/local/include
  19 + INCLUDEPATH += /opt/local/include
26 20 }
27   -
28   -INSTALLS = target
29   -target.path = /lib
  21 +else{
  22 + CONFIG += link_pkgconfig
  23 + PKGCONFIG += fftw3f samplerate
  24 +}
7 src/global.h
@@ -21,6 +21,13 @@
21 21 #ifndef LASTFM_GLOBAL_H
22 22 #define LASTFM_GLOBAL_H
23 23
  24 +#define LASTFM_VERSION 0x00000400
  25 +#define LASTFM_VERSION_STRING "0.4.0"
  26 +#define LASTFM_MAJOR_VERSION 0
  27 +#define LASTFM_MINOR_VERSION 4
  28 +#define LASTFM_PATCH_VERSION 0
  29 +
  30 +
24 31 #include <QtGlobal>
25 32
26 33 #ifdef Q_CC_MSVC
19 src/lastfm.pro
... ... @@ -1,21 +1,16 @@
1 1 TEMPLATE = lib
2   -TARGET = lastfm
3 2 QT = core network xml
4   -INSTALLS = target
5 3 include( _files.qmake )
6 4
  5 +INSTALLS = target
  6 +target.path = /lib
  7 +
7 8 win32{
8 9 DEFINES += LASTFM_OHAI_QMAKE _ATL_DLL
9 10 LIBS += winhttp.lib wbemuuid.lib # ws configuration
10 11 }
11   -else{
12   - # don't break the link name on Windows, otherwise you get eg. lastfm1.dll
13   - VERSION = 0.4.0
14   - mac{
15   - LIBS += -framework SystemConfiguration # ws configuration
16   - #TODO we should only use these with the carbon version of Qt!
17   - LIBS += -framework Carbon -framework CoreFoundation # various
18   - }
  12 +mac{
  13 + LIBS += -framework SystemConfiguration # ws configuration
  14 + #TODO we should only use these with the carbon version of Qt!
  15 + LIBS += -framework Carbon -framework CoreFoundation # various
19 16 }
20   -
21   -target.path = /lib
7 src/ws/win/Pac.cpp
@@ -21,11 +21,8 @@
21 21 #include <QNetworkRequest>
22 22 #include <QStringList>
23 23 #include <QUrl>
24   -
25   -#ifdef WIN32
26   -#include <AtlBase.h>
27   -#include <AtlConv.h>
28   -#endif
  24 +#include <atlbase.h>
  25 +#include <atlconv.h>
29 26
30 27
31 28 static bool

0 comments on commit e0488db

Please sign in to comment.
Something went wrong with that request. Please try again.