Merge pull request #38 from BtbN/master

Move CPack win32 generator from NSIS to WIX
master
Jim 2014-02-02 17:07:29 -08:00
commit be139710a2
19 changed files with 101 additions and 1144 deletions

View File

@ -1,4 +1,4 @@
if(APPLE)
if(WIN32 OR APPLE)
cmake_minimum_required(VERSION 2.8.12)
else()
cmake_minimum_required(VERSION 2.8.11)

25
INSTALL
View File

@ -4,17 +4,17 @@ Will give better instructions later when things are in a more complete state.
Windows:
- Use VS2013, as obs-studio uses C99 and C++11
- Download latest FFmpeg and wxWidgets repositories
- Download latest FFmpeg repositories and Qt5 release
- Create a windows environment variable FFmpegPath. Set it to your FFmpeg
repo path
- Create a windows environment variable wxWidgetsPath. Set it to your
wxWidgets repo path
- Create a windows environment variable QTDIR. Set it to your
Qt5 install path
- Compile wxWidgets and FFmpeg. They should both be compiled with VS2013.
Convert the VS2010 project file for wxWidgets, and for compiling FFmpeg,
see http://ffmpeg.org/platform.html#Windows
- Compile FFmpeg and Qt5(Until they release a binary VS2013 version).
They should both be compiled with VS2013.
For compiling FFmpeg, see http://ffmpeg.org/platform.html#Windows
- Create two directories in FFmpeg directory, lib32 and lib64. Place the
lib files generated by FFmpeg into these directories for the respective
@ -31,24 +31,19 @@ Windows:
Mac OSX
- Use macports or homebrew and get wxWidgets 3.0, FFmpeg, glew, cmake.
- Use macports or homebrew and get FFmpeg, glew and cmake.
- Building via autotools not yet supported
- In a terminal, go to the obs-studio/build directory, then to build, type:
cmake .. && make
- In a terminal, go to the obs-studio directory create a cmbuild subdir
and change to it, then to build, type: cmake .. && make
- It builds in a modular structure similar to windows, where everything
necessary to run the program is compiled to obs-studio/build
necessary to run the program is compiled to cmbuild/rundir
- You can also use ccmake to create an app bundle, which makes it so you
don't have to use the terminal to execute it from the correct directory
Linux
- Definitely want to use autotools, as cmake files are currently made more
for OSX
- If using debian-based distributions, you may have to get the latest FFmpeg
repo -- default debian packages seem to be a bit lacking, so you might have
to either get precompiled packages from http://deb-multimedia.org/ (or

View File

@ -1,2 +0,0 @@
#!/bin/sh
autoreconf --force --install -I config -I m4

View File

@ -1,16 +0,0 @@
obs_plugin_datadir = $(datadir)/obs-plugins
obs_plugin_data_testdir = $(obs_plugin_datadir)/test-input
data_libobsdir = $(datadir)/libobs
obs_localedir = $(datadir)/obs-studio/locale
obs_plugin_data_test_DATA = data/obs-plugins/test-input/draw.effect \
data/obs-plugins/test-input/test.effect
data_libobs_DATA = data/libobs/default.effect
obs_locale_DATA = data/obs-studio/locale/en.txt \
data/obs-studio/locale/ja.txt \
data/obs-studio/locale/locale.ini
#uninstall-local:
# rm -r $(DESTDIR)$(obs_plugin_datadir)
# rm -r $(DESTDIR)$(data_libobsdir)

View File

@ -1,42 +1,42 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">
<LocalDebuggerCommand>$(SolutionDir)rundir\$(Configuration)\bin\64bit\obs.exe</LocalDebuggerCommand>
<LocalDebuggerCommand>$(SolutionDir)rundir\$(Configuration)\bin\64bit\obs64.exe</LocalDebuggerCommand>
<LocalDebuggerWorkingDirectory>$(SolutionDir)rundir\$(Configuration)\bin\64bit</LocalDebuggerWorkingDirectory>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LocalDebuggerCommand>$(SolutionDir)rundir\$(Configuration)\bin\64bit\obs.exe</LocalDebuggerCommand>
<LocalDebuggerCommand>$(SolutionDir)rundir\$(Configuration)\bin\64bit\obs64.exe</LocalDebuggerCommand>
<LocalDebuggerWorkingDirectory>$(SolutionDir)rundir\$(Configuration)\bin\64bit</LocalDebuggerWorkingDirectory>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LocalDebuggerCommand>$(SolutionDir)rundir\$(Configuration)\bin\64bit\obs.exe</LocalDebuggerCommand>
<LocalDebuggerCommand>$(SolutionDir)rundir\$(Configuration)\bin\64bit\obs64.exe</LocalDebuggerCommand>
<LocalDebuggerWorkingDirectory>$(SolutionDir)rundir\$(Configuration)\bin\64bit</LocalDebuggerWorkingDirectory>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'">
<LocalDebuggerCommand>$(SolutionDir)rundir\$(Configuration)\bin\64bit\obs.exe</LocalDebuggerCommand>
<LocalDebuggerCommand>$(SolutionDir)rundir\$(Configuration)\bin\64bit\obs64.exe</LocalDebuggerCommand>
<LocalDebuggerWorkingDirectory>$(SolutionDir)rundir\$(Configuration)\bin\64bit</LocalDebuggerWorkingDirectory>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|Win32'">
<LocalDebuggerCommand>$(SolutionDir)rundir\$(Configuration)\bin\32bit\obs.exe</LocalDebuggerCommand>
<LocalDebuggerCommand>$(SolutionDir)rundir\$(Configuration)\bin\32bit\obs32.exe</LocalDebuggerCommand>
<LocalDebuggerWorkingDirectory>$(SolutionDir)rundir\$(Configuration)\bin\32bit</LocalDebuggerWorkingDirectory>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LocalDebuggerCommand>$(SolutionDir)rundir\$(Configuration)\bin\32bit\obs.exe</LocalDebuggerCommand>
<LocalDebuggerCommand>$(SolutionDir)rundir\$(Configuration)\bin\32bit\obs32.exe</LocalDebuggerCommand>
<LocalDebuggerWorkingDirectory>$(SolutionDir)rundir\$(Configuration)\bin\32bit</LocalDebuggerWorkingDirectory>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LocalDebuggerCommand>$(SolutionDir)rundir\$(Configuration)\bin\32bit\obs.exe</LocalDebuggerCommand>
<LocalDebuggerCommand>$(SolutionDir)rundir\$(Configuration)\bin\32bit\obs32.exe</LocalDebuggerCommand>
<LocalDebuggerWorkingDirectory>$(SolutionDir)rundir\$(Configuration)\bin\32bit</LocalDebuggerWorkingDirectory>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|Win32'">
<LocalDebuggerCommand>$(SolutionDir)rundir\$(Configuration)\bin\32bit\obs.exe</LocalDebuggerCommand>
<LocalDebuggerCommand>$(SolutionDir)rundir\$(Configuration)\bin\32bit\obs32.exe</LocalDebuggerCommand>
<LocalDebuggerWorkingDirectory>$(SolutionDir)rundir\$(Configuration)\bin\32bit</LocalDebuggerWorkingDirectory>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>

View File

@ -1,11 +0,0 @@
[Settings]
NumFields=1
[Field 1]
Type=CheckBox
Text=Create @CPACK_PACKAGE_NAME@ Desktop Icon
Left=0
Right=-1
Top=10
Bottom=-1
State=1

View File

@ -1,729 +0,0 @@
; CPack install script designed for a nmake build
;--------------------------------
; You must define these values
!define VERSION "@CPACK_PACKAGE_VERSION@"
!define PATCH "@CPACK_PACKAGE_VERSION_PATCH@"
!define INST_DIR "@CPACK_TEMPORARY_DIRECTORY@"
;--------------------------------
;Variables
Var MUI_TEMP
Var STARTMENU_FOLDER
Var SV_ALLUSERS
Var START_MENU
Var INSTALL_DESKTOP
Var IS_DEFAULT_INSTALLDIR
;--------------------------------
;Include Modern UI
!include "MUI.nsh"
;Default installation folder
InstallDir "@CPACK_NSIS_INSTALL_ROOT@\@CPACK_PACKAGE_INSTALL_DIRECTORY@"
;--------------------------------
;General
;Name and file
Name "@CPACK_NSIS_PACKAGE_NAME@"
OutFile "@CPACK_TOPLEVEL_DIRECTORY@/@CPACK_OUTPUT_FILE_NAME@"
;Set compression
SetCompressor @CPACK_NSIS_COMPRESSOR@
;Require administrator access
RequestExecutionLevel admin
@CPACK_NSIS_DEFINES@
!include Sections.nsh
;--- Component support macros: ---
; The code for the add/remove functionality is from:
; http://nsis.sourceforge.net/Add/Remove_Functionality
; It has been modified slightly and extended to provide
; inter-component dependencies.
Var AR_SecFlags
Var AR_RegFlags
@CPACK_NSIS_SECTION_SELECTED_VARS@
; Loads the "selected" flag for the section named SecName into the
; variable VarName.
!macro LoadSectionSelectedIntoVar SecName VarName
SectionGetFlags ${${SecName}} $${VarName}
IntOp $${VarName} $${VarName} & ${SF_SELECTED} ;Turn off all other bits
!macroend
; Loads the value of a variable... can we get around this?
!macro LoadVar VarName
IntOp $R0 0 + $${VarName}
!macroend
; Sets the value of a variable
!macro StoreVar VarName IntValue
IntOp $${VarName} 0 + ${IntValue}
!macroend
!macro InitSection SecName
; This macro reads component installed flag from the registry and
;changes checked state of the section on the components page.
;Input: section index constant name specified in Section command.
ClearErrors
;Reading component status from registry
ReadRegDWORD $AR_RegFlags HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@\Components\${SecName}" "Installed"
IfErrors "default_${SecName}"
;Status will stay default if registry value not found
;(component was never installed)
IntOp $AR_RegFlags $AR_RegFlags & ${SF_SELECTED} ;Turn off all other bits
SectionGetFlags ${${SecName}} $AR_SecFlags ;Reading default section flags
IntOp $AR_SecFlags $AR_SecFlags & 0xFFFE ;Turn lowest (enabled) bit off
IntOp $AR_SecFlags $AR_RegFlags | $AR_SecFlags ;Change lowest bit
; Note whether this component was installed before
!insertmacro StoreVar ${SecName}_was_installed $AR_RegFlags
IntOp $R0 $AR_RegFlags & $AR_RegFlags
;Writing modified flags
SectionSetFlags ${${SecName}} $AR_SecFlags
"default_${SecName}:"
!insertmacro LoadSectionSelectedIntoVar ${SecName} ${SecName}_selected
!macroend
!macro FinishSection SecName
; This macro reads section flag set by user and removes the section
;if it is not selected.
;Then it writes component installed flag to registry
;Input: section index constant name specified in Section command.
SectionGetFlags ${${SecName}} $AR_SecFlags ;Reading section flags
;Checking lowest bit:
IntOp $AR_SecFlags $AR_SecFlags & ${SF_SELECTED}
IntCmp $AR_SecFlags 1 "leave_${SecName}"
;Section is not selected:
;Calling Section uninstall macro and writing zero installed flag
!insertmacro "Remove_${${SecName}}"
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@\Components\${SecName}" \
"Installed" 0
Goto "exit_${SecName}"
"leave_${SecName}:"
;Section is selected:
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@\Components\${SecName}" \
"Installed" 1
"exit_${SecName}:"
!macroend
!macro RemoveSection_CPack SecName
; This macro is used to call section's Remove_... macro
;from the uninstaller.
;Input: section index constant name specified in Section command.
!insertmacro "Remove_${${SecName}}"
!macroend
; Determine whether the selection of SecName changed
!macro MaybeSelectionChanged SecName
!insertmacro LoadVar ${SecName}_selected
SectionGetFlags ${${SecName}} $R1
IntOp $R1 $R1 & ${SF_SELECTED} ;Turn off all other bits
; See if the status has changed:
IntCmp $R0 $R1 "${SecName}_unchanged"
!insertmacro LoadSectionSelectedIntoVar ${SecName} ${SecName}_selected
IntCmp $R1 ${SF_SELECTED} "${SecName}_was_selected"
!insertmacro "Deselect_required_by_${SecName}"
goto "${SecName}_unchanged"
"${SecName}_was_selected:"
!insertmacro "Select_${SecName}_depends"
"${SecName}_unchanged:"
!macroend
;--- End of Add/Remove macros ---
;--------------------------------
;Interface Settings
!define MUI_HEADERIMAGE
!define MUI_ABORTWARNING
;--------------------------------
; path functions
!verbose 3
!include "WinMessages.NSH"
!verbose 4
!define NT_current_env 'HKCU "Environment"'
!define NT_all_env 'HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"'
!ifndef WriteEnvStr_RegKey
!ifdef ALL_USERS
!define WriteEnvStr_RegKey \
'HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"'
!else
!define WriteEnvStr_RegKey 'HKCU "Environment"'
!endif
!endif
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Uninstall sutff
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
###########################################
# Utility Functions #
###########################################
;====================================================
; IsNT - Returns 1 if the current system is NT, 0
; otherwise.
; Output: head of the stack
;====================================================
; IsNT
; no input
; output, top of the stack = 1 if NT or 0 if not
;
; Usage:
; Call IsNT
; Pop $R0
; ($R0 at this point is 1 or 0)
!macro IsNT un
Function ${un}IsNT
Push $0
ReadRegStr $0 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion
StrCmp $0 "" 0 IsNT_yes
; we are not NT.
Pop $0
Push 0
Return
IsNT_yes:
; NT!!!
Pop $0
Push 1
FunctionEnd
!macroend
!insertmacro IsNT ""
!insertmacro IsNT "un."
; StrStr
; input, top of stack = string to search for
; top of stack-1 = string to search in
; output, top of stack (replaces with the portion of the string remaining)
; modifies no other variables.
;
; Usage:
; Push "this is a long ass string"
; Push "ass"
; Call StrStr
; Pop $R0
; ($R0 at this point is "ass string")
!macro StrStr un
Function ${un}StrStr
Exch $R1 ; st=haystack,old$R1, $R1=needle
Exch ; st=old$R1,haystack
Exch $R2 ; st=old$R1,old$R2, $R2=haystack
Push $R3
Push $R4
Push $R5
StrLen $R3 $R1
StrCpy $R4 0
; $R1=needle
; $R2=haystack
; $R3=len(needle)
; $R4=cnt
; $R5=tmp
loop:
StrCpy $R5 $R2 $R3 $R4
StrCmp $R5 $R1 done
StrCmp $R5 "" done
IntOp $R4 $R4 + 1
Goto loop
done:
StrCpy $R1 $R2 "" $R4
Pop $R5
Pop $R4
Pop $R3
Pop $R2
Exch $R1
FunctionEnd
!macroend
!insertmacro StrStr ""
!insertmacro StrStr "un."
Function Trim ; Added by Pelaca
Exch $R1
Push $R2
Loop:
StrCpy $R2 "$R1" 1 -1
StrCmp "$R2" " " RTrim
StrCmp "$R2" "$\n" RTrim
StrCmp "$R2" "$\r" RTrim
StrCmp "$R2" ";" RTrim
GoTo Done
RTrim:
StrCpy $R1 "$R1" -1
Goto Loop
Done:
Pop $R2
Exch $R1
FunctionEnd
Function ConditionalAddToRegisty
Pop $0
Pop $1
StrCmp "$0" "" ConditionalAddToRegisty_EmptyString
WriteRegStr SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@" \
"$1" "$0"
;MessageBox MB_OK "Set Registry: '$1' to '$0'"
DetailPrint "Set install registry entry: '$1' to '$0'"
ConditionalAddToRegisty_EmptyString:
FunctionEnd
;--------------------------------
!ifdef CPACK_USES_DOWNLOAD
Function DownloadFile
IfFileExists $INSTDIR\* +2
CreateDirectory $INSTDIR
Pop $0
; Skip if already downloaded
IfFileExists $INSTDIR\$0 0 +2
Return
StrCpy $1 "@CPACK_DOWNLOAD_SITE@"
try_again:
NSISdl::download "$1/$0" "$INSTDIR\$0"
Pop $1
StrCmp $1 "success" success
StrCmp $1 "Cancelled" cancel
MessageBox MB_OK "Download failed: $1"
cancel:
Return
success:
FunctionEnd
!endif
;--------------------------------
; Installation types
@CPACK_NSIS_INSTALLATION_TYPES@
;--------------------------------
; Component sections
@CPACK_NSIS_COMPONENT_SECTIONS@
;--------------------------------
; Define some macro setting for the gui
@CPACK_NSIS_INSTALLER_MUI_ICON_CODE@
@CPACK_NSIS_INSTALLER_ICON_CODE@
@CPACK_NSIS_INSTALLER_MUI_COMPONENTS_DESC@
@CPACK_NSIS_INSTALLER_MUI_FINISHPAGE_RUN_CODE@
;--------------------------------
;Pages
!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_LICENSE "@CPACK_RESOURCE_FILE_LICENSE@"
Page custom InstallOptionsPage
!insertmacro MUI_PAGE_DIRECTORY
;Start Menu Folder Page Configuration
!define MUI_STARTMENUPAGE_REGISTRY_ROOT "SHCTX"
!define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\@CPACK_PACKAGE_VENDOR@\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@"
!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Start Menu Folder"
!insertmacro MUI_PAGE_STARTMENU Application $STARTMENU_FOLDER
@CPACK_NSIS_PAGE_COMPONENTS@
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_FINISH
!insertmacro MUI_UNPAGE_CONFIRM
!insertmacro MUI_UNPAGE_INSTFILES
;--------------------------------
;Languages
!insertmacro MUI_LANGUAGE "English" ;first language is the default language
!insertmacro MUI_LANGUAGE "Albanian"
!insertmacro MUI_LANGUAGE "Arabic"
!insertmacro MUI_LANGUAGE "Basque"
!insertmacro MUI_LANGUAGE "Belarusian"
!insertmacro MUI_LANGUAGE "Bosnian"
!insertmacro MUI_LANGUAGE "Breton"
!insertmacro MUI_LANGUAGE "Bulgarian"
!insertmacro MUI_LANGUAGE "Croatian"
!insertmacro MUI_LANGUAGE "Czech"
!insertmacro MUI_LANGUAGE "Danish"
!insertmacro MUI_LANGUAGE "Dutch"
!insertmacro MUI_LANGUAGE "Estonian"
!insertmacro MUI_LANGUAGE "Farsi"
!insertmacro MUI_LANGUAGE "Finnish"
!insertmacro MUI_LANGUAGE "French"
!insertmacro MUI_LANGUAGE "German"
!insertmacro MUI_LANGUAGE "Greek"
!insertmacro MUI_LANGUAGE "Hebrew"
!insertmacro MUI_LANGUAGE "Hungarian"
!insertmacro MUI_LANGUAGE "Icelandic"
!insertmacro MUI_LANGUAGE "Indonesian"
!insertmacro MUI_LANGUAGE "Irish"
!insertmacro MUI_LANGUAGE "Italian"
!insertmacro MUI_LANGUAGE "Japanese"
!insertmacro MUI_LANGUAGE "Korean"
!insertmacro MUI_LANGUAGE "Kurdish"
!insertmacro MUI_LANGUAGE "Latvian"
!insertmacro MUI_LANGUAGE "Lithuanian"
!insertmacro MUI_LANGUAGE "Luxembourgish"
!insertmacro MUI_LANGUAGE "Macedonian"
!insertmacro MUI_LANGUAGE "Malay"
!insertmacro MUI_LANGUAGE "Mongolian"
!insertmacro MUI_LANGUAGE "Norwegian"
!insertmacro MUI_LANGUAGE "Polish"
!insertmacro MUI_LANGUAGE "Portuguese"
!insertmacro MUI_LANGUAGE "PortugueseBR"
!insertmacro MUI_LANGUAGE "Romanian"
!insertmacro MUI_LANGUAGE "Russian"
!insertmacro MUI_LANGUAGE "Serbian"
!insertmacro MUI_LANGUAGE "SerbianLatin"
!insertmacro MUI_LANGUAGE "SimpChinese"
!insertmacro MUI_LANGUAGE "Slovak"
!insertmacro MUI_LANGUAGE "Slovenian"
!insertmacro MUI_LANGUAGE "Spanish"
!insertmacro MUI_LANGUAGE "Swedish"
!insertmacro MUI_LANGUAGE "Thai"
!insertmacro MUI_LANGUAGE "TradChinese"
!insertmacro MUI_LANGUAGE "Turkish"
!insertmacro MUI_LANGUAGE "Ukrainian"
!insertmacro MUI_LANGUAGE "Welsh"
;--------------------------------
;Reserve Files
;These files should be inserted before other files in the data block
;Keep these lines before any File command
;Only for solid compression (by default, solid compression is enabled for BZIP2 and LZMA)
ReserveFile "NSIS.InstallOptions.ini"
!insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
;--------------------------------
;Installer Sections
Section "-Core installation"
;Use the entire tree produced by the INSTALL target. Keep the
;list of directories here in sync with the RMDir commands below.
SetOutPath "$INSTDIR"
@CPACK_NSIS_EXTRA_PREINSTALL_COMMANDS@
@CPACK_NSIS_FULL_INSTALL@
;Store installation folder
WriteRegStr SHCTX "Software\@CPACK_PACKAGE_VENDOR@\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@" "" $INSTDIR
;Create uninstaller
WriteUninstaller "$INSTDIR\Uninstall.exe"
Push "DisplayName"
Push "@CPACK_NSIS_DISPLAY_NAME@"
Call ConditionalAddToRegisty
Push "DisplayVersion"
Push "@CPACK_PACKAGE_VERSION@"
Call ConditionalAddToRegisty
Push "Publisher"
Push "@CPACK_PACKAGE_VENDOR@"
Call ConditionalAddToRegisty
Push "UninstallString"
Push "$INSTDIR\Uninstall.exe"
Call ConditionalAddToRegisty
Push "NoRepair"
Push "1"
Call ConditionalAddToRegisty
!ifdef CPACK_NSIS_ADD_REMOVE
;Create add/remove functionality
Push "ModifyPath"
Push "$INSTDIR\AddRemove.exe"
Call ConditionalAddToRegisty
!else
Push "NoModify"
Push "1"
Call ConditionalAddToRegisty
!endif
; Optional registration
Push "DisplayIcon"
Push "$INSTDIR\@CPACK_NSIS_INSTALLED_ICON_NAME@"
Call ConditionalAddToRegisty
Push "HelpLink"
Push "@CPACK_NSIS_HELP_LINK@"
Call ConditionalAddToRegisty
Push "URLInfoAbout"
Push "@CPACK_NSIS_URL_INFO_ABOUT@"
Call ConditionalAddToRegisty
Push "Contact"
Push "@CPACK_NSIS_CONTACT@"
Call ConditionalAddToRegisty
!insertmacro MUI_INSTALLOPTIONS_READ $INSTALL_DESKTOP "NSIS.InstallOptions.ini" "Field 1" "State"
!insertmacro MUI_STARTMENU_WRITE_BEGIN Application
;Create shortcuts
CreateDirectory "$SMPROGRAMS\$STARTMENU_FOLDER"
@CPACK_NSIS_CREATE_ICONS@
@CPACK_NSIS_CREATE_ICONS_EXTRA@
CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Uninstall.lnk" "$INSTDIR\Uninstall.exe"
; Write special uninstall registry entries
Push "StartMenu"
Push "$STARTMENU_FOLDER"
Call ConditionalAddToRegisty
Push "InstallToDesktop"
Push "$INSTALL_DESKTOP"
Call ConditionalAddToRegisty
!insertmacro MUI_STARTMENU_WRITE_END
@CPACK_NSIS_EXTRA_INSTALL_COMMANDS@
SectionEnd
;--------------------------------
; Create custom pages
Function InstallOptionsPage
!insertmacro MUI_HEADER_TEXT "Install Options" "Choose options for installing @CPACK_NSIS_PACKAGE_NAME@"
!insertmacro MUI_INSTALLOPTIONS_DISPLAY "NSIS.InstallOptions.ini"
FunctionEnd
;--------------------------------
; determine admin versus local install
Function un.onInit
ClearErrors
UserInfo::GetName
IfErrors noLM
Pop $0
UserInfo::GetAccountType
Pop $1
StrCmp $1 "Admin" 0 +3
SetShellVarContext all
;MessageBox MB_OK 'User "$0" is in the Admin group'
Goto done
StrCmp $1 "Power" 0 +3
SetShellVarContext all
;MessageBox MB_OK 'User "$0" is in the Power Users group'
Goto done
noLM:
;Get installation folder from registry if available
done:
FunctionEnd
;--- Add/Remove callback functions: ---
!macro SectionList MacroName
;This macro used to perform operation on multiple sections.
;List all of your components in following manner here.
@CPACK_NSIS_COMPONENT_SECTION_LIST@
!macroend
Section -FinishComponents
;Removes unselected components and writes component status to registry
!insertmacro SectionList "FinishSection"
!ifdef CPACK_NSIS_ADD_REMOVE
; Get the name of the installer executable
System::Call 'kernel32::GetModuleFileNameA(i 0, t .R0, i 1024) i r1'
StrCpy $R3 $R0
; Strip off the last 13 characters, to see if we have AddRemove.exe
StrLen $R1 $R0
IntOp $R1 $R0 - 13
StrCpy $R2 $R0 13 $R1
StrCmp $R2 "AddRemove.exe" addremove_installed
; We're not running AddRemove.exe, so install it
CopyFiles $R3 $INSTDIR\AddRemove.exe
addremove_installed:
!endif
SectionEnd
;--- End of Add/Remove callback functions ---
;--------------------------------
; Component dependencies
Function .onSelChange
!insertmacro SectionList MaybeSelectionChanged
FunctionEnd
;--------------------------------
;Uninstaller Section
Section "Uninstall"
ReadRegStr $START_MENU SHCTX \
"Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@" "StartMenu"
;MessageBox MB_OK "Start menu is in: $START_MENU"
ReadRegStr $INSTALL_DESKTOP SHCTX \
"Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@" "InstallToDesktop"
;MessageBox MB_OK "Install to desktop: $INSTALL_DESKTOP "
@CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS@
;Remove files we installed.
;Keep the list of directories here in sync with the File commands above.
@CPACK_NSIS_DELETE_FILES@
@CPACK_NSIS_DELETE_DIRECTORIES@
!ifdef CPACK_NSIS_ADD_REMOVE
;Remove the add/remove program
Delete "$INSTDIR\AddRemove.exe"
!endif
;Remove the uninstaller itself.
Delete "$INSTDIR\Uninstall.exe"
DeleteRegKey SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@"
;Remove the installation directory if it is empty.
RMDir "$INSTDIR"
; Remove the registry entries.
DeleteRegKey SHCTX "Software\@CPACK_PACKAGE_VENDOR@\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@"
; Removes all optional components
!insertmacro SectionList "RemoveSection_CPack"
!insertmacro MUI_STARTMENU_GETFOLDER Application $MUI_TEMP
Delete "$SMPROGRAMS\$MUI_TEMP\Uninstall.lnk"
@CPACK_NSIS_DELETE_ICONS@
@CPACK_NSIS_DELETE_ICONS_EXTRA@
;Delete empty start menu parent diretories
StrCpy $MUI_TEMP "$SMPROGRAMS\$MUI_TEMP"
startMenuDeleteLoop:
ClearErrors
RMDir $MUI_TEMP
GetFullPathName $MUI_TEMP "$MUI_TEMP\.."
IfErrors startMenuDeleteLoopDone
StrCmp "$MUI_TEMP" "$SMPROGRAMS" startMenuDeleteLoopDone startMenuDeleteLoop
startMenuDeleteLoopDone:
; If the user changed the shortcut, then untinstall may not work. This should
; try to fix it.
StrCpy $MUI_TEMP "$START_MENU"
Delete "$SMPROGRAMS\$MUI_TEMP\Uninstall.lnk"
@CPACK_NSIS_DELETE_ICONS_EXTRA@
;Delete empty start menu parent diretories
StrCpy $MUI_TEMP "$SMPROGRAMS\$MUI_TEMP"
secondStartMenuDeleteLoop:
ClearErrors
RMDir $MUI_TEMP
GetFullPathName $MUI_TEMP "$MUI_TEMP\.."
IfErrors secondStartMenuDeleteLoopDone
StrCmp "$MUI_TEMP" "$SMPROGRAMS" secondStartMenuDeleteLoopDone secondStartMenuDeleteLoop
secondStartMenuDeleteLoopDone:
DeleteRegKey /ifempty SHCTX "Software\@CPACK_PACKAGE_VENDOR@\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@"
SectionEnd
;--------------------------------
; determine admin versus local install
; Is install for "AllUsers" or "JustMe"?
; Default to "JustMe" - set to "AllUsers" if admin or on Win9x
; This function is used for the very first "custom page" of the installer.
; This custom page does not show up visibly, but it executes prior to the
; first visible page and sets up $INSTDIR properly...
; Choose different default installation folder based on SV_ALLUSERS...
; "Program Files" for AllUsers, "My Documents" for JustMe...
Function .onInit
StrCmp "@CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL@" "ON" 0 inst
ReadRegStr $0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@" "UninstallString"
StrCmp $0 "" inst
MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION \
"@CPACK_NSIS_PACKAGE_NAME@ is already installed. $\n$\nClick `OK` to remove the previous version or `Cancel` to cancel this upgrade." \
IDOK uninst
Abort
;Run the uninstaller
uninst:
ClearErrors
StrLen $2 "\Uninstall.exe"
StrCpy $3 $0 -$2 # remove "\Uninstall.exe" from UninstallString to get path
ExecWait '$0 _?=$3' ;Do not copy the uninstaller to a temp file
IfErrors uninst_failed inst
uninst_failed:
MessageBox MB_OK|MB_ICONSTOP "Uninstall failed."
Abort
inst:
; Reads components status for registry
!insertmacro SectionList "InitSection"
; check to see if /D has been used to change
; the install directory by comparing it to the
; install directory that is expected to be the
; default
StrCpy $IS_DEFAULT_INSTALLDIR 0
StrCmp "$INSTDIR" "@CPACK_NSIS_INSTALL_ROOT@\@CPACK_PACKAGE_INSTALL_DIRECTORY@" 0 +2
StrCpy $IS_DEFAULT_INSTALLDIR 1
StrCpy $SV_ALLUSERS "JustMe"
; if default install dir then change the default
; if it is installed for JustMe
StrCmp "$IS_DEFAULT_INSTALLDIR" "1" 0 +2
StrCpy $INSTDIR "$DOCUMENTS\@CPACK_PACKAGE_INSTALL_DIRECTORY@"
ClearErrors
UserInfo::GetName
IfErrors noLM
Pop $0
UserInfo::GetAccountType
Pop $1
StrCmp $1 "Admin" 0 +4
SetShellVarContext all
;MessageBox MB_OK 'User "$0" is in the Admin group'
StrCpy $SV_ALLUSERS "AllUsers"
Goto done
StrCmp $1 "Power" 0 +4
SetShellVarContext all
;MessageBox MB_OK 'User "$0" is in the Power Users group'
StrCpy $SV_ALLUSERS "AllUsers"
Goto done
noLM:
StrCpy $SV_ALLUSERS "AllUsers"
;Get installation folder from registry if available
done:
StrCmp $SV_ALLUSERS "AllUsers" 0 +3
StrCmp "$IS_DEFAULT_INSTALLDIR" "1" 0 +2
StrCpy $INSTDIR "@CPACK_NSIS_INSTALL_ROOT@\@CPACK_PACKAGE_INSTALL_DIRECTORY@"
StrCmp "@CPACK_NSIS_MODIFY_PATH@" "ON" 0 noOptionsPage
!insertmacro MUI_INSTALLOPTIONS_EXTRACT "NSIS.InstallOptions.ini"
noOptionsPage:
FunctionEnd

View File

@ -2,7 +2,7 @@
if(APPLE AND NOT CPACK_GENERATOR)
set(CPACK_GENERATOR "Bundle")
elseif(WIN32 AND NOT CPACK_GENERATOR)
set(CPACK_GENERATOR "NSIS" "ZIP")
set(CPACK_GENERATOR "WIX" "ZIP")
endif()
set(CPACK_PACKAGE_NAME "OBS Studio")
@ -19,36 +19,31 @@ if(EXISTS "${CMAKE_SOURCE_DIR}/.git")
OUTPUT_VARIABLE OBS_VERSION
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
OUTPUT_STRIP_TRAILING_WHITESPACE)
if(NOT "${OBS_VERSION}" STREQUAL "")
set(CPACK_PACKAGE_VERSION "${OBS_VERSION}")
endif()
else()
set(OBS_VERSION "${CPACK_PACKAGE_VERSION}")
endif()
set(OBS_VERSION "${CPACK_PACKAGE_VERSION}")
if(INSTALLER_RUN)
file(TO_NATIVE_PATH "${OBS_EXECUTABLE32_DESTINATION}/obs" _obs32)
file(TO_NATIVE_PATH "${OBS_EXECUTABLE64_DESTINATION}/obs" _obs64)
#Workaround a cmake bug, remove when fixed
string(REPLACE "\\" "\\\\" _obs32 "${_obs32}")
string(REPLACE "\\" "\\\\" _obs64 "${_obs64}")
set(CPACK_PACKAGE_EXECUTABLES
"${_obs32}" "OBS Studio (32bit)"
"${_obs64}" "OBS Studio (64bit)")
"obs32" "OBS Studio (32bit)"
"obs64" "OBS Studio (64bit)")
set(CPACK_CREATE_DESKTOP_LINKS
"${_obs32}"
"${_obs64}")
"obs32"
"obs64")
else()
file(TO_NATIVE_PATH "${OBS_EXECUTABLE_DESTINATION}/obs" _obs)
if(WIN32)
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(_output_suffix "64")
else()
set(_output_suffix "32")
endif()
else()
set(_output_suffix "")
endif()
#Workaround a cmake bug, remove when fixed
string(REPLACE "\\" "\\\\" _obs "${_obs}")
set(CPACK_PACKAGE_EXECUTABLES "${_obs}" "OBS Studio")
set(CPACK_CREATE_DESKTOP_LINKS "${_obs}")
set(CPACK_PACKAGE_EXECUTABLES "obs${_output_suffix}" "OBS Studio")
set(CPACK_CREATE_DESKTOP_LINKS "obs${_output_suffix}")
endif()
set(CPACK_BUNDLE_NAME "OBS Studio")
@ -56,27 +51,28 @@ set(CPACK_BUNDLE_PLIST "${CMAKE_SOURCE_DIR}/cmake/osxbundle/Info.plist")
set(CPACK_BUNDLE_ICON "${CMAKE_SOURCE_DIR}/cmake/osxbundle/obs.icns")
set(CPACK_BUNDLE_STARTUP_COMMAND "${CMAKE_SOURCE_DIR}/cmake/osxbundle/obslaunch.sh")
set(CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL ON)
set(CPACK_NSIS_EXECUTABLES_DIRECTORY ".")
set(CPACK_NSIS_MODIFY_PATH ON)
set(CPACK_WIX_TEMPLATE "${CMAKE_SOURCE_DIR}/cmake/Modules/WIX.template.in")
if(INSTALLER_RUN)
set(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "OBSStudio")
set(CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES")
set(CPACK_WIX_UPGRADE_GUID "1f59ff79-2a3c-43c1-b2b2-033a5e6342eb")
set(CPACK_WIX_PRODUCT_GUID "0c7bec2a-4f07-41b2-9dff-d64b09c9c384")
set(CPACK_PACKAGE_FILE_NAME "obs-studio-${OBS_VERSION}")
elseif(CMAKE_SIZEOF_VOID_P EQUAL 8)
if(WIN32)
set(CPACK_PACKAGE_NAME "OBS Studio (64bit)")
endif()
set(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "OBSStudio64")
set(CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES64")
set(CPACK_WIX_UPGRADE_GUID "44c72510-2e8e-489c-8bc0-2011a9631b0b")
set(CPACK_WIX_PRODUCT_GUID "ca5bf4fe-7b38-4003-9455-de249d03caac")
set(CPACK_PACKAGE_FILE_NAME "obs-studio-x64-${OBS_VERSION}")
else()
if(WIN32)
set(CPACK_PACKAGE_NAME "OBS Studio (32bit)")
endif()
set(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "OBSStudio32")
set(CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES32")
set(CPACK_WIX_UPGRADE_GUID "a26acea4-6190-4470-9fb9-f6d32f3ba030")
set(CPACK_WIX_PRODUCT_GUID "8e24982d-b0ab-4f66-9c90-f726f3b64682")
set(CPACK_PACKAGE_FILE_NAME "obs-studio-x86-${OBS_VERSION}")
endif()

View File

@ -0,0 +1,43 @@
<?xml version="1.0" encoding="UTF-8"?>
<?include "cpack_variables.wxi"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
RequiredVersion="3.6.3303.0">
<Product Id="$(var.CPACK_WIX_PRODUCT_GUID)"
Name="$(var.CPACK_PACKAGE_NAME)"
Language="1033"
Version="$(var.CPACK_PACKAGE_VERSION)"
Manufacturer="$(var.CPACK_PACKAGE_VENDOR)"
UpgradeCode="$(var.CPACK_WIX_UPGRADE_GUID)">
<Package InstallerVersion="301" Compressed="yes"/>
<Media Id="1" Cabinet="media1.cab" EmbedCab="yes"/>
<MajorUpgrade
Schedule="afterInstallInitialize"
AllowDowngrades="yes"/>
<WixVariable Id="WixUILicenseRtf" Value="$(var.CPACK_WIX_LICENSE_RTF)"/>
<Property Id="WIXUI_INSTALLDIR" Value="INSTALL_ROOT"/>
<?ifdef CPACK_WIX_PRODUCT_ICON?>
<Property Id="ARPPRODUCTICON">ProductIcon.ico</Property>
<Icon Id="ProductIcon.ico" SourceFile="$(var.CPACK_WIX_PRODUCT_ICON)"/>
<?endif?>
<?ifdef CPACK_WIX_UI_BANNER?>
<WixVariable Id="WixUIBannerBmp" Value="$(var.CPACK_WIX_UI_BANNER)"/>
<?endif?>
<?ifdef CPACK_WIX_UI_DIALOG?>
<WixVariable Id="WixUIDialogBmp" Value="$(var.CPACK_WIX_UI_DIALOG)"/>
<?endif?>
<FeatureRef Id="ProductFeature"/>
<UIRef Id="WixUI_InstallDir" />
</Product>
</Wix>

View File

@ -1,136 +0,0 @@
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.67])
AC_INIT([obs-studio], [0.0.1], [obs.jim@gmail.com])
AC_CONFIG_SRCDIR([libobs/obs.c])
AC_CONFIG_MACRO_DIR([m4])
# AC_CONFIG_HEADERS([config.h])
AC_CANONICAL_HOST
LT_INIT
AM_INIT_AUTOMAKE([foreign])
AM_SILENT_RULES([yes])
# Checks for programs.
AC_PROG_CC_STDC
AC_PROG_OBJC
AC_PROG_OBJCXX
AC_PROG_CXX
AC_PROG_INSTALL
AC_PROG_SED
AX_CXX_COMPILE_STDCXX_11
# AX_EXT
AX_APPEND_FLAG(["-msse2"], [CPPFLAGS])
# currently only x86 and x86_64 are supported architectures
case $host in
i?86*)
AM_CONDITIONAL([ARCH_X86], true)
AM_CONDITIONAL([ARCH_X86_64], false)
;;
amd64* | x86_64*)
AM_CONDITIONAL([ARCH_X86], false)
AM_CONDITIONAL([ARCH_X86_64], true)
;;
*)
AC_MSG_ERROR([host architecture not currently supported])
;;
esac
case $host_os in
mingw*)
AM_CONDITIONAL([OS_WIN], true)
AM_CONDITIONAL([OS_OSX], false)
AM_CONDITIONAL([OS_NIX], false)
;;
darwin*)
AM_CONDITIONAL([OS_WIN], false)
AM_CONDITIONAL([OS_OSX], true)
AM_CONDITIONAL([OS_NIX], false)
;;
*) #TODO - fix nix, but not with sticks, and definitely not with bricks
AM_CONDITIONAL([OS_WIN], false)
AM_CONDITIONAL([OS_OSX], false)
AM_CONDITIONAL([OS_NIX], true)
PKG_CHECK_MODULES([X11], [x11])
PKG_CHECK_MODULES([XINERAMA], [xinerama])
PKG_CHECK_MODULES([GTK], [gtk+-x11-2.0])
;;
esac
# checks for ffmpeg
AC_CHECK_HEADER([libavcodec/avcodec.h], , AC_MSG_ERROR([libavcodec header not found]))
AC_CHECK_HEADER([libavformat/avformat.h], , AC_MSG_ERROR([libavformat header not found]))
AC_CHECK_HEADER([libavutil/avutil.h], , AC_MSG_ERROR([libavutil header not found]))
AC_CHECK_HEADER([libavutil/channel_layout.h], , AC_MSG_ERROR([libavutil header not found]))
AC_CHECK_HEADER([libswscale/swscale.h], , AC_MSG_ERROR([libswscale header not found]))
AC_CHECK_HEADER([libswresample/swresample.h], , AC_MSG_ERROR([libswresample header not found]))
AC_CHECK_LIB([avcodec], [avcodec_find_encoder_by_name], , AC_MSG_ERROR([libavcodec not found]))
AC_CHECK_LIB([avformat], [av_guess_format], , AC_MSG_ERROR([libavformat not found]))
AC_CHECK_LIB([avutil], [av_samples_alloc], , AC_MSG_ERROR([libavutil not found]))
AC_CHECK_LIB([swscale], [sws_scale], , AC_MSG_ERROR([libswscale not found]))
AC_CHECK_LIB([swresample], [swr_convert], , AC_MSG_ERROR([libswresample not found]))
# checks for jansson
AC_CHECK_HEADER([jansson.h], , AC_MSG_ERROR([libjansson header not found]))
AC_CHECK_LIB([jansson], [json_load_file], , AC_MSG_ERROR([libjansson not found]))
wxVersion=2.9.0
WX_CONFIG_OPTIONS
WX_CONFIG_CHECK(
$wxVersion, [wxWin=1], [wxWin=0,
AC_MSG_ERROR([
wxWidgets must be installed on your system.
Please check that wx-config is in path, the directory
where wxWidgets libraries are installed (returned by
'wx-config --libs' or 'wx-config --static --libs' command)
is in LD_LIBRARY_PATH or equivalent variable and
wxWidgets version is $wxVersion or above.
]) ],
[core], [--version=2.9])
CPPFLAGS="$CPPFLAGS $WX_CPPFLAGS"
CXXFLAGS="$CXXFLAGS $WX_CXXFLAGS_ONLY"
CFLAGS="$CFLAGS $WX_CFLAGS_ONLY "
LIBS="$LIBS $WX_LIBS"
# Checks for header files.
AC_PATH_X
AC_CHECK_HEADERS([inttypes.h limits.h malloc.h stddef.h stdint.h stdlib.h string.h sys/timeb.h wchar.h wctype.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDBOOL
AC_C_INLINE
AC_TYPE_INT16_T
AC_TYPE_INT32_T
AC_TYPE_INT64_T
AC_TYPE_INT8_T
AC_TYPE_MODE_T
AC_TYPE_OFF_T
AC_TYPE_PID_T
AC_TYPE_SIZE_T
AC_TYPE_SSIZE_T
AC_TYPE_UINT16_T
AC_TYPE_UINT32_T
AC_TYPE_UINT64_T
AC_TYPE_UINT8_T
AC_CHECK_TYPES([ptrdiff_t])
# Checks for library functions.
AC_FUNC_FSEEKO
AC_FUNC_STRTOD
AC_CHECK_FUNCS([memmove memset socket strstr strtol strtoul])
AC_CONFIG_FILES([makefile
build/makefile
obs/makefile
test/makefile
test/test-input/makefile
libobs/makefile
libobs-opengl/makefile])
AC_OUTPUT

View File

@ -1,45 +0,0 @@
AUTOMAKE_OPTIONS = subdir-objects
AM_CFLAGS = -DGLEW_NO_GLU -DGLEW_STATIC -isystem$(top_srcdir)/libobs -isystem./glew/include
if OS_WIN
if ARCH_X86
libobs_opengldir = ../build/bin/32bit
else
libobs_opengldir = ../build/bin/64bit
endif
else
libobs_opengldir = $(libdir)
endif
libobs_opengl_LTLIBRARIES = libobs-opengl.la
libobs_opengl_la_LDFLAGS = -no-undefined
libobs_opengl_la_LIBADD = ../libobs/libobs.la
if OS_WIN
libobs_opengl_la_LDFLAGS += -mwindows -avoid-version
libobs_opengl_la_LIBADD += -lopengl32
endif
libobs_opengl_la_SOURCES = gl-helpers.c \
gl-indexbuffer.c \
gl-shader.c \
gl-shaderparser.c \
gl-stagesurf.c \
gl-subsystem.c \
gl-texture2d.c \
gl-texturecube.c \
gl-vertexbuffer.c \
gl-zstencil.c \
glew/src/glew.c
if OS_OSX
libobs_opengl_la_SOURCES += gl-cocoa.m
libobs_opengl_la_LDFLAGS += -framework Cocoa -framework IOSurface
endif
if OS_WIN
libobs_opengl_la_SOURCES += gl-windows.c
endif
if OS_NIX
libobs_opengl_la_SOURCES += gl-x11.c
endif

View File

@ -42,7 +42,7 @@ endif()
if(MSVC)
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /SAFESEH:NO")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /EHc-")
set(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} /EHc-")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHc-")
endif()
set(libobs_callback_SOURCES

View File

@ -1,73 +0,0 @@
AUTOMAKE_OPTIONS = subdir-objects
if OS_WIN
if ARCH_X86
libobsdir = ../build/bin/32bit
else
libobsdir = ../build/bin/64bit
endif
else
libobsdir = $(libdir)
endif
libobs_LTLIBRARIES = libobs.la
libobs_la_LDFLAGS = -no-undefined --version-info 0:0:0
if OS_WIN
libobs_la_LDFLAGS += -avoid-version
endif
libobs_la_SOURCES = obs.c \
obs-display.c \
obs-module.c \
obs-output.c \
obs-scene.c \
obs-source.c \
obs-encoder.c \
obs-video.c \
util/base.c \
util/bmem.c \
util/cf-lexer.c \
util/cf-parser.c \
util/config-file.c \
util/dstr.c \
util/lexer.c \
util/platform.c \
util/text-lookup.c \
util/utf8.c \
media-io/audio-io.c \
media-io/format-conversion.c \
media-io/audio-resampler-ffmpeg.c \
media-io/video-io.c \
graphics/axisang.c \
graphics/bounds.c \
graphics/effect.c \
graphics/effect-parser.c \
graphics/graphics.c \
graphics/graphics-imports.c \
graphics/math-extra.c \
graphics/matrix3.c \
graphics/matrix4.c \
graphics/plane.c \
graphics/quat.c \
graphics/shader-parser.c \
graphics/texture-render.c \
graphics/vec2.c \
graphics/vec3.c \
graphics/vec4.c \
callback/calldata.c \
callback/proc.c \
callback/signal.c
if OS_WIN
libobs_la_SOURCES += util/platform-windows.c obs-windows.c
endif
if OS_OSX
libobs_la_SOURCES += util/platform-cocoa.m obs-cocoa.c
libobs_la_OBJCFLAGS = -fobjc-arc
endif
if OS_NIX
libobs_la_SOURCES += util/platform-nix.c obs-nix.c
endif

View File

@ -1,4 +0,0 @@
ACLOCAL_AMFLAGS = -I m4
EXTRA_DIST = autogen.sh COPYING README
SUBDIRS = libobs libobs-opengl test obs build

View File

@ -80,6 +80,19 @@ add_executable(obs WIN32
${obs_HEADERS}
${obs_UI_HEADERS}
${obs_QRC_SOURCES})
if(WIN32)
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(_output_suffix "64")
else()
set(_output_suffix "32")
endif()
set_target_properties(obs
PROPERTIES
OUTPUT_NAME "obs${_output_suffix}")
endif()
target_link_libraries(obs
libobs
Qt5::Widgets

View File

@ -1,39 +0,0 @@
AUTOMAKE_OPTIONS = subdir-objects
AM_CPPFLAGS = -I$(top_srcdir)/libobs
if OS_WIN
if ARCH_X86_64
obsdir = ../build/bin/64bit
else
obsdir = ../build/bin/32bit
endif
else
obsdir = $(bindir)
endif
obs_PROGRAMS = obs
obs_LDADD = $(top_srcdir)/libobs/libobs.la
obs_SOURCES = window-basic-main.cpp \
window-basic-settings.cpp \
window-namedialog.cpp \
settings-basic.cpp \
settings-basic-general.cpp \
settings-basic-video.cpp \
obs-app.cpp \
wx-subclass.cpp \
wx-wrappers.cpp \
forms/OBSWindows.cpp
if OS_WIN
obs_SOURCES += platform-windows.cpp
endif
if OS_OSX
obs_SOURCES += platform-osx.mm
endif
if OS_NIX
obs_CPPFLAGS = $(AM_CPPFLAGS) $(GTK_CFLAGS) $(X11_CFLAGS) $(XINERAMA_CFLAGS)
obs_SOURCES += platform-x11.cpp
obs_LDADD += $(GTK_LIBS) $(X11_LIBS) $(XINERAMA_LIBS)
endif

View File

@ -1,4 +0,0 @@
SUBDIRS = test-input
if OS_WIN
SUBDIRS += win
endif

View File

@ -1,23 +0,0 @@
AM_CFLAGS = -isystem$(top_srcdir)/libobs
if OS_WIN
if ARCH_X86
libtestdir = ../../build/plugins/32bit
else
libtestdir = ../../build/plugins/64bit
endif
else
libtestdir = $(libdir)/obs-plugins
endif
libtest_LTLIBRARIES = libtest-input.la
libtest_input_la_LDFLAGS = -no-undefined
if OS_WIN
libtest_input_la_LDFLAGS += -avoid-version
endif
libtest_input_la_LIBADD = $(top_srcdir)/libobs/libobs.la
libtest_input_la_SOURCES = test-filter.c \
test-input.c \
test-random.c \
test-sinewave.c

View File

@ -1,8 +0,0 @@
INCLUDES = -isystem$(top_srcdir)/libobs
AM_CPPFLAGS = -DUNICODE -D_UNICODE
builddir = ../../build
build_PROGRAMS = test
test_LDADD = $(top_srcdir)/libobs/libobs.la
test_LDFLAGS = -mwindows
test_SOURCES = test.cpp